Skip to content

fix(ui): stretch NameBar in folder view flex column#2966

Open
cqnykamp wants to merge 1 commit into
Doenet:mainfrom
cqnykamp:fix/namebar-stretch-folder-view
Open

fix(ui): stretch NameBar in folder view flex column#2966
cqnykamp wants to merge 1 commit into
Doenet:mainfrom
cqnykamp:fix/namebar-stretch-folder-view

Conversation

@cqnykamp

@cqnykamp cqnykamp commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Problem

In the folder view page, the NameBar (gray title bar) collapsed to the width of its text instead of stretching to fill its row like it does on the editor page.

Fix

NameBar.tsx already set width: 100%, which stretched it inside the editor's <HStack> but not inside the folder view's <Flex flexDirection={{ base: "column", md: "row" }}> (parent doesn't constrain a definite width on the cross axis when its own width is content-driven). Added flex={1} to the outer Box (both read-only and editable branches) and the inner Editable so it fills available row/column space in both flex contexts.

Test plan

  • Existing NameBar.cy.tsx component tests still pass (15/15)
  • Visual check in folder view: NameBar fills the row
  • Visual check in editor: NameBar still looks right (no regression)

Note: I couldn't perform the visual checks in this sandbox — the dev MySQL container wasn't reachable from here, so I couldn't bring up the dev server. The change is minimal and isolated to one component; a quick local spin-up should confirm.

The NameBar's `width: 100%` was enough to stretch it inside the editor's
HStack parent, but not inside the folder view's `<Flex flexDirection={{
base: "column", md: "row" }}>`. Adding `flex={1}` to the outer Box (both
read-only and editable branches) and the Editable lets the NameBar fill
the available row/column space in both flex contexts.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant