A roomy typing surface for the new-message composer #251
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "roomier-new-message-editor"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The new-message window opened one line high and grew from there, which reads as
a reply box rather than a message window. Notes had made the opposite choice
since it was written, so the app was inconsistent about it.
On #210
Both of its premises are stale. It blames a
min-heightonField.vue's box andproposes flexing the editor to fill it. The override was already dropped before
the composer merged, and
Field.vueitself went in53f08cfwhenMessageEditortook over the frame - and the empty band under the toolbar went with it. Its
"Caution" about the shared component is likewise settled: both composers now
share one frame, so a change there is symmetric by construction.
What was left is the wish underneath: a compose window that opens with room to
type. That is what this does.
The rule
The height belongs on the typing surface, not on the box. Nothing inside the box
grows, so slack put there lands below the toolbar - which is exactly what #210
reported.
MessageEditortakes aminHeightprop that reaches.ProseMirrorthrough acustom property, defaulting to the
3remthe reply composer already had. Theprop passes intent, not CSS, so the frame stays owned by the component
(the point of
53f08cf).--composer-workspace-min-heightinbase.cssand both consumers read it.min-height: 140pxon its wrapper, which never bound. It isgone.
Measured on the built bundle
The three checks #210 asks for: no empty band under the toolbar; a click in the
lower band focuses the editor (
document.activeElementis the "Bericht" textbox,and
elementFromPoint8px above the bottom edge is the editor itself); the replycomposer is unchanged, since
3remwas already its literal value. New messageand notes now measure identically rather than approximately.
The unit test guards the wiring only - happy-dom does no layout, so it asserts
the prop reaches the box as a custom property, and says so in a comment. The
numbers above are the real check.
Not in this PR
Notes does not share
MessageEditor; it builds its own Tiptap editor and frame,reusing only
FormatToolbar,LinkBar,EmojiPickerand.composer-footer.Migrating it needs toolbar flags on
MessageEditor(showInsert,showAttach,showUnderline,showHighlight) and a mode without a send button. Worth doing;it would make the shared custom property redundant.
Closes #210