chore: radix-vueパッケージを最新のreka-uiに更新 - #2691
Conversation
|
🚀 プレビュー用ページを作成しました 🚀 更新時点でのコミットハッシュ: |
There was a problem hiding this comment.
Pull Request Overview
This PR migrates from radix-vue to the renamed reka-ui package, updates component bindings to use the new modelValue defaults, aligns prop types with AcceptableValue, and re-enables a previously commented-out SelectArrow.
- Replace all
radix-vueimports withreka-ui - Change root components to default
v-model/modelValueand update prop types toAcceptableValue - Restore the
SelectArrowcomponent inBaseSelect.vue
Reviewed Changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/components/Dialog/SettingDialog/ButtonToggleCell.vue | Updated generic constraint and model type to AcceptableValue |
| src/components/Base/BaseTooltip.vue | Swapped radix-vue import for reka-ui |
| src/components/Base/BaseTooltip.stories.ts | Swapped radix-vue import for reka-ui |
| src/components/Base/BaseToggleGroupItem.vue | Updated value prop type and imported AcceptableValue |
| src/components/Base/BaseToggleGroup.vue | Migrated to v-model:modelValue with defineModel and new import |
| src/components/Base/BaseSwitch.vue | Switched to default v-model, updated import to reka-ui |
| src/components/Base/BaseSlider.vue | Swapped radix-vue import for reka-ui |
| src/components/Base/BaseSelectItem.vue | Updated value prop type and imported AcceptableValue |
| src/components/Base/BaseSelect.vue | Restored SelectArrow, updated import and model type to AcceptableValue |
| src/components/Base/BaseScrollArea.vue | Swapped radix-vue import for reka-ui |
| src/components/Base/BaseIconButton.stories.ts | Swapped radix-vue import for reka-ui |
| src/components/Base/BaseDialog.vue | Swapped radix-vue import for reka-ui |
| src/components/Base/BaseCheckbox.vue | Switched to default v-model, updated import to reka-ui |
| src/components/App.vue | Swapped radix-vue import for reka-ui |
| package.json | Bumped dependency from radix-vue to reka-ui |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (5)
src/components/Base/BaseToggleGroup.vue:3
- [nitpick] Using
modelValueas both the prop/event name and local variable may be confusing. Consider renaming the local variable to something likevalueorselectedto improve clarity.
v-model:modelValue="modelValue"
src/components/Base/BaseSwitch.vue:4
- The component uses v-model without a corresponding defineModel declaration for
checked. Please addconst checked = defineModel<boolean>();in the script setup to properly support v-model bindings.
<SwitchRoot :id v-model="checked" :disabled class="SwitchRoot">
src/components/Base/BaseSwitch.vue:4
- The
:idbinding lacks an expression. It should be:id="id"to bind theidprop.
<SwitchRoot :id v-model="checked" :disabled class="SwitchRoot">
src/components/Base/BaseCheckbox.vue:3
- The checkbox uses
v-modelbut there is nodefineModelforchecked. Addconst checked = defineModel<boolean>();in the script setup to enable two-way binding.
<CheckboxRoot v-model="checked" class="CheckboxRoot">
src/components/Dialog/SettingDialog/ButtonToggleCell.vue:23
- [nitpick] The
generic="T extends AcceptableValue"is not used within the component. Consider removing the unused generic parameter to simplify the component signature.
<script setup lang="ts" generic="T extends AcceptableValue">
| }>(); | ||
|
|
||
| const model = defineModel<string | string[]>({ required: true }); | ||
| const model = defineModel<AcceptableValue | AcceptableValue[]>({ |
There was a problem hiding this comment.
| const model = defineModel<AcceptableValue | AcceptableValue[]>({ | |
| const model = defineModel<T | T[]>({ |
こうかも?
There was a problem hiding this comment.
AcceptableValueという型がreka-uiがexportされてるっぽい?
| </ToggleGroupRoot> | ||
| </template> | ||
|
|
||
| <script setup lang="ts"> |
There was a problem hiding this comment.
ここもgenericsの方が良さそう(具体的には"hoge" | "fuga"みたいな型をいい感じに使えるはず)
| defineProps<{ | ||
| placeholder?: string; | ||
| defaultValue?: string; | ||
| defaultValue?: AcceptableValue; |
Co-authored-by: Nanashi. <sevenc7c@sevenc7c.com>
sevenc-nanashi
left a comment
There was a problem hiding this comment.
特に問題なさそう。手元でconflict直してマージします!
内容
radix-vueがバージョンアップでreka-uiにパッケージ名が変わり、いくつか破壊的変更も発生しているので、今のうちに更新します。
それに伴い、以下の変更を行っています。