feat(edit-content): History sidebar redesign — card layout, version preview UX (#35888)#36171
Conversation
…review UX (#35888) - Restructure version card to flex-col with title+chip on row 1 and avatar+inode on row 2 - Ellipsis menu button now outlined+circular, visible only on hover or while menu is open - Inode identifier visible only on hover, aligned to the right of the username row - Separator added dynamically before the last menu item in the ellipsis menu - Move Restore/Close actions to a banner below the sidebar tabs when previewing a version - Replace Restore button in command bar with "Previewing <relative date>" indicator - Marker color for live versions now uses --p-primary-color design token Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Claude finished @adrianjm-dotCMS's task in 1m 0s —— View job Rollback Safety Analysis
Result: ✅ Safe To RollbackThis PR is pure frontend UI/UX changes with no backend structural risk. Analysis against every unsafe category:
Changed files are entirely Angular components ( Label |
❌ Codex Review failed —
|
…r history redesign - Add Language.properties key `edit.content.sidebar.history.previewing=Previewing` - Wire `| dm` pipe to Close and Restore buttons in the historical version banner - Use translation key for the Previewing label in the command bar - Fix form spec: replace broken `restore-historical-version-button` references with `previewing-label` (button moved to sidebar banner) - Update timeline-item spec: account for separator in menu item counts, add `$isMenuOpen` signal tests and separator placement tests - Add sidebar spec: 5 new tests for the historical version banner (visibility, Close, Restore, hide on exit) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…component - Adjusted comment formatting in `dot-edit-content-sidebar-history.component.ts` to ensure proper documentation style.
- Remove stray text-red-700! debug class from inode copy button - Restore p-avatar styleClass with leading-none classes for text avatars - Normalize data-testid casing in historical version banner (camelCase → lowercase) - Use [rounded]="true" binding instead of rounded="true" string on banner buttons Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…onent Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…-panel-history-updates
There was a problem hiding this comment.
Pull request overview
Updates the Edit Contentlet sidebar History experience to match the redesigned card layout and “historical version preview” UX described in issue #35888, including moving Restore/Close actions into a side-panel banner and adjusting the version action menu behavior.
Changes:
- Adds a historical-version banner in the sidebar (Close + Restore) and updates the command bar to show a “Previewing {relative date}” indicator.
- Refactors History timeline item layout (two-row card) and updates the ellipsis menu UI/behavior, including inserting a dynamic separator before the last menu item.
- Simplifies timeline marker styling (migrating version markers to PrimeNG marker classes and removing the History SCSS).
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| dotCMS/src/main/webapp/WEB-INF/messages/Language.properties | Adds i18n key for the new “Previewing” label. |
| core-web/libs/edit-content/src/lib/components/dot-edit-content-sidebar/dot-edit-content-sidebar.component.spec.ts | Adds tests for the historical-version banner behavior. |
| core-web/libs/edit-content/src/lib/components/dot-edit-content-sidebar/dot-edit-content-sidebar.component.html | Renders the historical-version banner (Close/Restore) when previewing a historical version. |
| core-web/libs/edit-content/src/lib/components/dot-edit-content-sidebar/components/dot-edit-content-sidebar-history/dot-edit-content-sidebar-history.component.ts | Removes SCSS usage and adjusts marker class computation for version markers. |
| core-web/libs/edit-content/src/lib/components/dot-edit-content-sidebar/components/dot-edit-content-sidebar-history/dot-edit-content-sidebar-history.component.scss | Removes timeline marker SCSS. |
| core-web/libs/edit-content/src/lib/components/dot-edit-content-sidebar/components/dot-edit-content-sidebar-history/dot-edit-content-sidebar-history.component.html | Switches version markers to PrimeNG marker element/class binding. |
| core-web/libs/edit-content/src/lib/components/dot-edit-content-sidebar/components/dot-edit-content-sidebar-history/components/dot-history-timeline-item/dot-history-timeline-item.component.ts | Tracks menu open state and inserts a separator before the last menu item. |
| core-web/libs/edit-content/src/lib/components/dot-edit-content-sidebar/components/dot-edit-content-sidebar-history/components/dot-history-timeline-item/dot-history-timeline-item.component.spec.ts | Updates menu item expectations for separators; adds tests for menu open state. |
| core-web/libs/edit-content/src/lib/components/dot-edit-content-sidebar/components/dot-edit-content-sidebar-history/components/dot-history-timeline-item/dot-history-timeline-item.component.html | Redesigns timeline item into a two-row card, hover-only inode + ellipsis, outlined circular ellipsis button. |
| core-web/libs/edit-content/src/lib/components/dot-edit-content-form/dot-edit-content-form.component.ts | Imports DotRelativeDatePipe to support the new preview indicator. |
| core-web/libs/edit-content/src/lib/components/dot-edit-content-form/dot-edit-content-form.component.spec.ts | Updates expectations from restore button to previewing label in historical mode. |
| core-web/libs/edit-content/src/lib/components/dot-edit-content-form/dot-edit-content-form.component.html | Replaces Restore button with “Previewing {relative date}” label in historical mode. |
Comments suppressed due to low confidence (1)
core-web/libs/edit-content/src/lib/components/dot-edit-content-sidebar/components/dot-edit-content-sidebar-history/dot-edit-content-sidebar-history.component.ts:44
styleUrlswas removed along with the component SCSS, but the template still renders the Push Publish marker as<span class="timeline-marker timeline-marker--default">(see dot-edit-content-sidebar-history.component.html:93-99). With no remaining.timeline-markerstyles in the codebase, that marker will have no size/visual styling and can disappear from the timeline.
providers: [DatePipe, DotMessagePipe],
templateUrl: './dot-edit-content-sidebar-history.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
host: {
class: 'flex flex-col h-full min-h-0'
}
Template-bound signals must be public; protected was an oversight flagged in code review. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
🤖 Bedrock Review —
|
…behavior - Refactored tests to verify visibility of the menu button wrapper based on the $isMenuOpen signal state. - Added assertions to check for 'opacity-100' when the menu is open and 'opacity-0' with 'group-hover:opacity-100' when closed.
- Added a compare version banner in the sidebar that displays when comparing content versions. - Introduced buttons for closing the compare view and restoring the historical version. - Updated the component template and styles for better UI consistency. - Enhanced tests to cover the new compare version functionality and its interactions. This update improves the user experience by allowing users to easily compare different versions of content and take appropriate actions.
…d layout - Reduced bottom padding in the history timeline item for a more compact appearance. - Updated class names to align with design standards, replacing `bg-white` with `bg-surface-50` for better visual consistency. - Tightened padding in the timeline list component to enhance the overall density of the layout. These changes contribute to a cleaner and more cohesive user interface in the edit content sidebar history section.
…r clarity - Revised comments in the DotHistoryTimelineItemComponent to clarify the conditions for version actions based on the version's status. - Updated the descriptions for "Working" and "Published" states to enhance understanding of available actions. These changes improve code readability and maintainability by providing clearer documentation on version status behavior.
Summary
Redesigns the History tab in the Edit Contentlet sidebar to align with the updated design spec (issue #35888).
bg-surface-50banner below the sidebar tabs; command bar now showsPreviewing <relative date>instead of the Restore buttonTest plan
Closes #35888
This PR fixes: #35888