Skip to content

Conversation

@KevinDavilaDotCMS
Copy link
Contributor

@KevinDavilaDotCMS KevinDavilaDotCMS commented Jan 31, 2026

2026-02-02.12-20-37.mov

Changes Made

  • Replaced the placeholder message in the style editor palette with a new component.
  • Added HTML, SCSS, and TypeScript files for the new empty state component to enhance user experience when no styles are available.
  • Updated the language properties to include a message for the empty state.

This PR fixes: #34470

This PR fixes: #34470

…palette

### Changes Made
- Replaced the placeholder message in the style editor palette with a new  component.
- Added HTML, SCSS, and TypeScript files for the new empty state component to enhance user experience when no styles are available.
- Updated the language properties to include a message for the empty state.

### Motivation
This update improves the user interface by providing a more informative and visually appealing empty state when no styles are present, guiding users on how to start styling their
### Changes Made
- Introduced a new empty state component for the style editor palette to enhance user experience when no styles are available.
- Added corresponding HTML, SCSS, and TypeScript files for the new component.
- Updated the component imports to ensure proper functionality.

### Motivation
This update provides a visually appealing and informative empty state, guiding users on how to start styling when no styles are present.
@semgrep-code-dotcms-test
Copy link

Semgrep found 1 ssc-4fd3a3fc-acff-4277-9d88-60469f5a4fa5 finding:

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

Risk: Affected versions of @angular/compiler and @angular/core are vulnerable to Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'). Angular's template compiler fails to classify the href and xlink:href attributes on SVG <script> elements as Resource URL contexts. This allows an attacker to bind a malicious data: URI or external script via [attr.href] or [attr.xlink:href], resulting in arbitrary JavaScript execution (XSS) in the victim's browser.

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

Reference(s): GHSA-jrmj-c5cx-3cw6, CVE-2026-22610

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

### Changes Made
- Added a new effect to reset the active contentlet when the page is unlocked, preventing editing conflicts.
- Updated the component's TypeScript file to include logic for handling the active contentlet state based on the page's lock status.
- Enhanced unit tests to verify the new behavior of resetting the active contentlet under specified conditions.

### Motivation
This update improves the user experience by ensuring that when a page is unlocked, any active contentlet selection is cleared, reducing the risk of editing conflicts.
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 improves the user experience of the style editor palette by replacing a simple text placeholder with a dedicated empty state component. The change provides a more polished and informative UI when no contentlet is selected or when the selected contentlet doesn't have a style editor schema.

Changes:

  • Created a new DotUveStyleEditorEmptyStateComponent with an icon, formatted message, and documentation link
  • Added a language property key with HTML content for the empty state message
  • Integrated the empty state component into the palette, replacing inline placeholder text
  • Added an effect to reset active contentlet when a page is unlocked (unrelated feature)
  • Updated SDK README documentation with type corrections and table formatting fixes (unrelated cleanup)

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
Language.properties Added new language key for style editor empty state message with HTML link
core-web/libs/sdk/uve/README.md Fixed table formatting and corrected type names in documentation examples
edit-ema-editor.component.ts Added effect to reset active contentlet on page unlock with corresponding tests
edit-ema-editor.component.spec.ts Added comprehensive tests for the unlock/reset contentlet behavior
dot-uve-palette.component.ts Imported new empty state component
dot-uve-palette.component.html Replaced inline placeholder with empty state component
dot-uve-style-editor-empty-state.component.* New empty state component with TypeScript, HTML template, and SCSS styling

@nollymar nollymar enabled auto-merge February 3, 2026 15:40
@nollymar nollymar disabled auto-merge February 3, 2026 15:41
### Changes Made
- Refactored HTML structure in the empty state component for better readability.
- Enhanced SCSS styles by removing unnecessary rules and optimizing class definitions.
- Updated the language properties to include a target attribute in the Learn more link for improved accessibility.

### Motivation
These changes improve the maintainability of the empty state component and enhance user experience by ensuring links open in a new tab, providing clearer guidance on styling options.
@KevinDavilaDotCMS KevinDavilaDotCMS added this pull request to the merge queue Feb 3, 2026
Merged via the queue into main with commit 05f191c Feb 3, 2026
41 checks passed
@KevinDavilaDotCMS KevinDavilaDotCMS deleted the 34470-task-improve-empty-state-on-style-editor-palette branch February 3, 2026 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

[TASK] Improve Empty state on style editor palette

4 participants