Skip to content

Fix toggles#2428

Open
Akatuoro wants to merge 6 commits intomainfrom
fix-toggles
Open

Fix toggles#2428
Akatuoro wants to merge 6 commits intomainfrom
fix-toggles

Conversation

@Akatuoro
Copy link
Contributor

@Akatuoro Akatuoro commented Mar 3, 2026

Fixes impl-variant toggle behavior in regards to:

  • layout shift on load
  • outline inconsistencies (both node and java headers shown on load)

Good page for testing: http://localhost:5173/docs/guides/databases/postgres#deploy
Chrome Performance CLS: 0.01 -> 0.00

@swaldmann
Copy link
Contributor

There's definitely removed flickering in the outline compared to main 👍

I just noticed on reload the flickering at the top bar is still there but now a bit more pronounced, maybe because of the removed animationsOff?

@Akatuoro
Copy link
Contributor Author

Akatuoro commented Mar 3, 2026

There's definitely removed flickering in the outline compared to main 👍

I just noticed on reload the flickering at the top bar is still there but now a bit more pronounced, maybe because of the removed animationsOff?

Yes, I also noticed that and have been looking into it. It has been happening on the live capire site for me as well though, so not sure if it's worse now. We don't have any actual transition that we could put this animationsOff method around.

Still, the transition on VPSwitchAppearance is definitely the culprit. When permanently setting the css, there's no flicker. But then also the switch animations don't work. Will try out a few things...

@Akatuoro
Copy link
Contributor Author

Akatuoro commented Mar 3, 2026

Fixed the header flicker. I noticed some layout shift when reloading at arbitrary scroll positions -> will look into that.

@Akatuoro
Copy link
Contributor Author

Akatuoro commented Mar 3, 2026

So... I just noticed that both the header flicker and the scroll behavior also appear on the official vitepress documentation 😆
https://vitepress.dev/reference/default-theme-config#sidebarmenulabel

@chgeo chgeo enabled auto-merge (squash) March 3, 2026 16: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.

3 participants