Skip to content

V16: Stylesheet Create Options#18911

Merged
leekelleher merged 7 commits intov16/devfrom
v16/feature/stylesheet-create-options
Apr 3, 2025
Merged

V16: Stylesheet Create Options#18911
leekelleher merged 7 commits intov16/devfrom
v16/feature/stylesheet-create-options

Conversation

@leekelleher
Copy link
Copy Markdown
Member

Description

Following on from the removal of RTE Stylesheets #18908, we need a way for a 3rd-party TinyMCE package can re-introduce RTE Stylesheets, we needed the Stylesheet Create menu to be powered by entityCreateOptionAction extensions.

This PR deprecates the "Stylesheet Create Options modal" (which had hardcoded options; for removal in v18), replacing it with the extensible entityCreateOptionAction options.

Copilot AI review requested due to automatic review settings April 2, 2025 10:49
Copy link
Copy Markdown
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 deprecates the legacy Stylesheet Create Options modal and introduces an extensible entityCreateOptionAction approach for integrating third-party TinyMCE packages. Key changes include:

  • Creation of a new UmbStylesheetCreateOptionAction for constructing stylesheet creation URLs.
  • Deprecation of modal-related types and elements in favor of extension-based actions.
  • Updates to manifests to register the new entity actions and mark legacy modal components as deprecated.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/entity-actions/create/stylesheet-create-option-action.ts Added new entityCreateOptionAction with custom URL generation for stylesheet creation
src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/entity-actions/create/options-modal/stylesheet-create-options.modal-token.ts Marked modal token interface as deprecated
src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/entity-actions/create/options-modal/stylesheet-create-options-modal.element.ts Marked modal element as deprecated
src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/entity-actions/create/manifests.ts Updated manifests to include the new entity actions and deprecate old modal registrations
src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/entity-actions/create/create.action.ts Marked the existing create action as deprecated in favor of the new approach
Comments suppressed due to low confidence (1)

src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/entity-actions/create/stylesheet-create-option-action.ts:6

  • Consider verifying the use of the string 'null' as a fallback for this.args.unique. Confirm that this behavior meets the intended URL structure when the unique identifier is missing.
const href = `section/settings/workspace/stylesheet/create/parent/${this.args.entityType}/${this.args.unique || 'null'}`;

@leekelleher leekelleher requested a review from iOvergaard April 2, 2025 10:51
@leekelleher
Copy link
Copy Markdown
Member Author

leekelleher commented Apr 3, 2025

Note

To resolve the failing acceptance test, a fix to the Playwright Test Helpers was required.
Once umbraco/Umbraco.Playwright.Testhelpers#224 has been merged and released, (and the acceptance tests updated), then this PR should pass and be merged in.

@umbraco/playwright-testhelpers 16.0.0 has been released: https://github.com/umbraco/Umbraco.Playwright.Testhelpers/releases/tag/release%2F16.0.0

@leekelleher leekelleher requested a review from andr317c April 3, 2025 13:38
@leekelleher
Copy link
Copy Markdown
Member Author

@andr317c Tagging you for review of updates to Stylesheet.spec.ts.

@leekelleher leekelleher disabled auto-merge April 3, 2025 13:39
Copy link
Copy Markdown
Contributor

@andr317c andr317c left a comment

Choose a reason for hiding this comment

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

LGTM!

@leekelleher leekelleher merged commit 8754caa into v16/dev Apr 3, 2025
27 checks passed
@leekelleher leekelleher deleted the v16/feature/stylesheet-create-options branch April 3, 2025 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants