Skip to content

feat(Style Editor): Implement Style Editor Sidenav Trigger in UVE#34027

Merged
rjvelazco merged 25 commits intomainfrom
issue-33997-task-implement-style-editor-sidenav-trigger-in-uve
Dec 10, 2025
Merged

feat(Style Editor): Implement Style Editor Sidenav Trigger in UVE#34027
rjvelazco merged 25 commits intomainfrom
issue-33997-task-implement-style-editor-sidenav-trigger-in-uve

Conversation

@rjvelazco
Copy link
Contributor

@rjvelazco rjvelazco commented Dec 5, 2025

Video

video.mov

This PR fixes: #33997

This PR fixes: #33997

@rjvelazco rjvelazco linked an issue Dec 5, 2025 that may be closed by this pull request
1 task
@rjvelazco rjvelazco changed the title Issue 33997 task implement style editor sidenav trigger in uve feat(Style Editor): Implement Style Editor Sidenav Trigger in UVE Dec 5, 2025
@rjvelazco rjvelazco marked this pull request as draft December 5, 2025 15:40
@semgrep-code-dotcms-test
Copy link

Semgrep found 2 ssc-1401e86e-5347-4e09-9335-667e8dfa5deb findings:

  • core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/edit-ema-editor.component.ts
  • core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/components/dot-uve-palette/dot-uve-palette.component.spec.ts

Risk: Affected versions of @angular/compiler are vulnerable to Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'). A stored XSS vulnerability in the Angular Template Compiler arises because its internal security schema doesn't classify certain URL‐ holding attributes (e.g. xlink:href, math|href, annotation|href) or the attributeName binding on SVG animation elements (<animate>, <set>, etc.) as requiring strict URL sanitization. An attacker who can supply untrusted input to template bindings like [attr.xlink:href] or <animate [attributeName]="'href'" [values]="maliciousURL"> can inject a javascript: URL payload. When the element is activated (e.g. clicked) or the animation runs, the malicious script executes in the application's origin, enabling session hijacking, data exfiltration, or unauthorized actions.

Manual Review Advice: A vulnerability from this advisory is reachable if you allow SVG/MathML attributes (e.g., xlink:href, href) or to the attributeName field of SVG animation tags (, , etc.) in HTML templates

Fix: Upgrade this library to at least version 20.3.15 at core/core-web/yarn.lock:557.

Reference(s): GHSA-v4hv-rgfq-gp49, CVE-2025-66412

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

@rjvelazco rjvelazco marked this pull request as ready for review December 8, 2025 21:37
@rjvelazco rjvelazco requested review from fmontes and oidacra December 9, 2025 13:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements a Style Editor sidenav trigger in the Universal Visual Editor (UVE), introducing a new tab in the palette for styling contentlets. The implementation includes significant refactoring of the contentlet tools component and state management.

Key Changes:

  • Added new Style Editor tab to the UVE palette with feature flag support
  • Refactored contentlet controls from EmaContentletToolsComponent to DotUveContentletToolsComponent with improved architecture
  • Introduced withPageContext feature to centralize common computed signals across the store
  • Added support for registering and selecting contentlets to trigger style editing

Reviewed changes

Copilot reviewed 44 out of 45 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
core-web/libs/sdk/types/src/lib/editor/public.ts Added REGISTER_STYLE_SCHEMAS action enum for style editor integration
core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/withPageContext.ts New feature consolidating shared computed signals like $isPageLocked, $canEditPage, $isStyleEditorEnabled
core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/models.ts Added StyleSchema interface, UVE_PALETTE_TABS enum, and refactored palette state structure
core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/withEditor.ts Major refactor: added $styleSchema, $showContentletControls, $allowContentDelete computeds; updated palette structure
core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/load/withLoad.ts Removed duplicate canEditPage and pageIsLocked computation (now in withPageContext)
core-web/libs/portlets/edit-ema/portlet/src/lib/store/dot-uve.store.ts Integrated withPageContext feature and removed duplicate computed signals
core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/edit-ema-editor.component.ts Added style editor triggers, contentlet selection, drag image handling, and iframe resize observer
core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/components/dot-uve-contentlet-tools/* Complete rewrite of contentlet tools component with better signal-based architecture
core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/components/dot-uve-palette/* Added Style Editor tab with feature flag, updated to use controlled activeTab input
core-web/libs/portlets/edit-ema/portlet/src/lib/utils/index.ts Renamed computePageIsLocked to computeIsPageLocked for better naming consistency
Test files Comprehensive test updates reflecting component and state management refactoring
Comments suppressed due to low confidence (1)

core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/components/dot-uve-contentlet-tools/dot-uve-contentlet-tools.component.scss:49

  • The pointer-events: all property is duplicated on lines 46 and 48 for the same selectors. Remove one of the duplicate declarations.

@rjvelazco rjvelazco enabled auto-merge December 9, 2025 18:00
…-in-uve' of https://github.com/dotCMS/core into issue-33997-task-implement-style-editor-sidenav-trigger-in-uve
@rjvelazco rjvelazco dismissed nicobytes’s stale review December 9, 2025 18:57

Feedback addressed

@rjvelazco rjvelazco added this pull request to the merge queue Dec 10, 2025
Merged via the queue into main with commit bff06d4 Dec 10, 2025
39 of 41 checks passed
@rjvelazco rjvelazco deleted the issue-33997-task-implement-style-editor-sidenav-trigger-in-uve branch December 10, 2025 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TASK] Implement Style Editor Sidenav Trigger in UVE

8 participants