Desktop navigation and header customization - #80
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds user-selectable navigation and header styles, and reworks the desktop
header so page chrome sits on the same grid as page content.
The app's chrome was a mobile layout stretched to desktop width: a full-bleed
title bar with ~1100px of dead space, a thumb-reach bottom pill, and a search
icon where a search field would fit. This branch makes the chrome
configurable and adds a desktop-shaped option, then aligns everything to one
content column.
Navigation
Six nav styles (bottom bar, bottom bar with labels, floating dock, sidebar,
floating sidebar, inside-header), plus side, placement, and drag-to-reorder
nav items. All configured under Settings → Customization → Navigation.
Sidebar styles anchor Settings to the bottom edge by default, which is what
stops a five-item rail from reading as an empty column. That anchor is a
default only: if you place Settings yourself in the items editor, it renders
where you put it. Same for Create.
Below 1024px, sidebar and inside-header fall back to bottom bar and floating
sidebar falls back to dock, so mobile only ever sees the three horizontal
styles.
In-page header
A fourth header style, In page, for desktop at ≥1024px. On Chats, Groups,
and Library the fixed chrome bar is replaced by a header inside the content
column: large title, a real search field that filters the list, and actions
on the same baseline. It pins to the top and condenses on scroll.
Discovery adopts the same component, replacing three hand-rolled bars
(
DiscoveryPage,DiscoveryBrowsePage, and the toolbar row). Library'sfilter chips move into it too.
/discover/searchkeeps its own bar — it's amobile-only route with a different interaction model.
Alignment
The recurring bug was chrome and content using different containment models.
Every header now derives its position from the same CSS vars the content
container pads by (
--appnav-w/--appnav-wr) and shares one columnconstant, so they can't drift.
Verified against a replica of the real DOM across every var combination the
nav components publish — bottom/dock, sidebar left, sidebar right, floating
sidebar, and discovery-with-TopNav — at 1024 / 1280 / 1440 / 1920 / 2560.
Left and right edges match the cards in every cell.
The floating pill no longer stretches to the window. At 2560 it was 881px
wider than the content it sat above; it's now capped to the column and
centered, so its edges align with the cards.
Notes
select it.
pageHeader.*strings are English-only; other locales fall backthrough the existing
DeepPartialpattern.TopNavnow resets--topnav-hto0pxon unmount, so the dock andsidebar no longer anchor off a stale value on routes without a top nav.
ImageLibraryPage.tsx:304passes a non-scrollingelement to the virtualizer as
getScrollElement. Surfaced while debuggingthe header, pre-existing on main.
Testing
bun run checkpasses. There is no test suite in this repo, so verificationwas typecheck + cargo check, headless-browser geometry measurements against a
replica of the real DOM nesting, and manual passes on Linux/WebKitGTK.
Right-side sidebar has been measured but not eyeballed in a real build.