feat: enhance FwbInput component with additional size option and improved padding#433
feat: enhance FwbInput component with additional size option and improved padding#433Sqrcz wants to merge 3 commits intothemesberg:mainfrom
Conversation
✅ Deploy Preview for sensational-seahorse-8635f8 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds an "xl" (Extra Large) size across Input, Range, and Toggle components: updates the public InputSize type, extends class mappings (padding/thumb sizes), adjusts component styling for ranges, and updates docs/examples (standardized placeholders, v-model.number, initial values, and new xl examples). Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
src/components/FwbRange/FwbRange.vue (1)
60-71: Consider consolidating duplicate thumb styles.Both
::-webkit-slider-thumband::-moz-range-thumbshare identical styling. While functional, this could be consolidated if the build tool supports it.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/FwbRange/FwbRange.vue` around lines 60 - 71, Consolidate the duplicate thumb rules by merging the two vendor-specific selectors into a single rule so the shared styles for .fwb-range-input::-webkit-slider-thumb and .fwb-range-input::-moz-range-thumb are declared once; keep both pseudo-element selectors (webkit and moz) in the selector list and include the shared declarations (appearance overrides and Tailwind `@apply` classes) inside that single rule to avoid repetition while preserving vendor support.src/components/FwbRange/composables/useRangeClasses.ts (1)
17-20: Remove unuseddisabledprop from type definition.The
disabledref is defined inUseRangeClassesPropsbut never accessed in theuseRangeClassesfunction body. Onlyprops.size.valueis used. Remove it to keep the type definition focused on what the composable actually needs.♻️ Proposed cleanup
export type UseRangeClassesProps = { size: Ref<InputSize> - disabled: Ref<boolean> }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/FwbRange/composables/useRangeClasses.ts` around lines 17 - 20, The UseRangeClassesProps type currently declares a disabled: Ref<boolean> that is not used inside useRangeClasses; remove the disabled property from UseRangeClassesProps and update any call sites or tests that construct a UseRangeClassesProps object to stop passing disabled (or provide only size), ensuring useRangeClasses continues to access props.size.value as before; verify TypeScript types compile and adjust imports or mocks referencing UseRangeClassesProps if needed.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/components/FwbRange/composables/useRangeClasses.ts`:
- Around line 17-20: The UseRangeClassesProps type currently declares a
disabled: Ref<boolean> that is not used inside useRangeClasses; remove the
disabled property from UseRangeClassesProps and update any call sites or tests
that construct a UseRangeClassesProps object to stop passing disabled (or
provide only size), ensuring useRangeClasses continues to access
props.size.value as before; verify TypeScript types compile and adjust imports
or mocks referencing UseRangeClassesProps if needed.
In `@src/components/FwbRange/FwbRange.vue`:
- Around line 60-71: Consolidate the duplicate thumb rules by merging the two
vendor-specific selectors into a single rule so the shared styles for
.fwb-range-input::-webkit-slider-thumb and .fwb-range-input::-moz-range-thumb
are declared once; keep both pseudo-element selectors (webkit and moz) in the
selector list and include the shared declarations (appearance overrides and
Tailwind `@apply` classes) inside that single rule to avoid repetition while
preserving vendor support.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
docs/components/range.mddocs/components/range/examples/FwbRangeExample.vuedocs/components/range/examples/FwbRangeExampleDisabled.vuedocs/components/range/examples/FwbRangeExampleMinMax.vuedocs/components/range/examples/FwbRangeExampleSize.vuedocs/components/range/examples/FwbRangeExampleSteps.vuesrc/components/FwbRange/FwbRange.vuesrc/components/FwbRange/composables/useRangeClasses.ts
Summary by CodeRabbit
New Features
Documentation
Styling