You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(UVE): Make computed be updated everytime the page asset changes (dotCMS#32140)
This pull request makes several updates to the `EditEmaEditorComponent`
and `withEditor` functions to clean up the code and improve
maintainability. The changes include removing commented-out code,
optimizing computed dependencies, and refining iframe URL generation
logic.
### Code cleanup:
* Removed a commented-out `console.log` statement from the
`EditEmaEditorComponent` to declutter the code and improve readability.
(`core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/edit-ema-editor.component.ts`)
### Optimization of computed dependencies:
* Updated the `$reloadEditorContent` computed property in `withEditor`
to directly use `store.isTraditionalPage()` instead of wrapping it with
`untracked`, simplifying the dependency logic.
(`core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/withEditor.ts`)
### Improvements to iframe URL generation:
* Added comments and logic in the `$iframeURL` computed property to
explicitly import `pageAPIResponse()` for dependency tracking, ensuring
updates occur when the API response changes. This adjustment improves
future maintainability and aligns with planned UVE improvements.
(`core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/withEditor.ts`)
* Refined the `$iframeURL` logic by removing outdated comments and
consolidating the `vanityURL` and `params.url` handling, ensuring
cleaner and more maintainable code.
(`core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/withEditor.ts`)
### Video
https://github.com/user-attachments/assets/6af1dc01-f1ab-4e0a-90fa-e54e644fdff4
---------
Co-authored-by: Jalinson Diaz <[email protected]>
0 commit comments