Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make TS the default without JS #198

Closed
wants to merge 1 commit into from
Closed

Conversation

dummdidumm
Copy link
Member

@dummdidumm dummdidumm commented Oct 1, 2024

It's the default when JS is enabled, by checking the checkboxes on startup. This can cause noticeable flickering on low-powered devices because the JS view is visible first. This makes the TS view visible by default without JS, causing less flickering for the majority of people (because they'll prefer TS).

Note that you'll have to delete your snippet cache because I changed the class name to js-toggle (I thought it would be confusing if it's called ts-toggle but checking it means turning TS off).

It's the default when JS is enabled, by checking the checkboxes on startup. This can cause noticeable flickering on low-powered devices because the JS view is visible first. This makes the TS view visible by default without JS, causing less flickering for the majority of people (because they'll prefer TS)
Copy link

vercel bot commented Oct 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
omnisite ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 3, 2024 3:19am

@Rich-Harris
Copy link
Member

As far as I can tell the flickering is a dev-time only concern — the script that toggles the checkboxes is a blocking script, so the only opportunity for the browser to paint beforehand is if it only has a partial document (presumably something to do with response chunk sizes that is only relevant to the dev server). Agree with making TS the default though. Merged #224 so closing

@Rich-Harris Rich-Harris closed this Oct 3, 2024
@Rich-Harris Rich-Harris deleted the ts-by-default branch October 5, 2024 19: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