xiiui ← Update primary header actions to show label and replace outlined header action buttons by formfcw · Pull Request #27147 · directus/directus · GitHub
Skip to content

xiiui ← Update primary header actions to show label and replace outlined header action buttons#27147

Open
formfcw wants to merge 230 commits intofeat/twelve-uifrom
florian/cms-2143-update-primary-header-actions-to-show-label-and-replace
Open

xiiui ← Update primary header actions to show label and replace outlined header action buttons#27147
formfcw wants to merge 230 commits intofeat/twelve-uifrom
florian/cms-2143-update-primary-header-actions-to-show-label-and-replace

Conversation

@formfcw
Copy link
Copy Markdown
Contributor

@formfcw formfcw commented Apr 16, 2026

Scope

What's changed:

  • Primary header action buttons now show a visible :label instead of relying on v-tooltip.bottom — the label is responsive and collapses to icon-only at smaller breakpoints
  • PrivateViewHeaderBarActionButton auto-derives tooltip from label when in icon-only mode, eliminating redundant v-tooltip/:tooltip at every call site
  • Introduce headerBarInline provide/inject via use-header-bar.ts so action buttons in drawers use a simplified breakpoint (always icon-only below large)
  • Add secondary prop passthrough to PrivateViewHeaderBarActionButton
  • Replace outlined with ghost variant and swap clear icon for undo on discard/cancel buttons (dashboard, flow views)
  • Reorder dashboard edit-mode buttons: "Create Panel" (secondary) now comes before "Save"

Potential Risks / Drawbacks

Tested Scenarios

  • Primary action buttons show label at desktop widths, collapse to icon-only with auto-tooltip on smaller breakpoints
  • Drawer action buttons always show icon-only below large breakpoint (via headerBarInline)
  • Conditional tooltips (e.g. "not allowed") still appear when createAllowed === false
  • Ghost variant renders correctly on discard/cancel buttons in dashboard and flow views

Review Notes / Questions

  • Tooltip auto-derivation logic: the activeTooltip computed prefers explicit tooltip prop → falls back to label when icon-only → hides tooltip when label is visible. This is the core behavioral change — review carefully
  • "Convert conditional tooltips to only pass :tooltip for special cases" — the pattern is now :tooltip="createAllowed ? undefined : $t('not_allowed')" instead of the old v-tooltip.bottom="createAllowed ? $t('create_item') : $t('not_allowed')"
  • Dashboard button reorder: "Create Panel" is now secondary and comes before "Save" in the primary slot — intentional design change

Checklist

  • Added or updated tests
  • Documentation PR created here or not required
  • OpenAPI package PR created here or not required

Addresses CMS-2143

HZooly and others added 30 commits April 9, 2026 16:57
This ensures it matches the breakpoint.smallerOrEqual() calls
Review note: Build `pnpm --filter themes build`
@formfcw formfcw requested a review from AlexGaillard as a code owner April 16, 2026 14:18
@linear
Copy link
Copy Markdown

linear Bot commented Apr 16, 2026

@formfcw formfcw requested a review from alvarosabu April 16, 2026 14:25
formfcw added 20 commits April 16, 2026 16:29
…s-2113-update-design-of-importexport-import-background-checkbox
…ground-checkbox' into hugo/cms-2114-v-divider-icon-not-aligned-well
…cms-1928-add-and-implement-new-split-button-primary-header-button
…mary-header-button' into florian/cms-2143-update-primary-header-actions-to-show-label-and-replace
…ground-checkbox' into hugo/cms-2114-v-divider-icon-not-aligned-well
…cms-1928-add-and-implement-new-split-button-primary-header-button
…mary-header-button' into florian/cms-2143-update-primary-header-actions-to-show-label-and-replace
…cms-1928-add-and-implement-new-split-button-primary-header-button
…mary-header-button' into florian/cms-2143-update-primary-header-actions-to-show-label-and-replace
…cms-1928-add-and-implement-new-split-button-primary-header-button
…mary-header-button' into florian/cms-2143-update-primary-header-actions-to-show-label-and-replace
…mary-header-button' into florian/cms-2143-update-primary-header-actions-to-show-label-and-replace
Base automatically changed from florian/cms-1928-add-and-implement-new-split-button-primary-header-button to feat/twelve-ui April 16, 2026 14:35
Copy link
Copy Markdown
Contributor

@alvarosabu alvarosabu left a comment

Choose a reason for hiding this comment

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

LGTM  👍

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Question:
@formfcw is the label intentionally shorter here?

Copy link
Copy Markdown
Contributor

@robluton robluton left a comment

Choose a reason for hiding this comment

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

LGTM! 🎸

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.

4 participants