Conversation
nnaydenow
had a problem deploying
to
netlify-preview
July 16, 2026 12:39 — with
GitHub Actions
Failure
nnaydenow
had a problem deploying
to
netlify-preview
July 16, 2026 12:41 — with
GitHub Actions
Failure
…playground-elements
Re-swizzle theme components after upgrading Docusaurus from 3.1.1 to 3.10.2:
- DocItem/Content: update useDoc import to @docusaurus/plugin-content-docs/client
- DocSidebarItem/Category: rewrite to match new structure (useVisibleSidebarItems,
CategoryLinkLabel, DocSidebarItemCategoryEmpty, new handleItemClick logic,
updated aria attributes); add styles.module.css; preserve expComponentBadge/
newComponentBadge custom logic
Fix playground-elements runtime error ("Cannot find module 'http://localhost:3000/'"):
- Patch playground-project.js to replace import.meta.url with location.href in
_normalizedSandboxBaseUrl — Webpack 5 statically analyzed import.meta.url and
injected a broken module context; location.href is equivalent since sandboxBaseUrl
is always an absolute URL
nnaydenow
temporarily deployed
to
netlify-preview
July 16, 2026 13:37 — with
GitHub Actions
Inactive
|
🚀 Deployed on https://pr-13835--ui5-webcomponents-preview.netlify.app |
ilhan007
approved these changes
Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Docusaurus swizzle updates
DocItem/Content/index.jsuseDocimport:@docusaurus/theme-common/internal→@docusaurus/plugin-content-docs/clientDocSidebarItem/Category/index.js+ newstyles.module.cssRewritten to match the 3.10.2 base structure:
useVisibleSidebarItems— handles categories with no visible children viaDocSidebarItemCategoryEmptyCategoryLinkLabelcomponent wrapping label in a<span>for CSS-controlled text truncationhandleItemClicklogic with smarter collapse/expand behavior (collapses on current page, always expands on navigation)aria-expanded/roleattributes on the link elementstyles.module.css(new in 3.10.2) with.categoryLinkand.categoryLinkLabelclassesexpComponentBadge/newComponentBadgeclass logic on the<li>elementplayground-elements fix
Error:
Uncaught Error: Cannot find module 'http://localhost:3000/'thrown from_normalizedSandboxBaseUrlon every component page with a code sample.Root cause:
playground-project.jsusedimport.meta.urlas the base fornew URL(this.sandboxBaseUrl, import.meta.url). Webpack 5 interceptsimport.meta.urlat bundle time and injects a dynamicrequire()context — buthttp://localhost:3000/is not a valid module path, so it throws at runtime.Fix: Patched
playground-project.jsvia.yarn/patches/playground-elements-npm-0.18.1-d292eadd94.patchto replaceimport.meta.urlwithlocation.hrefin_normalizedSandboxBaseUrl. This is safe becausesandboxBaseUrlis always set to an absolute URL before use (eitherhttps://unpkg.com/playground-elements@0.18.1/in production orwindow.location.origin + "/"in development), making the base argument tonew URL()irrelevant.