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

Filter scale tuples in Theme type inside .sx prop #2457

Merged
merged 9 commits into from
Jan 24, 2024

Conversation

hasparus
Copy link
Member

Fixes #2456.

Now the type of theme inside of sx prop doesn't contain array scales, so it should be easier to read from.

We now also allow injecting the theme, but with a smaller blast radius than in #1090.

@vercel
Copy link

vercel bot commented Sep 26, 2023

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

Name Status Preview Comments Updated (UTC)
theme-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 24, 2024 0:15am

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 26, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 0a7330c:

Sandbox Source
next-theme-ui-example Configuration
gatsby-plugin-theme-ui-example Configuration

@hasparus
Copy link
Member Author

hasparus commented Jan 6, 2024

I'm converting it to a draft, because userspace type narrowing thru declaration merging creates a breaking change for all projects that contain functions Theme => unknown. Without declare module "@theme-ui/core" removed scale tuples are still a bugfix, but I should either remove the injection from here or add a disclaimer that it might be hard to adopt for existing projects.

@hasparus hasparus marked this pull request as ready for review January 24, 2024 12:10
@hasparus hasparus merged commit e895fa5 into develop Jan 24, 2024
11 of 12 checks passed
@hasparus hasparus deleted the filter-scale-tuples branch January 24, 2024 12:25
@hasparus
Copy link
Member Author

🚀 PR was released in v0.16.2 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Several TypeScript errors when upgrading to 0.16.1
1 participant