Skip to content

[docs-infra] Fix Emphasized Code Loading State#4659

Open
dav-is wants to merge 9 commits intomui:masterfrom
dav-is:docs-infra/fix-highlighted-code
Open

[docs-infra] Fix Emphasized Code Loading State#4659
dav-is wants to merge 9 commits intomui:masterfrom
dav-is:docs-infra/fix-highlighted-code

Conversation

@dav-is
Copy link
Copy Markdown
Member

@dav-is dav-is commented Apr 21, 2026

Note

Upstream PR: mui/mui-public#1303

Preview Deploy

Emphasized lines (blue background // @highlight) are not appearing on first render, despite being marked highlightAt: 'init':

Screenshot From 2026-04-21 19-49-38

After:

image

Also, emphasized lines are always shown on first render, even with highlightAt: 'idle' to avoid a large blue flash

Closes: #4653

@dav-is dav-is added type: bug It doesn't behave as expected. scope: docs-infra Involves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305). labels Apr 21, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 21, 2026

commit: be76b2b

@code-infra-dashboard
Copy link
Copy Markdown

code-infra-dashboard Bot commented Apr 21, 2026

Bundle size

Bundle Parsed size Gzip size
@base-ui/react 0B(0.00%) 0B(0.00%)

Details of bundle changes

Performance

Total duration: 1,371.32 ms +27.06 ms(+2.0%) | Renders: 53 (+0) | Paint: 2,096.56 ms +13.17 ms(+0.6%)

Test Duration Renders
Select mount (200 instances) 174.08 ms 🔺+31.91 ms(+22.4%) 3 (+0)
Mixed surface mount (app-like density) 110.22 ms 🔺+18.15 ms(+19.7%) 5 (+0)
Menu mount (300 instances) 146.64 ms 🔺+13.72 ms(+10.3%) 2 (+0)
Checkbox mount (500 instances) 89.74 ms 🔺+10.55 ms(+13.3%) 1 (+0)
Menu open (500 items) 74.85 ms 🔺+6.04 ms(+8.8%) 12 (+0)

...and 7 more. View full report

Details of benchmark changes


Check out the code infra dashboard for more information about this PR.

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 21, 2026

Deploy Preview for base-ui ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit be76b2b
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/69eb7760bdde530007eb1958
😎 Deploy Preview https://deploy-preview-4659--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@dav-is dav-is changed the title [docs-infra] Fix Emphasized Code Loading [docs-infra] Fix Emphasized Code Loading State Apr 22, 2026
@github-actions github-actions Bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Apr 23, 2026
@github-actions github-actions Bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Apr 23, 2026
@dav-is dav-is marked this pull request as ready for review April 24, 2026 13:48
@dav-is dav-is requested a review from aarongarciah April 24, 2026 13:48
Copy link
Copy Markdown
Member

@aarongarciah aarongarciah left a comment

Choose a reason for hiding this comment

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

Not sure if it's meant to be used like this, but nesting word highlighting in nested highlighted lines breaks the line highlighting:

/* @highlight-start */
&[data-starting-style],
&[data-ending-style] {
  /* @highlight-start */
  opacity: 0;
  transform: scale(0.9); /* @highlight-text "transform" */
  /* @highlight-end */
}
/* @highlight-end */
Image

@dav-is
Copy link
Copy Markdown
Member Author

dav-is commented Apr 24, 2026

@aarongarciah that looks like a bug, thanks for mentioning, I'll draft a fix

Edit: PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: docs-infra Involves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305). type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants