-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(uve): Add Persona Selector to New Toolbar (#30856)
This pull request introduces several enhancements to the `dot-uve-toolbar` component, focusing on improving persona management and adding new services. The most significant changes include the integration of a persona selector component, updates to handle persona selection and despersonalization, and modifications to the state management for persona properties. This PR also fixes a found issue, where every time we deleted content from a page for a specific persona, there were cases where the content was being save for the default persona, messing up with the page for the default persona. ## Before the fix https://github.com/user-attachments/assets/ee61e3fe-9b0e-42b4-96ab-2045a8828573 ## After the fix https://github.com/user-attachments/assets/442279c4-1bb0-4e1e-8792-0b944d673c57 Enhancements to persona management: * [`core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/components/dot-uve-toolbar/dot-uve-toolbar.component.html`](diffhunk://#diff-9937556e73b051b878ba22ad1ce971a70019a617d7979b3e0bcc814801ad350bL41-R48): Replaced the static persona selector span with the `dot-edit-ema-persona-selector` component, adding event bindings for persona selection and despersonalization. * [`core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/components/dot-uve-toolbar/dot-uve-toolbar.component.ts`](diffhunk://#diff-217a9e619d6590c4f652e85353b9637ba5e464ddeb0424be35aef39bb8dceb30L2-R16): Added imports for `DotPersonalizeService` and `DotPersona`, included the `EditEmaPersonaSelectorComponent` in the component declarations, and introduced methods `onPersonaSelected` and `onDespersonalize` to handle persona-related actions. [[1]](diffhunk://#diff-217a9e619d6590c4f652e85353b9637ba5e464ddeb0424be35aef39bb8dceb30L2-R16) [[2]](diffhunk://#diff-217a9e619d6590c4f652e85353b9637ba5e464ddeb0424be35aef39bb8dceb30R27-R47) [[3]](diffhunk://#diff-217a9e619d6590c4f652e85353b9637ba5e464ddeb0424be35aef39bb8dceb30R60-R128) State management updates: * [`core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/models.ts`](diffhunk://#diff-a5d9d93bd678484a7d776d09685fcb638de6d969ac141586a1104ba5e744556bL131-L134): Removed the `personaSelector` property from `UVEToolbarProps` and created a new `PersonaSelectorProps` interface. [[1]](diffhunk://#diff-a5d9d93bd678484a7d776d09685fcb638de6d969ac141586a1104ba5e744556bL131-L134) [[2]](diffhunk://#diff-a5d9d93bd678484a7d776d09685fcb638de6d969ac141586a1104ba5e744556bR140-R144) * [`core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/toolbar/withUVEToolbar.ts`](diffhunk://#diff-e6d3fb6319626fa85a4fc6894b57935843713366be593de6dd1dc5ed68bf6afcL25-R25): Updated the state management to include a computed `$personaSelector` property that returns the current persona selector properties. [[1]](diffhunk://#diff-e6d3fb6319626fa85a4fc6894b57935843713366be593de6dd1dc5ed68bf6afcL25-R25) [[2]](diffhunk://#diff-e6d3fb6319626fa85a4fc6894b57935843713366be593de6dd1dc5ed68bf6afcL112-R123) * [`core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/toolbar/withUVEToolbar.spec.ts`](diffhunk://#diff-7a5de702ac1dc81304f4c31816f5c0363aa56141f8afa583a87856e7a0d8482dR11): Added a test case to verify the persona selector properties in the store. [[1]](diffhunk://#diff-7a5de702ac1dc81304f4c31816f5c0363aa56141f8afa583a87856e7a0d8482dR11) [[2]](diffhunk://#diff-7a5de702ac1dc81304f4c31816f5c0363aa56141f8afa583a87856e7a0d8482dL50) [[3]](diffhunk://#diff-7a5de702ac1dc81304f4c31816f5c0363aa56141f8afa583a87856e7a0d8482dR82-R88)
- Loading branch information
Showing
11 changed files
with
253 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.