unovue / radix-vue

Vue port of Radix UI Primitives. An open-source UI component library for building high-quality, accessible design systems and web apps.
https://radix-vue.com
MIT License
3.7k stars 230 forks source link

[Refactor]: change form component from `v-model:checked`/`v-model:pressed` to `v-model` #1017

Closed zernonia closed 2 weeks ago

zernonia commented 5 months ago

Describe the feature

Many confusion arrises why v-model is not working for Form Components in shadcn-vue. (https://github.com/radix-vue/shadcn-vue/issues/622 https://github.com/radix-vue/shadcn-vue/issues/121)

To establish the convention among Vue UI library, we will be refactoring form components to use v-model as well, namely

  1. Toggle
  2. Checkbox
  3. Switch

Additional information

RayGuo-ergou commented 3 months ago

Hi, will dialogs (e.g. v-model:open) be effected too? Just asking so I can prepare myself early for the breaking changes.

zernonia commented 3 months ago

Nope @RayGuo-ergou . Dialog doesn't consider a Form component 😁

RayGuo-ergou commented 3 months ago

Cool thanks!

zernonia commented 3 months ago

It will be clearer in the v2 docs which component is Form 😁

image

RayGuo-ergou commented 3 months ago

This is awesome thanks for your hard work.

RayGuo-ergou commented 3 months ago

Spent some time to briefly checked the components above seems only swtich, toggle and checkbox will be changed in v2, for anyone who looked into this topic don't be too worried : )

peter-emad99 commented 1 month ago

i read the alpha release notes and didn't find any mention for this change ..can we add it to breaking changes section?

zernonia commented 1 month ago

@peter-emad99 I think it's missing from the automated generated changelog. Here's the commit in v2 https://github.com/radix-vue/radix-vue/pull/1326/commits/87aa5ba6016fa7a98f02ea43062212906b2633a0

zernonia commented 2 weeks ago

Released in reka-ui@latest 😁