Task #514: Align note composer with folders rail
Original task: On the Notes page, the "اكتب ملاحظة" composer sat alone in a full-width row above the content row, while the "المجلدات" FoldersRail started in the row below it. The result was a visible vertical mismatch — composer high, rail noticeably lower with empty space between them. Change: Moved the top composer out of its standalone full-width block and into the left content column (`flex-1 min-w-0`) at the top of the existing row that already hosts the FoldersRail. Both now share the same row, so the composer's top edge aligns with the rail's top edge. Details: - Single edit in `artifacts/tx-os/src/pages/notes.tsx`. - The composer's `data-testid="notes-top-composer"` is preserved, so any existing E2E selectors continue to work. - `showTopComposer` gating (hide on Inbox/Sent/Archived/Shared-with-me) is unchanged — only the position of the rendered block moved. - Removed the old wrapper's `px-4 pt-1 max-w-6xl w-full mx-auto` (those paddings/centering are now provided by the parent row), and added a `mb-4` for breathing room between composer and the content below it inside the column. - Responsive behavior preserved: the parent row is `flex-col md:flex-row`, so on narrow widths the composer still stacks above the folders area cleanly with no horizontal overflow. Verification: pnpm tsc --noEmit on tx-os passes; no test files reference the composer block by structural selectors that the move would break. No deviations from the plan.
This commit is contained in:
@@ -773,19 +773,13 @@ export default function NotesPage() {
|
||||
the document so iOS Safari collapses the URL bar on scroll.
|
||||
The sticky header above keeps the controls pinned. */}
|
||||
<div className="flex-1 flex flex-col">
|
||||
{showTopComposer && (
|
||||
<div
|
||||
className="px-4 pt-1 max-w-6xl w-full mx-auto"
|
||||
data-testid="notes-top-composer"
|
||||
>
|
||||
<Composer
|
||||
labels={labels}
|
||||
folderSelection={folderSelection}
|
||||
onSend={(id) => setSendForNoteId(id)}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Task #514: composer moved INSIDE the main content column so it
|
||||
shares the same row (and same top edge) as the FoldersRail.
|
||||
Previously it was a standalone full-width block above this
|
||||
row, which made the rail visibly start lower than the
|
||||
composer. Hidden conditions (Inbox/Sent/Archived/Shared) are
|
||||
unchanged — see `showTopComposer`. */}
|
||||
<div className="flex-1 px-4 py-6 max-w-6xl w-full mx-auto flex flex-col md:flex-row gap-6">
|
||||
{showFolders && (
|
||||
<FoldersRail
|
||||
@@ -799,6 +793,15 @@ export default function NotesPage() {
|
||||
/>
|
||||
)}
|
||||
<div className="flex-1 min-w-0">
|
||||
{showTopComposer && (
|
||||
<div className="mb-4" data-testid="notes-top-composer">
|
||||
<Composer
|
||||
labels={labels}
|
||||
folderSelection={folderSelection}
|
||||
onSend={(id) => setSendForNoteId(id)}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{view === "active" && folderSelection.kind === "shared-folder" && (
|
||||
// Recipient view of a folder shared with the current user. Rendered
|
||||
// before the regular active branch so we never mount the Composer
|
||||
|
||||
Reference in New Issue
Block a user