Skip to content

feat: icon-only Export and Share in the editor top bar - #368

Merged
vibhavkatre merged 1 commit into
mainfrom
feat/navbar-icon-only-229
Aug 9, 2026
Merged

feat: icon-only Export and Share in the editor top bar#368
vibhavkatre merged 1 commit into
mainfrom
feat/navbar-icon-only-229

Conversation

@vibhavkatre

Copy link
Copy Markdown
Collaborator

Export and Share showed an icon and a text label. Both are now icon only.

What changed

All four controls in the top bar right cluster are now ghost icon buttons of one
size, so the row reads as one set:

Before After
Export outlined, icon + text, 82px ghost, icon only, 28px
Comments ghost, icon only, 28px unchanged, declared like its neighbours
Share outlined, icon + text, 78px ghost, icon only, 28px
"..." outlined, icon only, 34px ghost, icon only, 28px

Removing the text exposed a row that did not hold together. Comments was already
borderless while the other three were outlined, and "..." rendered 6px wider
because it wrapped a plain span instead of the Button icon slot.

Accessible names

The visible text was the accessible name. Each button now sets label, which
frappe-ui Button renders as aria-label, and tooltip. An icon with neither is
unidentifiable.

This also restores an accessible name that was never applied. A plain
aria-label attribute on frappe-ui Button is discarded: Button spreads the
inherited attributes, then writes 'aria-label': props.label over them, so an
unset label prop overwrites the attribute with undefined. The "..." and
Comments buttons both used that attribute, and both reported no accessible name
at all. This is one case of #176.

Verification

Built and driven live in the editor at 1280, 1366, 1440, 1512, 1600, 1680 and
1920 (1280 is the supported minimum). The cluster content drops from 246px to
142px. Each button keeps its accessible name, gains a tooltip on hover, and
still opens what it opened before: the export menu, the overflow menu, the
sharing dialog and the comments panel.

  • yarn test — 858 pass, including 18 new checks in navbarActions.test.js
  • yarn build — clean
  • E2E — the specs that locate these by role and name needed no change

The E2E suite has two pre-existing failures in sharing.spec.js, on changing a
member level and on removing a member. They reproduce identically on unmodified
main in the same environment, and CI is green on main, so they are local to
this bench. They match the root cause described in #194.

Closes #229

Export and Share showed an icon and a text label. Both are now icon
only, which frees about 104px in the right cluster of the top bar.

The removal exposed a row that did not hold together. Comments was
already a borderless ghost button. Export, Share and the "..." button
were outlined, and "..." rendered 6px wider than the others, because it
wrapped a plain span instead of the Button icon slot. All four are now
ghost icon buttons of one size, so the row reads as one set.

The visible text was the accessible name. Each button now sets `label`,
which frappe-ui Button renders as aria-label, and `tooltip`. An icon
with neither is unidentifiable. The E2E specs find these buttons by role
and name, so those specs needed no change.

This also restores an accessible name that was never applied. A plain
`aria-label` attribute on frappe-ui Button is discarded. Button spreads
the inherited attributes, then writes `'aria-label': props.label` over
them, so an unset `label` prop overwrites the attribute with undefined.
The "..." and Comments buttons both used that attribute, and both
reported no accessible name at all. This is one case of #176.

Measured live in the editor at 1280, 1366, 1440, 1512, 1600, 1680 and
1920: the cluster content drops from 246px to 142px.

Closes #229

Co-authored-by: Vibhav Katre <vibhav@frappe.io>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
@vibhavkatre
vibhavkatre merged commit 8e04cc3 into main Aug 9, 2026
3 checks passed
@vibhavkatre
vibhavkatre deleted the feat/navbar-icon-only-229 branch August 9, 2026 16:05
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.

[Navbar][Enhancement] Remove text labels from Export and Share buttons

2 participants