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 merged 6 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 37s —— View job Code Review
Issues Found1.
|
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>. |
…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
…nd update related tests - Updated the maximum number of inline workflow actions from 3 to 4, enhancing the component's responsiveness on larger viewports. - Adjusted the logic in the component and tests to reflect the new cap, ensuring that overflow behavior is correctly implemented when actions exceed the inline limit. - Enhanced unit tests to validate the updated rendering logic and overflow menu functionality based on the new action cap. These changes improve the user experience by allowing more actions to be displayed inline, reducing the need for overflow menus on larger screens.
Legal RiskThe following dependencies were released under a license that RecommendationWhile merging is not directly blocked, it's best to pause and consider what it means to use this license before continuing. If you are unsure, reach out to your security team or Semgrep admin to address this issue. GPL-2.0 MPL-2.0 |
…toolbar (#35361) ## Summary - Re-introduces the `groupActions` input to `DotWorkflowActionsComponent` so the UVE toolbar can render workflow actions as a `p-splitButton` (classic split-button layout), while edit-content keeps the new responsive inline-buttons behaviour introduced in #35290. - When `groupActions=true`, actions are grouped by `SEPARATOR` entries and each group renders as a `p-splitButton` (main action + dropdown for sub-actions), exactly as it did before the refactor. - When `groupActions=false` (default), the new breakpoint-driven inline buttons + overflow menu behaviour is preserved. - Adds `[groupActions]="true"` back to `dot-uve-workflow-actions.component.html`. ## Root cause PR #35290 removed the `groupActions` input entirely when simplifying the component. The UVE toolbar relied on it to display a `p-splitButton` dropdown; without it, all workflow actions started rendering as flat inline buttons inside the UVE — breaking the expected UX. ## Changes | File | Change | |---|---| | `dot-workflow-actions.component.ts` | Re-added `groupActions` input; added `$groupedActions` computed signal and `SplitButtonModule` import | | `dot-workflow-actions.component.html` | Added `@if (groupActions())` branch that renders `p-splitButton` groups using `@let` locals and `?.` optional chaining, identical to the original pattern | | `dot-uve-workflow-actions.component.html` | Re-added `[groupActions]="true"` binding | | `dot-workflow-actions.component.spec.ts` | Added 8 tests covering the `groupActions=true` path (split-button rendering, sub-action model, `actionFired` emission, separator grouping, empty state) | ##VIDEO https://github.com/user-attachments/assets/ef7e3275-281e-4ac3-8655-6d80cbad6729 ## Test plan - [ ] Open the UVE and confirm workflow actions appear inside a `p-splitButton` dropdown as before - [ ] Open Edit Content and confirm workflow actions still render as inline buttons with the overflow menu - [ ] Run unit tests: `yarn nx test ui --testPathPattern=dot-workflow-actions` Closes #35034 --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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
This PR fixes: #35034