Skip to content

Show navbarCustomComponents in the sidebar on mobile#708

Merged
payamnj merged 1 commit into
masterfrom
feature/navbar-custom-components-mobile-sidebar
Jul 9, 2026
Merged

Show navbarCustomComponents in the sidebar on mobile#708
payamnj merged 1 commit into
masterfrom
feature/navbar-custom-components-mobile-sidebar

Conversation

@payamnj

@payamnj payamnj commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #707navbarCustomComponents were only rendered in the top AppBar with display: { xs: 'none', md: 'flex' }, so below the md breakpoint they simply disappeared with no fallback.

frontend/src/components/MenuBar.jsx:

  • Desktop (md+) AppBar rendering is unchanged.
  • Below md, each navbarCustomComponents entry now also renders as its own full-width row inside the sidebar Drawer.
  • Grouped together with the existing single-slot sidebarCustomComponent, both pinned to the bottom of the Drawer via one shared mt: 'auto' wrapper — navbarCustomComponents rows render above sidebarCustomComponent, which stays visually last, matching its current position/behavior exactly when navbarCustomComponents is empty.

No backend/context changes — navbarCustomComponents and its styleUrl/scriptUrl loading were already present in appContext; this is a frontend-only rendering change.

Test plan

  • npx vitest run — 249 passed (35 files), including 3 new/updated cases in MenuBar.test.jsx:
    • navbarCustomComponents render in both the AppBar and sidebar slots
    • sidebar copy of navbarCustomComponents appears before sidebarCustomComponent in DOM order
    • neither slot renders anything when both are empty (no stray empty wrapper)
  • Manual review of the flex-column layout: a single mt: 'auto' wrapper containing both blocks correctly pins the whole group to the bottom in either case (only navbarCustomComponents, only sidebarCustomComponent, both, or neither)

(Note: npm run lint currently fails repo-wide due to a pre-existing ESLint flat-config incompatibility unrelated to this change — confirmed by running it against master before these edits.)

Closes #707

🤖 Generated with Claude Code

Previously navbarCustomComponents were only rendered in the AppBar with
display: { xs: 'none', md: 'flex' } — hidden below md with no fallback,
so they simply disappeared on mobile. Desktop (md+) behavior is unchanged.

Below md, each component now also renders as its own row inside the
Drawer, grouped with the existing sidebarCustomComponent slot at the
bottom (both pinned together via a single mt: 'auto' wrapper), with
navbarCustomComponents rendering above sidebarCustomComponent.

Closes #707

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@payamnj payamnj merged commit 10e9a9a into master Jul 9, 2026
4 checks passed
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.

Show navbarCustomComponents in the sidebar on mobile instead of hiding them

1 participant