Skip to content

Conversation

@realguse
Copy link
Contributor

Before submitting the PR, please make sure you do the following

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • Prefix your PR title with feat:, fix:, chore:, or docs:.
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.
  • If this PR changes code within packages/svelte/src, add a changeset (npx changeset).

This PR refactors the banner part in the readme in order for it to detect the theme faster as illustrated below.

Old (the banner clearly lags behind in updating):
https://github.com/user-attachments/assets/ed2cc76c-7f18-4644-978f-0e6facbfc4f6

New (no log when switching themes):
https://github.com/user-attachments/assets/9eb4144b-5d3a-4dd2-91e9-27840e549fa2

The lag problem in the first example will get slightly better when switching theme for the second time, but the same amount of lag appears when refreshing and then switching.

@changeset-bot
Copy link

changeset-bot bot commented Feb 17, 2025

⚠️ No Changeset found

Latest commit: d53d670

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@svelte-docs-bot
Copy link

@Rich-Harris
Copy link
Member

Thank you but this is an undesirable change — it means that everyone visiting https://github.com/sveltejs/svelte would download both banner.png and banner_dark.png

@realguse realguse deleted the feature/banner-theme branch February 21, 2025 17:48
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