Skip to content

Fix toggles#2428

Merged
chgeo merged 6 commits intomainfrom
fix-toggles
Mar 3, 2026
Merged

Fix toggles#2428
chgeo merged 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
Copy link
Contributor

@renejeglinsky renejeglinsky left a comment

Choose a reason for hiding this comment

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

Funny that I'm the codeowner in that area. We should fix that ;)

@chgeo chgeo merged commit cc830a2 into main Mar 3, 2026
6 checks passed
@chgeo chgeo deleted the fix-toggles branch March 3, 2026 18:12
@chgeo
Copy link
Contributor

chgeo commented Mar 4, 2026

Funny that I'm the codeowner in that area. We should fix that ;)

Done. This was because of the changed public/ dir content.

@Akatuoro Akatuoro mentioned this pull request Mar 4, 2026
chgeo pushed a commit that referenced this pull request Mar 4, 2026
The toggle is animated again when switching.
I missed this character while cleaning up #2428 and did not notice the
missing animation.
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.

4 participants