Skip to content

chore: bump dependencies#13835

Merged
nnaydenow merged 4 commits into
mainfrom
deps-bump
Jul 17, 2026
Merged

chore: bump dependencies#13835
nnaydenow merged 4 commits into
mainfrom
deps-bump

Conversation

@nnaydenow

@nnaydenow nnaydenow commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Re-swizzle theme components after upgrading Docusaurus from 3.1.1 to 3.10.2
  • Fix playground-elements runtime error that broke the code editor on all component pages

Docusaurus swizzle updates

DocItem/Content/index.js

  • Updated useDoc import: @docusaurus/theme-common/internal@docusaurus/plugin-content-docs/client

DocSidebarItem/Category/index.js + new styles.module.css

Rewritten to match the 3.10.2 base structure:

  • Added useVisibleSidebarItems — handles categories with no visible children via DocSidebarItemCategoryEmpty
  • Added CategoryLinkLabel component wrapping label in a <span> for CSS-controlled text truncation
  • New handleItemClick logic with smarter collapse/expand behavior (collapses on current page, always expands on navigation)
  • Updated aria-expanded / role attributes on the link element
  • Added styles.module.css (new in 3.10.2) with .categoryLink and .categoryLinkLabel classes
  • Preserved custom expComponentBadge / newComponentBadge class logic on the <li> element

playground-elements fix

Error: Uncaught Error: Cannot find module 'http://localhost:3000/' thrown from _normalizedSandboxBaseUrl on every component page with a code sample.

Root cause: playground-project.js used import.meta.url as the base for new URL(this.sandboxBaseUrl, import.meta.url). Webpack 5 intercepts import.meta.url at bundle time and injects a dynamic require() context — but http://localhost:3000/ is not a valid module path, so it throws at runtime.

Fix: Patched playground-project.js via .yarn/patches/playground-elements-npm-0.18.1-d292eadd94.patch to replace import.meta.url with location.href in _normalizedSandboxBaseUrl. This is safe because sandboxBaseUrl is always set to an absolute URL before use (either https://unpkg.com/playground-elements@0.18.1/ in production or window.location.origin + "/" in development), making the base argument to new URL() irrelevant.

…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
nnaydenow temporarily deployed to netlify-preview July 16, 2026 13:37 — with GitHub Actions Inactive
@sap-ui5-webcomponents-release

Copy link
Copy Markdown

@nnaydenow
nnaydenow temporarily deployed to netlify-preview July 17, 2026 07:11 — with GitHub Actions Inactive
@nnaydenow
nnaydenow merged commit ab17b43 into main Jul 17, 2026
20 of 21 checks passed
@nnaydenow
nnaydenow deleted the deps-bump branch July 17, 2026 08:48
@nnaydenow
nnaydenow temporarily deployed to netlify-preview July 17, 2026 08:48 — with GitHub Actions Inactive
@sap-ui5-webcomponents-release

Copy link
Copy Markdown

🧹 Preview deployment cleaned up: https://pr-13835--ui5-webcomponents.netlify.app

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.

2 participants