Skip to content

refactor(ui): consolidate navbar icons into settings dropdown#2015

Open
kasiazjc wants to merge 5 commits into
mainfrom
feature-navbar-settings-dropdown
Open

refactor(ui): consolidate navbar icons into settings dropdown#2015
kasiazjc wants to merge 5 commits into
mainfrom
feature-navbar-settings-dropdown

Conversation

@kasiazjc

@kasiazjc kasiazjc commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Context / Problem

The navbar had accumulated a row of standalone icon buttons over time (Live Events, Knowledge, Documentation, Theme, Settings) alongside search and the user menu. Most of these are setup/reference actions that get used heavily while a workspace is being configured, then rarely afterward — but they were permanently taking up navbar real estate regardless of how often they're actually used. The navbar was visibly cluttered as a result (see board discussion).

Goal

Reduce visual clutter without removing access to anything: fold the low-frequency, non-essential icons into a single entry point (the settings gear), while leaving the user avatar menu — which people reach for constantly — exactly where it is.

Summary

  • Navbar gear dropdown contains: Live Events (when enabled) → divider → Knowledge Base, Documentation, Theme (cascading submenu) → divider → Settings. Knowledge Settings is no longer in this dropdown — it's accessible only from the Knowledge page itself.
  • Knowledge page header replaces the SettingsDropdown (which had Documentation, Theme, and admin-gated Knowledge Settings) with a single admin-gated "Knowledge Base Settings" button that opens the settings modal directly. Documentation and Theme are intentionally removed from this page — the back-arrow leads to the main app where the navbar covers both.
  • Dead code removed: the ?settings=1 deep-link plumbing (shouldAutoOpenKnowledgeSettings, its useEffect watcher, and related tests) is deleted — nothing navigates to /knowledge?settings=1 anymore.
  • Shared SettingsDropdown component stays in place for AppHeader; KnowledgePage no longer imports it.
  • Standalone comments icon was removed earlier in this PR — comments remain accessible via the BoardTeammatePanel sidebar.

Follows frontend guidelines: uses vanilla AntD Dropdown + Menu items, Button + Tooltip, theme.useToken() for sizing, no new CSS files, no .ant-* overrides.

Test plan

  • TypeScript compiles cleanly (tsc --noEmit)
  • Biome lint passes on all touched files
  • All AppHeader tests pass (unit + re-render isolation)
  • KnowledgePage routing tests pass
  • Full monorepo build + typecheck passes (--filter='!@agor/docs')
  • Visual: navbar gear dropdown shows Live Events / Knowledge Base / Documentation / Theme / Settings — no Knowledge Settings item
  • Theme submenu cascades open; selecting an option changes the theme
  • Knowledge page header: admin sees a single gear button → opens Knowledge Base Settings modal directly
  • Knowledge page header: non-admin sees no gear button
  • Comments still reachable via the collapsible BoardTeammatePanel sidebar

🤖 Generated with Claude Code

kasiazjc and others added 5 commits July 24, 2026 12:18
… comments icon

Group Live Events, Knowledge, Documentation, Theme, and Settings into
a single gear-icon dropdown. Theme entry opens a cascading submenu
reusing ThemeContext logic. Remove standalone comments icon (reachable
via the BoardTeammatePanel sidebar). User avatar dropdown untouched.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… items

Review found the settings-dropdown consolidation lost modifier-click
(cmd/ctrl/middle-click open-in-new-tab) behavior on Knowledge and
Documentation by swapping real anchors for onClick handlers. Render
them as anchors inside the menu item label again, reusing the
original modifier-key-aware handler for Knowledge. Also tighten
themeMode from string to the real ThemeMode union, and add coverage
for the theme submenu, event stream, settings, and modified-click
paths.

Co-Authored-By: Claude <noreply@anthropic.com>
MarketingScreenshotPage and MarketingVideoPage still passed
currentBoardName/currentBoardIcon/unreadCommentsCount/hasUserMentions,
which AppHeaderProps no longer declares after the settings-dropdown
consolidation. CI's monorepo typecheck caught it; the narrow AppHeader
test files run locally did not.

Co-Authored-By: Claude <noreply@anthropic.com>
…gsDropdown

Replace the group-header Knowledge section with flat "Knowledge Base" /
"Knowledge Settings" items separated by dividers.  Extract the gear-icon
dropdown into a shared SettingsDropdown component and reuse it on the
Knowledge page header, consolidating the standalone Documentation,
ThemeSwitcher, and admin-gated settings gear into a single dropdown.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…gePage header

Remove the Knowledge Settings item from AppHeader's gear dropdown — it's
now accessible only via the Knowledge page's own admin-gated settings
button. Replace KnowledgePage's SettingsDropdown with a single Tooltip'd
Button for direct access. Remove the ?settings=1 deep-link plumbing
(shouldAutoOpenKnowledgeSettings, the useEffect watcher, and its tests)
since nothing navigates there anymore.

Co-Authored-By: Claude Opus 4.6 <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