Skip to content

feat(toolbar): use icon-only buttons where the icon is clear - #468

Open
Dhruv-Sharma29 wants to merge 1 commit into
petertzy:mainfrom
Dhruv-Sharma29:feat/compact-toolbar
Open

Dhruv-Sharma29 wants to merge 1 commit into
petertzy:mainfrom
Dhruv-Sharma29:feat/compact-toolbar

Conversation

@Dhruv-Sharma29

Copy link
Copy Markdown
Contributor

Closes #457

Problem

At ordinary window widths (~800px), the toolbar's buttons were so crowded that their labels wrapped under their icons.

Changes

Icons only: Open file 📂, Open project folder 🗂️, Save 💾, Open in browser 🌐, Focus Mode 🧠, Preview 👁, AI Assistant 🤖, Citations 📚, Publication 📝. Dark mode was already icon-only.

Text kept:

  • The export formats (HTML / PDF / DOCX), because the format name is the information.
  • Font:, A- / A+ and the font-size field.
  • The contextual Show in Finder button, which only appears after an export.

Usability and accessibility

  • Every icon-only button has a descriptive tooltip and an aria-label. The emoji itself is aria-hidden.
  • Tooltips show each button's shortcut, read from the shared shortcut table (DEFAULT_SHORTCUTS), so they are correct on each platform. Before, Save's tooltip said "Ctrl+S" on macOS too.
  • Toggle buttons (Focus, Preview, AI, Cite, Publication) expose aria-pressed and share one active style. The Publication button no longer has its own styling, which included a broken dark: class.
  • Project now uses its own icon (🗂️), so it no longer looks like Show in Finder (📁).

Layout

  • Icon buttons share a minimum width, and the dividers and spacing are consistent.
  • A small IconButton component replaces nine copies of the same button markup, so a future button is one line.
  • flex-wrap: on narrow windows the toolbar moves to a second row instead of overflowing or hiding buttons.

Docs

  • docs/UserGuide.md gets a Toolbar section: a table of each icon, its name and what it does.
  • References to the old button names in the user guide and workflow docs now use the new names.

Testing

  • npm test, npx tsc --noEmit, npm run lint, npm run build all pass.
  • Checked in the dev build:
    • at 800px the toolbar fits on one row (before, the labels wrapped);
    • at 560px it wraps onto a second row with every control reachable;
    • the tooltips, accessible names and aria-pressed states are correct.

This branch is independent of #467 and merges cleanly with it. Once #467 lands, the Focus, Preview and Open-project tooltips will also show their new shortcuts, because the tooltips look shortcuts up by id.

The toolbar wrapped button labels onto a second line at ordinary window
widths. Open, Project, Save, Browser, Focus, Preview, AI, Cite and
Publication now show only their icon. Export formats (HTML, PDF, DOCX)
and the font-size controls keep their text.

- Each icon-only button has a tooltip and an aria-label. The tooltip
  shows the button's shortcut, read from the shared shortcut table, so
  it is correct on each platform (Save used to say Ctrl+S on macOS).
- Toggle buttons expose aria-pressed and share one active style. The
  Publication button no longer has its own styling.
- Project uses its own icon so it no longer looks like Show in Finder.
- The toolbar wraps onto a second row in narrow windows instead of
  overflowing.
- Add a toolbar reference to the user guide, and point the docs at the
  new button names.

Closes petertzy#457
Copilot AI balanced review requested due to automatic review settings November 6, 2026 08:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@petertzy
petertzy requested a review from lwu1822 November 6, 2026 11:18

This branch has not been deployed

No deployments
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.

Optimize Editor Toolbar by Removing Redundant Text Labels While Preserving Essential Text

2 participants