Let the composer own its own frame #244
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refactor/composer-owns-its-box"
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?
Step 3 of making the composer one reusable element. #240 made the three composers look the same by fixing the same numbers in three places; this removes the reason they could differ.
What moved
The frame around the editor was declared by each consumer:
ReplyComposer.wrapper(padding) + shared.field-boxComposeOverlayField.vuewith its own defaultNotesEditorMessageEditor's root is now the field box itself: the padding, the shared.field-boxlook, and the click-to-focus that makes the whole box behave like one input. A new#aboveslot takes what used to sit above the editor inside the frame - for the reply composer that is the drop overlay and the scheduled strip.What each consumer loses
ReplyComposer:.wrapperstays but only as behaviour - the drop target, the paste hook anddata-state. Its box declarations andhandleWrapperClickare gone. So ismin-height: 96px, which never bound: the box measures 113 to 131px.ComposeOverlay: no longer wraps the composer inField. It renders its own label above it, which is the two linesFieldcontributed beyond the frame.Field.vueis deleted. It had exactly one consumer and its whole job was the frame.Net 83 lines removed, 45 added.
What this does not do yet
NotesEditorstill builds its own Tiptap editor and its own frame. Bringing it ontoMessageEditoris the next step, and it is the only one with visible content consequences - notes headings render at 36px against 24px in the composers, and the mark set differs (dialect: 'notes'allows underline and highlight). That deserves its own review.Worth a look by eye
No gate asserts on any of this. Specifically:
[data-state='sending']).Verification
vue-tsc, eslint (0 errors), vitest 692 in 95 files,vite build. Box padding measured at 4px in Chromium on the built bundle.