Top Navigation bar is not aligned

When the Top Navigation Bar is center-aligned, the items are not perfectly aligned.



It looks like the alignment is taking the button into account: Add or edit links. The expectation is that it shouldn't.


Solution

The centered header now centers the navigation links under the logo without counting the “Add or edit links” button. A matching empty area balances the button on the left, link fitting reserves the button width on both sides, and horizontal padding is even. The non-centered layout is unchanged.

Root cause: SiteHeaderMenu included the owner-only edit button in the centered row even when invisible, pushing the links about 84px left of the logo. Uneven padding (8px left, 0 right) added a separate 4px shift.

PR: seed-hypermedia/seed#1505. Base: 83091458b2f324daf1304c8af24012de9869c34a (origin/main); fix: c34644fc7.

Verification reported by the coding agent: the new site-header-center.e2e.ts Playwright spec failed twice on unmodified code and passed twice with the fix. Three offsets improved from −83.86px, +4px and −111.86px to 0px, 0px and 0.01px. The final spec still fails all three cases against the original file. The existing header baseline test passes; UI, desktop and web typechecks pass; UI Vitest passes (178 files, 1,446 tests); Prettier was run.

Verification limits: screenshots show the real shared SiteHeader component in a browser test page, not the running Electron/full web app. Full-app visuals and agent-ci were not checked (no display, Docker or daemon). Chromium required temporary system libraries. The PR is ready for review, but a full-app visual check remains advisable before merging.

Before / After

Before — 1280px, hovered: links sit about 84px left of the logo center (red line) because the edit button is counted.

Before: centered layout hovered, links shifted left

After — 1280px, hovered: links are centered on the logo; the edit button remains to their right.

After: centered layout hovered, links aligned with logo

Before — idle: the invisible button still pushes the links left.

Before: idle navigation shifted left

After — idle: links remain centered.

After: idle navigation centered

Before — 900px, overflow: links are off-center when some items appear in the “more” menu.

Before: overflow navigation off-center

After — 900px, overflow: links and the “more” arrow are centered; the button is fully visible.

After: overflow navigation centered

Before — non-centered layout.

Before: non-centered layout

After — non-centered layout: unchanged; the images are byte-identical.

After: non-centered layout unchanged

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime

Attributes
Type
Bug
name
Top Navigation bar is not aligned
Owner
Status
Done
Priority
High
AgentThread
mcp:6f7a65ff-d97b-4b59-b071-9adced5fb928
Attributes schemaThe fields this document carries.
Inherited from the parent's children attributes schema
Fetching schema…