-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix: The server path is not appended to stylesheets before load in Backoffice #19192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: The server path is not appended to stylesheets before load in Backoffice #19192
Conversation
There was a problem hiding this 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 fixes an issue where the server path is not prepended to stylesheets before being loaded in the Backoffice.
- Updates @tiptap dependencies
- Prepends the "/css" path to stylesheet URLs in the Backoffice
Files not reviewed (2)
- src/Umbraco.Web.UI.Client/package-lock.json: Language not supported
- src/Umbraco.Web.UI.Client/package.json: Language not supported
Comments suppressed due to low confidence (1)
src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/input-tiptap.element.ts:193
- Consider verifying that the stylesheet paths in '#stylesheets' never already include the '/css' prefix to avoid accidentally double prefixing, which could break stylesheet loading.
html`<link rel="stylesheet" href="${STYLESHEET_ROOT_PATH}${stylesheet}" />`,
There was a problem hiding this 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 addresses issue #19188 by ensuring that stylesheet paths are correctly prefixed with "/css" before being loaded in the Backoffice. The key changes include:
- Updating the @tiptap dependencies from 2.11.5 to 2.11.7 in package-lock.json.
- Introducing a constant for the stylesheet root path.
- Modifying the rendering of stylesheet links to conditionally prepend "/css" to relative paths.
Files not reviewed (2)
- src/Umbraco.Web.UI.Client/package-lock.json: Language not supported
- src/Umbraco.Web.UI.Client/package.json: Language not supported
src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/input-tiptap.element.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested before and after this PR is applied and verified that the issue is resolved by this update.
However I'm seeing now a failed request for rte-content.css
that I don't see when I have release/15.4
checked out and built.
With this PR applied we are getting the /css/
prepended on this path (defined on line 36), ending up with /css/umbraco/backoffice/css/rte-content.css
.
Perhaps you need to amend the paths coming back from the server at the point they are received and added to this.#stylesheets
?
Absolutely, great catch, @AndyButland. I have moved the logic up so it only applies to the picked stylesheets and not "everything else". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great - all working as expected now.
Changes
Fixes #19188
@tiptap
dependencies in thepackage-lock.json
file to a newer version (from2.11.5
to2.11.7
)./css
path to stylesheets before loading them in the Backoffice in Tiptap