Skip to content

fix(edit-content): side panel UX fixes for new Edit Contentlet mode#35671

Open
adrianjm-dotCMS wants to merge 9 commits into
mainfrom
issue-35535-side-panel-fixes-edit-contentlet
Open

fix(edit-content): side panel UX fixes for new Edit Contentlet mode#35671
adrianjm-dotCMS wants to merge 9 commits into
mainfrom
issue-35535-side-panel-fixes-edit-contentlet

Conversation

@adrianjm-dotCMS
Copy link
Copy Markdown
Member

@adrianjm-dotCMS adrianjm-dotCMS commented May 12, 2026

Closes #35535

Four UX improvements to the sidebar panel in the new Edit Contentlet mode.

  • Tab tooltips: Added tooltips to the sidebar tab icons (Information, History, Comments, Settings) so users can
    identify each tab without labels.
  • Copy button feedback: The identifier copy button now shows a "Copied" tooltip and switches to a checkmark icon immediately on click, without requiring a prior hover.
  • Status chip reuse: Replaced the local <p-tag> + ContentletStatusTagPipe with the shared
    <dot-contentlet-status-chip> component (already used in Content Drive). The old pipe has been deleted. The chip now also handles the null state, rendering a "New" badge for unsaved contentlets.
  • Untranslated locale dialog: The custom DotEditContentSidebarUntranslatedLocaleComponent has been removed and replaced with the shared DotBinaryOptionSelectorComponent. The dialog now shows locale-aware copy options (e.g. "Copy from English (US)" vs "Start from scratch") with a description text above the cards.

Summary

Screen.Recording.2026-05-12.at.3.32.51.PM.mov

Side panel UX improvements for the new Edit Contentlet mode:

  • Tab tooltips: Added pTooltip to sidebar tab icons (Information, History, Comments, Settings) so users know what each tab does.
  • Copy button tooltip on click: The copy-to-clipboard button now shows the "Copied" tooltip immediately on click, without requiring a prior hover. Icon also switches to a checkmark on success.
  • Status chip: Replaced <p-tag> + ContentletStatusTagPipe in the sidebar information panel with <dot-contentlet-status-chip> for consistent styling. Made hasLiveVersion optional in DotContentState to allow direct DotCMSContentlet assignment.
  • Untranslated locale dialog: Replaced the old DotEditContentSidebarUntranslatedLocaleComponent with the shared DotBinaryOptionSelectorComponent. The dialog now shows locale-specific copy (e.g. "Copy from en-US" vs "Start from scratch") and includes a description text. The old component has been deleted.

Changes

  • dot-edit-content-sidebar.component.html/ts — tab tooltips + TooltipModule
  • dot-copy-button.component.ts/html/spec.ts — programmatic tooltip show on click, dynamic icon
  • dot-edit-content-sidebar-information.component.ts/html — swap tag for status chip
  • dot-content-state.model.tshasLiveVersion made optional
  • locales.feature.ts — open DotBinaryOptionSelectorComponent directly with locale-aware copy
  • dot-binary-option-selector.component.ts/html — optional icon, optional description prop
  • dot-edit-content-sidebar-untranslated-locale/ — deleted (no longer used)
  • Language.properties — 4 new i18n keys for tab tooltips + updated untranslated locale keys

Test plan

  • Hover each sidebar tab icon — tooltip appears
  • Click the identifier copy button without hovering first — "Copied" tooltip shows immediately and icon changes to checkmark
  • Open a new (unsaved) content — sidebar info panel shows a "New" blue chip
  • Open an existing content — sidebar info panel shows the correct status chip (Published / Revision / Archived)
  • Switch to an untranslated locale — dialog opens with locale name in the option labels
  • Choose "Start from scratch" — form fields are empty
  • Choose "Copy from [locale]" — form fields pre-filled with original locale values

…state model

- Updated `DotContentState` model to make `hasLiveVersion` optional.
- Added tooltips to sidebar tabs in `dot-edit-content-sidebar.component.html` for better user guidance.
- Integrated `TooltipModule` in the sidebar component to support the new tooltip functionality.
- Replaced the status tag with a contentlet status chip in `dot-edit-content-sidebar-information.component.html` for improved visual representation.
- Updated tests to reflect changes in the sidebar component and its interactions.

This commit improves the user experience in the edit content sidebar by providing additional context through tooltips and enhancing the content state model.
…grate binary option selector

- Deleted the `DotEditContentSidebarUntranslatedLocaleComponent` and its associated HTML, SCSS, and spec files.
- Updated the `locales.feature.ts` to utilize `DotBinaryOptionSelectorComponent` for handling untranslated locales.
- Enhanced the language properties for better user guidance on untranslated content.
- Adjusted the binary option selector to include descriptions and improved handling of locale options.

This refactor streamlines the handling of untranslated locales by replacing the previous component with a more flexible binary option selector, improving the user experience in the edit content sidebar.
@claude

This comment was marked as resolved.

@github-actions github-actions Bot added Area : Backend PR changes Java/Maven backend code Area : Frontend PR changes Angular/TypeScript frontend code labels May 12, 2026
- Replace @ViewChild with viewChild() signal syntax in DotCopyButtonComponent
- Refactor copy state from string comparison to typed signal ('idle'|'copied'|'error')
- Fix setTimeout race on rapid clicks by storing and clearing the reset timer
- Add closeOnEscape: true to untranslated locale dialog
- Fix asymmetric country guard (countryCode instead of country) in locale label
- Add isoCode fallback to languageLabel; use languageLabel in both label and message
- Remove DotIsoCodePipe (no longer needed after using languageLabel)
- Add BinaryOptionDialogData interface to type DynamicDialogConfig.data contract
- Add satisfies BinaryOptionDialogData to dialog data for compile-time check
- Delete dead ContentletStatusTagPipe and its spec (no production usages)
- Add tests for optional description and optional icon in DotBinaryOptionSelectorComponent
- Add JSDoc to OPTION, BINARY_OPTION, BinaryOptionDialogData interfaces

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add DestroyRef.onDestroy cleanup for reset timer in DotCopyButtonComponent
- Change $resetTimer type to undefined (avoids clearTimeout(null) TS issue)
- Update BinaryOptionDialogData.description JSDoc to reflect that it accepts
  both i18n keys and pre-translated strings (consistent with label/message)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nce locale handling

- Simplified the rendering of the contentlet status chip in the sidebar component by removing unnecessary conditional checks.
- Updated the `DotContentletStatusChipComponent` to handle null states more gracefully, displaying a default "New" status when no state is provided.
- Enhanced the locale feature to return null if the current locale is not set, preventing potential errors in locale-dependent functionality.

These changes improve the clarity and reliability of the contentlet status display and locale management in the edit content sidebar.
…hLocale

The null guard added to switchLocale requires currentLocale to be
populated, which only happens after flushEffects() runs the onInit
effect. Replace tick() with flushEffects() in the two untranslated
locale tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@adrianjm-dotCMS adrianjm-dotCMS marked this pull request as ready for review May 14, 2026 18:16
- Updated the `BinaryOptionDialogData.description` JSDoc to clarify that it accepts i18n keys rendered via the dm pipe.
- Refactored the `DotContentletStatusChipComponent` to utilize the dm pipe for the "New" label, improving localization support.
- Adjusted the `DotCopyButtonComponent` to use a static icon instead of a computed property for better performance and clarity in tooltip behavior.

These changes improve the localization handling and performance of the UI components.
- Added a `data-testid` attribute to the description paragraph in the `DotBinaryOptionSelectorComponent` template for improved testability.
- Updated corresponding unit tests to query the description using the new `data-testid` selector.

These changes enhance the component's testability and maintainability.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI: Safe To Rollback Area : Backend PR changes Java/Maven backend code Area : Frontend PR changes Angular/TypeScript frontend code

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Side Panel fixes in new Edit Contentlet mode: tab tooltips, copy ID feedback, chip consistency, dialog copy

2 participants