Skip to content

fix(docs): theme flash + client-side navigation#217

Open
aosmannn wants to merge 3 commits into
spicetify:mainfrom
aosmannn:fix/docs-theme-flash
Open

fix(docs): theme flash + client-side navigation#217
aosmannn wants to merge 3 commits into
spicetify:mainfrom
aosmannn:fix/docs-theme-flash

Conversation

@aosmannn
Copy link
Copy Markdown

@aosmannn aosmannn commented May 2, 2026

Summary

  • Theme flash: Run the theme bootstrap script before render-blocking stylesheets (e.g. Google Fonts), add critical body background rules, normalize localStorage theme values, reapply on DOMContentLoaded / bfcache pageshow, and on astro:after-swap so dark mode stays consistent during view transitions.
  • Navigation: Enable Astro ClientRouter so in-site doc links use client-side navigations instead of a full document reload. Rebind navbar listeners on astro:page-load, use document-level delegation for the search modal, and reinit tabs / homepage install section after navigations.

Test plan

  • npm run dev — dark mode, click many doc sidebar links — no light flash, no full reload feel
  • Theme toggle, Cmd/Ctrl+K search, mobile menu
  • Pages with Tabs (MDX) and homepage Install block after navigating away and back

aosmannn and others added 2 commits May 1, 2026 20:31
Move theme bootstrap before render-blocking font stylesheet; add critical
body background rules; normalize stored theme; reapply on DOMContentLoaded
and bfcache pageshow.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use ClientRouter for in-site link clicks instead of full document reloads.
Reapply theme after view transitions swap root attributes; rebind navbar
handlers on astro:page-load; delegate search modal to document listeners;
reinit tabs and homepage install block on page-load.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 2, 2026

Warning

Rate limit exceeded

@aosmannn has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 45 minutes and 25 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d1a875da-3e27-4ed4-9fc0-f02b7610790c

📥 Commits

Reviewing files that changed from the base of the PR and between 2740b2c and 07cd150.

📒 Files selected for processing (6)
  • astro.config.ts
  • src/components/Navbar.astro
  • src/components/SearchModal.astro
  • src/components/Tabs.astro
  • src/components/homepage/InstallSection.astro
  • src/layouts/BaseLayout.astro
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 45 minutes and 25 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

prefetch-all plus many doc links caused noisy background fetches and made
the tab/URL UI feel like it was constantly updating.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant