refactor(components): [scrollbar] use type-based definitions#23427
Conversation
📝 WalkthroughWalkthroughReplaces runtime prop objects and ExtractPropTypes aliases with explicit TypeScript interfaces for scrollbar components; components now use defineProps() (withDefaults for defaults) and imports use ExtractPublicPropTypes. Deprecation comments added for removed aliases. Changes
Sequence Diagram(s)(omitted — changes are type/prop-interface refactors without new multi-component control flow) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
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
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 |
commit: |
|
🧪 Playground Preview: https://element-plus.run/?pr=23427 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@packages/components/scrollbar/src/scrollbar.ts`:
- Around line 83-86: The ariaOrientation prop's type currently includes the
string literal 'undefined' which is incorrect; update the ariaOrientation
property in the Scrollbar type definition to remove the string 'undefined'
(i.e., use 'horizontal' | 'vertical' or, if you need to allow the explicit
undefined value, use undefined without quotes) since the optional ? already
permits it being unset; modify the ariaOrientation declaration in
packages/components/scrollbar/src/scrollbar.ts accordingly.
In `@packages/components/scrollbar/src/scrollbar.vue`:
- Around line 58-69: The boolean props on the Scrollbar component (declared via
defineProps<ScrollbarProps>() and merged into props) are currently left
undefined by type-only props; update the withDefaults call that constructs props
to explicitly set native, noresize, and always to false so they default to false
at runtime (preserving backward compatibility with existing consumers that test
props.native === false or similar) — locate the
withDefaults(defineProps<ScrollbarProps>(), { ... }) block and add native:
false, noresize: false, always: false to its defaults.
|
@SevenDreamYang Thanks for your contribution! ❤️ |

Please make sure these boxes are checked before submitting your PR, thank you!
devbranch.ref #23399
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.