fix(edit-content): category field button styles, clear-all & chip alignment - #36438
Conversation
…nment & X position (#36379) - Apply is primary / Cancel is tertiary (text + secondary) in the "Select categories" dialog, matching the convention used in other recent dialogs. - Select button on the category field is now primary. - Added a field-level "Clear all" so users can remove every selected category without opening the dialog; the field value auto-empties via the existing selected-categories effect. - Fixed chips centering on wrap (justify-center -> justify-start). - Moved the chip remove ("X") icon to the left of the label app-wide via a theme-level flexbox order rule, since PrimeNG's Chip template has no input to reorder it. This also propagates to the Tags field, whose multi-value tokens render as p-chip internally. - Vertically centered the Tags field remove icon to match Category's chip markup (unrelated visual inconsistency spotted while comparing both chip implementations). Also removes a duplicated FEATURE_FLAG_LOCALE_SELECTOR_V2 line in dotmarketing-config.properties (unrelated one-line cleanup). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Claude finished @adrianjm-dotCMS's task in 3m 39s —— View job Rollback-Safety Analysis
Files changed (11): all in
No Verdict: ✅ Safe to roll back. Label |
🤖 dotBot Review (Bedrock)Reviewed 11 file(s); 7 candidate(s) → 3 confirmed, 0 uncertain (unverified, kept for review). Confirmed findings
us.deepseek.r1-v1:0 · Run: #28814552873 · tokens: in: 77671 · out: 15187 · total: 92858 · calls: 27 · est. ~$0.187 |
… & chip alignment Adds unit coverage for the behavior added in the previous commit: - Field-level "Clear all" button renders only with selections, clears the store and emits an empty value, invokes clearAllSelected() on click. - Select button no longer carries secondary/text classes (primary). - Dialog's Cancel/Apply render as tertiary (text+secondary) / primary respectively, asserted via the Button component instance rather than CSS class strings. - Chips container uses justify-start instead of justify-center. Skips unit-testing the chip remove-icon `order: -1` CSS rule itself, since it's a global theme.config.ts rule jsdom doesn't apply — not meaningfully testable without a visual/e2e check. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…nent Rearranges the class order in the category field chips component's HTML to improve alignment. The `justify-start` class is now positioned after `flex-wrap` for better readability and consistency with other components. This change enhances the layout without altering functionality.
|
Tick the box to add this pull request to the merge queue (same as
|
Summary
Closes #36379
[text]="true" severity="secondary"), matching the convention used in other recent dialogs (e.g. image-editor-footer, ai-content-dialog). The dialog's existing "Clear all" is untouched.data-testId="clear-all-btn") so users can clear all selected categories without opening the dialog — the field value auto-empties via the existingstore.selected()effect, no extra wiring needed.justify-center→justify-start).Chiptemplate has no input to reorder it, so it's applied as a flexboxorder: -1rule on.p-chip-remove-iconat the theme level (theme.config.ts), app-wide. DOM/tab order is unaffected, only the visual order changes.p-autoCompletemulti-value tokens render as realp-chipinstances internally, so the theme-level fix already applies there with no extra code.FEATURE_FLAG_LOCALE_SELECTOR_V2line indotmarketing-config.properties.Images
Unit tests added
dot-category-field.component.spec.ts:Clear allbutton renders only with selections, invokesclearAllSelected()on click, clears the store and emits an empty value via the CVAonChangecallback,Selectbutton no longer carries secondary/text classes.dot-category-field-dialog.component.spec.ts: Cancel/Apply render as tertiary (text+secondary) / primary respectively (asserted on theButtoncomponent instance, not CSS strings).dot-category-field-chips.component.spec.ts: chip container usesjustify-startinstead ofjustify-center.order: -1rule — it's a globaltheme.config.tsCSS rule that jsdom doesn't apply, so a unit test would be a false positive. Verify visually.Test plan
This PR fixes: #36379