Skip to content

Conversation

@tenphi
Copy link
Member

@tenphi tenphi commented Oct 16, 2025

Note

Generate IDs and label-for links for standalone fields via useFieldProps; remove per-component ID wiring and stop form prop leaking to the DOM across inputs.

  • Form System:
    • useFieldProps: for fields without name, generate id via useId() and set labelProps.for; avoid useField in this mode. For form-connected fields, keep existing logic.
    • FieldBaseProps: add form prop.
    • Add concise docs in src/components/form/Claude.md.
  • Field Components (centralize ID/label handling; prevent DOM prop leaks):
    • Remove local useId()/manual labelProps.for and rely on props.id from useFieldProps in ComboBox, FilterListBox, FilterPicker, ListBox.
    • Destructure form to avoid passing it to DOM in many inputs (Checkbox, CheckboxGroup, ComboBox, FileInput, FilterListBox, FilterPicker, LegacyComboBox, ListBox, Radio, RadioGroup, Select, SliderBase, Switch, TextInputBase, TextInputMapper).
    • Switch: generate stable id and wire HiddenInput/label via that id.
    • TextInputBase: stop rendering the form attribute on the native input.

Written by Cursor Bugbot for commit 09e4796. This will update automatically on new commits. Configure here.

@changeset-bot
Copy link

changeset-bot bot commented Oct 16, 2025

🦋 Changeset detected

Latest commit: 09e4796

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cube-dev/ui-kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Oct 16, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
cube-ui-kit Ready Ready Preview Comment Oct 16, 2025 8:43am
cube-ui-kit-cursor Ready Ready Preview Comment Oct 16, 2025 8:43am

@github-actions
Copy link
Contributor

github-actions bot commented Oct 16, 2025

📦 NPM canary release

Deployed canary version 0.0.0-canary-a2b7e68.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 16, 2025

🧪 Storybook is successfully deployed!

@github-actions
Copy link
Contributor

github-actions bot commented Oct 16, 2025

🏋️ Size limit report

Name Size Passed?
All 304.27 KB (-0.01% 🔽👏) Yes 🎉
Tree shaking (just a Button) 32.07 KB (0% 🟰) Yes 🎉
Tree shaking (just an Icon) 19.39 KB (0% 🟰) Yes 🎉

Click here if you want to find out what is changed in this build

cursor[bot]

This comment was marked as outdated.

return result as Props;
}
return props;
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Standalone Fields Lack Proper Label Linking

Standalone fields (without a name prop) with an explicitly provided id prop do not automatically get labelProps.for set to match their id. This breaks label-input accessibility linking and contradicts documented behavior.

Fix in Cursor Fix in Web

@tenphi tenphi merged commit e88acca into main Oct 16, 2025
14 checks passed
@tenphi tenphi deleted the feat-auto-ids branch October 16, 2025 08:46
@github-actions github-actions bot mentioned this pull request Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants