-
-
Notifications
You must be signed in to change notification settings - Fork 9k
types(jsx): correct the naming of the enterKeyHint property in InputHTMLAttributes #14090
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
Conversation
…InputHTMLAttributes Change the enterKeyHint property to the lowercase form enterkeyhint to comply with HTML standard specifications, and add a deprecation flag to prompt for migration.
WalkthroughThe change renames the HTML input attribute Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/runtime-dom/src/jsx.ts (1)
550-558: Addenterkeyhintproperty toTextareaHTMLAttributesinterface for complete HTML spec compliance.The PR correctly updates
InputHTMLAttributeswith theenterkeyhintproperty, but the HTML attributeenterkeyhintis valid on textarea elements as well. TheTextareaHTMLAttributesinterface (line 760) is missing this property, creating an inconsistency since it's already listed inpackages/shared/src/domAttrConfig.ts(line 69) as a recognized global attribute.Required update: Add the same
enterkeyhintproperty definition toTextareaHTMLAttributesto ensure complete HTML spec coverage and consistency across all applicable input-capable elements.
🧹 Nitpick comments (1)
packages/runtime-dom/src/jsx.ts (1)
559-562: Consider enhancing the deprecation notice with a timeline.The deprecation strategy is sound, maintaining backward compatibility while guiding users to the new property. However, the deprecation comment could be more informative by including when the property will be removed.
Consider updating the deprecation comment to include version information:
/** - * @deprecated Use `enterkeyhint` instead. + * @deprecated Use `enterkeyhint` instead. This alias will be removed in Vue 4.0. */ enterKeyHint?: InputHTMLAttributes['enterkeyhint']This helps users plan their migration timeline accordingly.
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
Size ReportBundles
Usages
|
Close #14088
Correct the naming of the
enterKeyHintproperty inInputHTMLAttributesChange the enterKeyHint property to the lowercase form enterkeyhint to comply with HTML standard specifications, and add a deprecation flag to prompt for migration.
Summary by CodeRabbit