Address #121 review: keep sign-out reachable, dvh peek, exact height
Build image / build-and-push (push) Successful in 12s
Build image / build-and-push (push) Successful in 12s
- Fold the account menu into the editor's mobile strip. Hiding the global header removed the only sign-out on mobile in the editor; the strip now carries it, so the space win stays but sign-out is one tap away. - EditorRail peek cap vh → dvh, matching the dvh-bounded editor column, so it can't overrun the visible viewport and push the mode bar off-screen. - Mobile editor height 4rem → 3rem: with the header hidden, only <main>'s py-6 (3rem) is outside the editor, so 4rem left ~16px dead. Comment corrected. - Trim two comments that duplicated nearby docs. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01H3zbym8Doka2d7D48maSgZ
This commit is contained in:
@@ -43,11 +43,10 @@ export function AppShell() {
|
||||
// max-w-5xl reading measure the other pages use (#107).
|
||||
const canvasRoute = inEditor || inPublicGarden
|
||||
const showBottomNav = !!user && !canvasRoute
|
||||
// On a phone the editor is a full-screen canvas — the same reason the bottom
|
||||
// bar hides there. The global top bar (brand + account) is then pure chrome
|
||||
// above the garden, so hide it too and let the editor's own strip carry a back
|
||||
// affordance; desktop keeps the header. Only the editor, not the public view,
|
||||
// which has no strip of its own to fall back on.
|
||||
// On a phone the editor is a full-screen canvas, so the global top bar is pure
|
||||
// chrome above the garden — hide it and let the editor's own strip carry the
|
||||
// back link AND the account menu (so sign-out isn't lost). Editor only, not the
|
||||
// public view, which has no strip of its own to fall back on.
|
||||
const hideHeaderOnMobile = inEditor
|
||||
|
||||
const visibleSections = sections.filter((s) => !s.adminOnly || user?.isAdmin)
|
||||
@@ -126,8 +125,10 @@ export function AppShell() {
|
||||
}
|
||||
|
||||
/** Account control: a compact button that toggles a small sign-out popover. On
|
||||
* desktop the display name shows inline; on mobile it lives inside the popover. */
|
||||
function AccountMenu({ displayName }: { displayName: string }) {
|
||||
* desktop the display name shows inline; on mobile it lives inside the popover.
|
||||
* Exported so the editor's mobile strip can carry it — the global header that
|
||||
* normally hosts it is hidden there (see hideHeaderOnMobile). */
|
||||
export function AccountMenu({ displayName }: { displayName: string }) {
|
||||
const logout = useLogout()
|
||||
const navigate = useNavigate()
|
||||
const [open, setOpen] = useState(false)
|
||||
|
||||
Reference in New Issue
Block a user