feat(edit-content): update command bar to show all workflow actions#35290
feat(edit-content): update command bar to show all workflow actions#35290adrianjm-dotCMS wants to merge 4 commits intomainfrom
Conversation
…p actions support - Updated the component to render actions as inline buttons, with a maximum of three visible at a time. - Introduced an overflow menu for additional actions, filtering out SEPARATOR actions. - Removed support for grouping actions by separator, streamlining the component's logic and improving clarity. - Adjusted the component's template and styles to reflect these changes, enhancing the user interface for action selection. This refactor aims to improve the usability and maintainability of the workflow actions component.
|
Claude finished @adrianjm-dotCMS's task in 2m 27s —— View job PR Review
4 issues worth fixing, 1 advisory. 1.
|
There was a problem hiding this comment.
Pull request overview
Updates the edit-content command bar workflow actions UI to make actions more discoverable by replacing the split-button approach with inline buttons plus an overflow menu, aligning with issue #35034’s UX goals.
Changes:
- Replaced
SplitButtongrouping with up to 3 inline workflow action buttons and ap-menuoverflow for additional actions. - Filtered out
SEPARATORworkflow actions prior to rendering. - Updated unit tests to cover inline rendering, overflow behavior, loading/disabled states, and sizing.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| core-web/libs/ui/src/lib/components/dot-workflow-actions/dot-workflow-actions.component.ts | Reworks component logic to computed-signal driven inline/overflow rendering; removes split-button/grouping logic. |
| core-web/libs/ui/src/lib/components/dot-workflow-actions/dot-workflow-actions.component.html | Implements empty state + inline buttons + overflow menu toggle UI. |
| core-web/libs/ui/src/lib/components/dot-workflow-actions/dot-workflow-actions.component.spec.ts | Replaces split-button tests with coverage for inline/overflow/variants/loading/disabled/size. |
| core-web/libs/edit-content/src/lib/components/dot-edit-content-form/dot-edit-content-form.component.html | Removes the now-deleted groupActions input usage when rendering <dot-workflow-actions>. |
core-web/libs/ui/src/lib/components/dot-workflow-actions/dot-workflow-actions.component.ts
Show resolved
Hide resolved
core-web/libs/ui/src/lib/components/dot-workflow-actions/dot-workflow-actions.component.ts
Show resolved
Hide resolved
core-web/libs/ui/src/lib/components/dot-workflow-actions/dot-workflow-actions.component.ts
Show resolved
Hide resolved
core-web/libs/ui/src/lib/components/dot-workflow-actions/dot-workflow-actions.component.html
Show resolved
Hide resolved
…ponent - Modified the test case to reflect the correct button variants for actions, ensuring that the third button is now rendered as 'outlined' instead of 'text'. - Updated the component's `getVariant` method to simplify the logic, returning 'outlined' for all actions beyond the first, enhancing clarity and consistency in button rendering. These changes improve the accuracy of the component's behavior and its associated tests.
…viewport breakpoints - Introduced a `BreakpointObserver` to dynamically adjust the number of inline buttons displayed based on the current viewport size, allowing for a responsive design. - Updated the component to derive the maximum number of visible inline actions (0-3) according to defined breakpoints (XSmall, Small, Medium, Large). - Enhanced unit tests to validate the new responsive behavior, ensuring correct button rendering in various viewport scenarios. These changes improve the user experience by adapting the action buttons to different screen sizes, enhancing usability across devices.
…proved visibility handling
| * CDK helper that listens to viewport media queries; used to derive {@link #inlineCap} | ||
| * without manual `matchMedia` subscriptions. | ||
| */ | ||
| readonly #breakpointObserver = inject(BreakpointObserver); |
Summary
Closes #35034 and #31321
dot-workflow-actionswith individual inline buttons, making all workflow actions discoverablep-menuwithappendTo="body")groupActionsandSplitButton— component is now purely computed-signal drivenIMAGES
BEFORE
NOW
Test plan
In this PR we are also closing the bug with long workflows names