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

feat: update icon imports/radix-icons-svelte -> svelte-radix #591

Merged
merged 15 commits into from
Feb 21, 2024
Merged

feat: update icon imports/radix-icons-svelte -> svelte-radix #591

merged 15 commits into from
Feb 21, 2024

Conversation

shyakadavis
Copy link
Contributor

@shyakadavis shyakadavis commented Jan 3, 2024

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

Fixes: #575

For faster load times & builds, icons will now be imported as such:

import Circle from 'lucide-svelte/icons/circle';

P.S.
With the "moduleResolution: "Bundler" option, the TS compiler was screaming its lungs out due to svelte-headless-table. I updated it given the new release https://github.com/bryanmylee/svelte-headless-table/releases/tag/v0.18.0, and updated some type imports, and all is well now.

  • If your PR isn't addressing a small fix (like a typo), it references an issue where it is discussed ahead of time and assigned to you. In many cases, features are absent for a reason.
  • Prefix your PR title with feat:, fix:, chore:, or docs:.
  • This message body should clearly illustrate what problems it solves.
  • Follows the contribution guidelines.
  • Format & lint the code with pnpm format and pnpm lint

Copy link

changeset-bot bot commented Jan 3, 2024

🦋 Changeset detected

Latest commit: 71a9b68

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

This PR includes changesets to release 3 packages
Name Type
shadcn-svelte Minor
playground-js Patch
playground-ts 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

Copy link

vercel bot commented Jan 3, 2024

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
shadcn-svelte ⬜️ Ignored (Inspect) Visit Preview Feb 21, 2024 1:12am

@shyakadavis shyakadavis marked this pull request as ready for review January 3, 2024 01:07
@AdrianGonz97
Copy link
Collaborator

AdrianGonz97 commented Jan 3, 2024

So far so good! Turns out that I didn't have to adjust the registry script at all as we handle the dependencies for icons a little differently.

In regards to the current svelte-check error, it looks like the form error is originating from formsnap. Currently working on that in this PR: svecosystem/formsnap#111

As soon as that's merged and released, we can merge this PR.

Edit:
Small update, setting moduleResolution to bundler revealed a small issue in sveltekit-superforms where a particular type isn't being exposed, which is causing the type error we're seeing. The next release of superforms should resolve this!

@shyakadavis
Copy link
Contributor Author

Glad to hear.

Best of luck, stranger. 🙂

@huntabyte
Copy link
Owner

https://github.com/ciscoheat/sveltekit-superforms/releases/tag/v1.13.2 Superforms has exposed the type for this now.

@huntabyte
Copy link
Owner

Alrighty, I've merged in main to get rid of those merge conflicts.

Since there doesn't seem to be a Radix Icons for Svelte with proper exports setup I'll look into spinning something up this week.

@huntabyte
Copy link
Owner

Swapped radix-icons-svelte out with svelte-radix.

Default style

- import { Check } from 'lucide-svelte'
+ import Check from 'lucide-svelte/icons/check'

New York style

- import { Check } from 'radix-icons-svelte'
+ import Check from 'svelte-radix/Check.svelte'

@huntabyte huntabyte changed the title feat: Update lucide-svelte imports feat: update icon imports & replace radix-icons-svelte w/ svelte-radix Feb 21, 2024
@huntabyte
Copy link
Owner

Thanks a ton peeps! @shyakadavis @AdrianGonz97

@huntabyte huntabyte changed the title feat: update icon imports & replace radix-icons-svelte w/ svelte-radix feat: update icon imports/radix-icons-svelte -> svelte-radix Feb 21, 2024
@huntabyte huntabyte merged commit d7ae8b5 into huntabyte:main Feb 21, 2024
5 checks passed
@shyakadavis shyakadavis deleted the feat/faster-load-times branch February 21, 2024 08:21
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.

Speed up dev servers; lucide-svelte issue
3 participants