chore(UVE): Enhance UX on Personalization workflow #31125
+175
−34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes to improve the functionality and user experience of the
dot-ema-editor
components, as well as updates to the tests to cover new scenarios. The most important changes include updates to theDotUveToolbarComponent
andEmaContentletToolsComponent
components, as well as modifications to the SCSS files and test cases.Component Updates:
dot-uve-toolbar.component.ts
: Added error handling for the personalization confirmation process. If the process fails, an error message is displayed, and the persona selector is reset.ema-contentlet-tools.component.ts
: Added a new input propertydisableDeleteButton
to control the state of the delete button. The button is disabled and shows a tooltip whendisableDeleteButton
is set.SCSS Updates:
dotcms-theme/components/_dialog.scss
: Changed theword-break
property frombreak-all
tobreak-word
for better text handling.dot-ema-shell.component.scss
: Removed unnecessary padding styles from the.p-dialog-footer
class.Test Updates:
dot-uve-toolbar.component.spec.ts
: Added new test cases to cover the error handling in the personalization process and the use of thepersonaEventMock
for consistent test data. [1] [2]ema-contentlet-tools.component.spec.ts
: Added test cases to verify the behavior of the delete button based on thedisableDeleteButton
input property.Store and Mock Updates:
models.ts
: AddeddisableDeleteButton
to theEditorProps
interface to support the new functionality in theEmaContentletToolsComponent
.withEditor.spec.ts
: Updated tests to include scenarios where thedisableDeleteButton
property is set based on the number of contents and the persona state. [1] [2]Screenshot
Screen.Recording.2025-01-15.at.2.30.59.PM.mov