Skip to content

Conversation

@techniq
Copy link
Owner

@techniq techniq commented Mar 5, 2025

Without this change, the system theme within @layerstack/svelte-stores's themeStore will resolve as using dark mode if the system/OS has dark mode enabled ((prefers-color-scheme: dark)) and trigger setting <html class="dark"> which will affect other frameworks such as shadcn-svelte and Skeleton).

…context is not available. Fix interop with other frameworks (shadcn-svelte, Skeleton, etc)
@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@changeset-bot
Copy link

changeset-bot bot commented Mar 5, 2025

🦋 Changeset detected

Latest commit: 7d5ed1e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
svelte-ux Patch

Not sure what this means? Click here to learn what changesets are.

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2025

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
svelte-ux ✅ Ready (View Log) Visit Preview 7d5ed1e

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 5, 2025

Open in Stackblitz

npm i https://pkg.pr.new/svelte-ux@564

commit: 7d5ed1e

@techniq techniq merged commit cceddd5 into main Mar 5, 2025
5 checks passed
@techniq techniq deleted the fix-framework-interop-darkmode branch March 5, 2025 16:52
sean-zlai added a commit to zipline-ai/chronon that referenced this pull request Mar 6, 2025
…vertent dark mode removal when rendering a component (#480)

## Summary

A continuation of an earlier
[fix](techniq/svelte-ux#564), if your system is
using dark mode, the class would be removed unintentionally on first
render of a Svelte UX component.

This [fix](techniq/layerstack#33) occurred in
`@layerstack/svelte-stores`'s `themeStore` and package bumped in latest
Svelte UX version. Also bumped LayerChart version which includes a small
legend/tooltip click propagation issue (something we wouldn't have
encountered yet since we don't use `<LineChart ontooltipclick={...}>`).

## Before


https://github.com/user-attachments/assets/ebed9f72-ae70-4b13-86a3-605949edc083

## After


https://github.com/user-attachments/assets/605d5d75-2341-41ed-9df5-592343a9782b


## Checklist
- [ ] Added Unit Tests
- [ ] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update


<!-- av pr metadata
This information is embedded by the av CLI when creating PRs to track
the status of stacks when using Aviator. Please do not delete or edit
this section of the PR.
```
{"parent":"main","parentHead":"","trunk":"main"}
```
-->

Co-authored-by: Sean Lynch <[email protected]>
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