Skip to content

Cut header and tree visual effects for mobile#5824

Open
evnchn wants to merge 2 commits intozauberzeug:mainfrom
evnchn:mobile-friendly-docs
Open

Cut header and tree visual effects for mobile#5824
evnchn wants to merge 2 commits intozauberzeug:mainfrom
evnchn:mobile-friendly-docs

Conversation

@evnchn
Copy link
Copy Markdown
Collaborator

@evnchn evnchn commented Feb 19, 2026

Motivation

While good INP is strongly desired for SEO purposes, the approach at #5801 is hacky, to say the least.

Are there any lower-hanging fruits before we go the nuclear option?

Implementation

I spotted 4 places for optimization:

  • Mobile devices lack room. They would benefit from the shrunk header almost always. Removing dynamic header grow-shrink logic cuts layout recomputations for frames in a 200ms window.
  • CSS blur effects have a high computational cost, and it honestly doesn't matter on mobile, so I substituted the colors with what they would be assuming empty background to minimize felt change.
  • While likely broken just because Fix race condition: use static DOMPurify import to avoid mid-module yield #5732 is not merged yet, the docs tree is supposed to collapse-on-click for mobile. As such, remove the animation which is not readily seen by the user but would have been rendered anyways.
  • The search dialog now uses a conditional fade transition on mobile (via Quasar.Screen.lt.md) instead of the default scale animation, reducing compositing work.

While the network bottleneck is still there, we do everything in our power to ensure the CPU load is relieved as much as possible.

As we need only to shave 11ms for https://nicegui.io/documentation/section_* we might just have a win for that. For the others 39ms is needed, and I am not super hopeful on that.

image

Progress

  • I chose a meaningful title that completes the sentence: "If applied, this PR will..."
  • The implementation is complete.
  • If this PR addresses a security issue, it has been coordinated via the security advisory process.
  • Pytests have been added (or are not necessary).
  • Documentation has been added (or is not necessary).

@evnchn evnchn mentioned this pull request Feb 19, 2026
5 tasks
@evnchn evnchn added the documentation Type/scope: Documentation, examples and website label Feb 19, 2026
@evnchn
Copy link
Copy Markdown
Collaborator Author

evnchn commented Feb 19, 2026

About 50% faster, if we consider the Performance Monitor tab

Replace CSS media query hack for nav tree with `:no-transition` prop
bound to `Quasar.Screen.lt.md`, and add conditional fade/scale
transitions on the search dialog based on viewport width.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@evnchn
Copy link
Copy Markdown
Collaborator Author

evnchn commented Feb 20, 2026

@evnchn
Copy link
Copy Markdown
Collaborator Author

evnchn commented Feb 27, 2026

image

I think the visual balance for the "iPad form-factor" is wrong, and we should limit the non-moving header to mobile form-factor only. After all, the Googlebot is either a smartphone or a desktop, no in-between.

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

Labels

documentation Type/scope: Documentation, examples and website

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants