-
Notifications
You must be signed in to change notification settings - Fork 15
docs(spindle-ui): add TextField design doc and tests #1644
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
base: main
Are you sure you want to change the base?
Conversation
|
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.
Pull Request Overview
This PR adds comprehensive documentation and testing for the TextField component in spindle-ui. The changes include creating a design document that outlines component usage, accessibility guidelines, and testing strategy, along with adding missing unit tests and Storybook stories to improve component coverage.
Key Changes:
- Created complete design documentation (design-doc.md) with usage examples, accessibility checklist, and test strategy
- Added unit tests for basic HTML attributes (id, placeholder, disabled, type)
- Added Storybook stories for key component states (with value, disabled, long text)
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/spindle-ui/src/Form/TextField/design-doc.md | New design documentation covering component overview, usage patterns, accessibility requirements, and testing approach |
| packages/spindle-ui/src/Form/TextField/TextField.test.tsx | Added unit tests for id, placeholder, disabled, and type attributes |
| packages/spindle-ui/src/Form/TextField/TextField.stories.tsx | Added three new stories: MediumWithValue, MediumDisabled, and MediumWithLongText |
| packages/spindle-ui/src/Form/TextField/TextField.mdx | Added documentation sections for the three new Storybook stories |
|
Visit the preview URL for this PR (updated for commit 254ad51): https://ameba-spindle--pr1644-docs-form-textfield-kba65so0.web.app (expires Sun, 25 Jan 2026 09:59:03 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: e7521619a2dd5c653490c8246e81ec2a5c8f1435 |
|
reg-suit detected visual differences. Check this report, and review them.
How can I change the check status?If reviewers approve this PR, the reg context status will be green automatically. |
5779502 to
9067d71
Compare
- TextFieldコンポーネントのdesign-docを追加 - ユニットテストを追加(id、placeholder、disabled、type属性) - Storybookストーリーを追加(入力値あり、無効化、長いテキスト)
Add unit tests for aria-invalid, aria-errormessage, and aria-describedby attributes when TextField is in error state. Update design-doc to clarify that accessibility attributes should be tested in unit tests rather than VRT.
9067d71 to
5110afa
Compare
Co-authored-by: yasuda-shin <[email protected]>
Summary
TextFieldコンポーネントのDesign Docとテストを追加しました。
Test plan