DEV: allow custom composer heights in CSS (#18094)
This commit is contained in:
parent
97f094e5ee
commit
9d9c48fcb8
|
@ -1235,8 +1235,11 @@ export default Controller.extend({
|
|||
this.model.set("reply", opts.topicBody);
|
||||
}
|
||||
|
||||
// The two custom properties below can be overriden by themes/plugins to set different default composer heights.
|
||||
const defaultComposerHeight =
|
||||
this.model.action === "reply" ? "300px" : "400px";
|
||||
this.model.action === "reply"
|
||||
? "var(--reply-composer-height, 300px)"
|
||||
: "var(--new-topic-composer-height, 400px)";
|
||||
|
||||
this.set("model.composerHeight", defaultComposerHeight);
|
||||
document.documentElement.style.setProperty(
|
||||
|
|
|
@ -65,7 +65,7 @@ acceptance("Composer", function (needs) {
|
|||
|
||||
assert.strictEqual(
|
||||
document.documentElement.style.getPropertyValue("--composer-height"),
|
||||
"400px",
|
||||
"var(--new-topic-composer-height, 400px)",
|
||||
"sets --composer-height to 400px when creating topic"
|
||||
);
|
||||
|
||||
|
@ -83,7 +83,7 @@ acceptance("Composer", function (needs) {
|
|||
await click(".toggle-fullscreen");
|
||||
assert.strictEqual(
|
||||
document.documentElement.style.getPropertyValue("--composer-height"),
|
||||
"400px",
|
||||
"var(--new-topic-composer-height, 400px)",
|
||||
"sets --composer-height back to 400px when composer is opened from draft mode"
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue