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

Explain in the docs best way to handle component API changes #1577

Open
Oudwins opened this issue Dec 24, 2024 · 1 comment
Open

Explain in the docs best way to handle component API changes #1577

Oudwins opened this issue Dec 24, 2024 · 1 comment
Labels
type: documentation A change or addition to the documentation

Comments

@Oudwins
Copy link

Oudwins commented Dec 24, 2024

Change Type

Addition

Proposed Changes

Hey!

I'm in the process of migrating shadcn-svelte to svelte 5. There are a lot of API changes on the components and it would be nice to have some examples on best ways to migrate those. Specially for when a prop was removed for example:

            <DropdownMenu.Item
              class="cursor-pointer"
              href={$org + routes.team}
            >
              <UserCog class="mr-2 h-4 w-4" />
              <span>Manage Members</span>
            </DropdownMenu.Item>

That dropdown menu item is invalid because the new dropdown menu item no longer has the href prop, the asChild prop has also being removed. So to get similar behaviour to before I am having to make an a tag the child of the item and do some weird stuff around paddings. Which is fine but it would be nice to have a clear "this is the way we recommend migrating the components"

Again this is just an example, as I find more I am happy to add them here.

@Oudwins Oudwins added the type: documentation A change or addition to the documentation label Dec 24, 2024
@Oudwins
Copy link
Author

Oudwins commented Dec 26, 2024

edit: found someone suggesting a way to do this:

huntabyte/bits-ui#76 (comment)

it would be nice for this to be documented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation A change or addition to the documentation
Projects
None yet
Development

No branches or pull requests

1 participant