Skip to content

fix: restore /api/ page visibility under Docusaurus 3.10#827

Merged
yjkellyjoo merged 1 commit into
masterfrom
fix/api-page-hydration-visibility
Jul 7, 2026
Merged

fix: restore /api/ page visibility under Docusaurus 3.10#827
yjkellyjoo merged 1 commit into
masterfrom
fix/api-page-hydration-visibility

Conversation

@yjkellyjoo

Copy link
Copy Markdown
Member

What does this PR resolve? 🚀

Fixes the blank /api/ page (Bee API reference) on docs.ethswarm.org.

  • Switches the redocusaurus anti-FOUC CSS unlock from body[data-rh] to html[data-has-hydrated='true'].

Cause: The /api/ page is hidden by design (.redocusaurus { display: none }) and revealed once the page hydrates. That reveal rule keyed off the data-rh attribute that react-helmet used to stamp on <body>. The Docusaurus 3.9.2 → 3.10.1 bump (merged in #822) stopped emitting data-rh on the body, so the reveal rule never matched — redoc rendered its full content into the DOM but it stayed display: none forever, leaving a blank page. This first shipped to production with the #825 release tag, which is why it looked like #825's fault, but #825 (the OpenAPI v2.8.1 sync) was innocent.

Details 📝

  • data-has-hydrated="true" is the attribute Docusaurus 3.10+ officially sets on <html> after client-side hydration completes — the correct, supported replacement for the old body[data-rh] signal. Same intended behavior (hide until hydrated), durable mechanism.
  • No spec, config, or content changes needed; the OpenAPI files are correct.
  • The React hydration console warnings (added redirect rule and contract addresses #418/updated xdai -> gnosis.io links, added title page, fixed typos #423) on this page are a pre-existing, unrelated redoc issue (Redocly/redoc#2734) — present on working builds too — and are out of scope here.
  • Verified with a production build + headless browser: /api/ renders the full Bee API 8.1.0 reference (menu, operations, samples); homepage unaffected.

Checklist ✅

  • Merged latest master and resolved conflicts
  • npm run build succeeds
  • Links checked (npm run check:links) where relevant
  • static/llms.txt updated if pages were added / renamed / deleted
  • Content follows CODING.md conventions (Swarm vs swarm, ..)
  • Self-reviewed the diff
  • Commits are signed off (git commit -s)

- switch the redocusaurus anti-FOUC CSS unlock from `body[data-rh]` to `html[data-has-hydrated='true']`
- the Docusaurus 3.9.2 -> 3.10.1 bump stopped emitting the `data-rh` body attribute, so the guard rule never matched and the fully-rendered redoc content stayed `display: none` forever, blanking the API reference page
- `data-has-hydrated="true"` is the attribute Docusaurus 3.10+ officially stamps on <html> after client-side hydration, restoring the intended hide-until-hydrated behavior

Co-Authored-By: Claude <Opus 4.8> <noreply@anthropic.com>
Signed-off-by: Yejin Kelly Joo <yejinkellyjoo@gmail.com>
@yjkellyjoo yjkellyjoo self-assigned this Jul 7, 2026
@netlify

netlify Bot commented Jul 7, 2026

Copy link
Copy Markdown

Deploy Preview for test-twitter-preview-testing-3 ready!

Name Link
🔨 Latest commit 7f4cede
🔍 Latest deploy log https://app.netlify.com/projects/test-twitter-preview-testing-3/deploys/6a4cef449da6df000872679e
😎 Deploy Preview https://deploy-preview-827--test-twitter-preview-testing-3.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@yjkellyjoo yjkellyjoo merged commit b35a50e into master Jul 7, 2026
9 checks passed
@yjkellyjoo yjkellyjoo deleted the fix/api-page-hydration-visibility branch July 7, 2026 12:25
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