fix(edit-content): position-based right-align for relationship last column - #36542
Conversation
…olumn The relationship field table hardcoded right-alignment (text-right!) to the status column type, assuming status is always the last data column. When the showFields field variable reordered columns (e.g. Status before Locales), the status chip was pushed to the right edge of a middle column and collided with the next column. Right-alignment is now bound to the last data column via the @for $last context, regardless of column type, so whichever column renders last hugs the action column. The default layout (title, language, status) is unchanged. Closes #36155
|
Claude finished @oidacra's task in 57s —— View job Code ReviewTodos
Reviewed the single changed file. The approach is sound: New Issues
Everything else looks correct — no logic, security, or convention issues. The |
|
Claude finished @oidacra's task in 30s —— View job Rollback-Safety Analysis
Result: Safe to rollback ✅ The change is confined to a single Angular template file: Label |
|
Tick the box to add this pull request to the merge queue (same as
|
What
Fixes the
showFieldscolumn-alignment bug in the new Edit Content Relationship field table.The table hardcoded right-alignment (
text-right!) to thestatuscolumn type, assumingstatusis always the last data column (flush against the+action column). When theshowFieldsfield variable reorders columns (e.g.Status, Localesinstead ofLocales, Status), the status chip was pushed to the right edge of a now-middle column and collided visually with the next column.How
Right-alignment is now positional instead of type-based: it is bound to the last data column via the
@for$lastcontext ([class.text-right!]="$last") on every column cell, in both the header and body templates. Whichever column renders last hugs the action column, regardless of its type.Uses the
[class.foo!]conditional-important syntax already established in the codebase (e.g.[class.bg-white!]in the locales sidebar selector).title, language, status) is visually unchanged —statusis still last, so it still right-aligns.showFieldsreordering, the last column right-aligns and the previously-misplacedtext-right!on a mid-table status column is gone.Scope
Template-only change. No TypeScript, SCSS, or store changes.
Acceptance criteria
showFieldsadding/reordering columns, the relationship field renders correctly — no misaligned chipsTesting
nx lint edit-content— passing (no new warnings)nx test edit-content --testPathPatterns=dot-relationship-field.component.spec— 12/12 passingCloses #36155