-
Notifications
You must be signed in to change notification settings - Fork 941
feat: create useTagGroup hook #1665
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
082ad56 to
7e0e332
Compare
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 pull request introduces a new useTagGroup hook to the Downshift library for building accessible tag group components. The PR includes comprehensive implementation, TypeScript type definitions, testing, documentation, and a major refactoring to convert several utility functions from JavaScript to TypeScript.
Changes:
- Created new
useTagGrouphook with full implementation, types, tests, and documentation - Refactored utility functions from JavaScript to TypeScript in
src/utils-ts/ - Updated TypeScript configuration to emit declaration files
- Added Cypress end-to-end tests and Docusaurus example pages for the new hook
Reviewed changes
Copilot reviewed 118 out of 123 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/hooks/useTagGroup/index.ts | Main hook implementation providing tag group functionality |
| src/hooks/useTagGroup/index.types.ts | TypeScript type definitions for the hook API |
| src/hooks/useTagGroup/reducer.ts | State reducer handling tag group actions |
| src/utils-ts/* | Refactored utility functions from JS to TS |
| typings/index.d.ts | Updated type declarations to export useTagGroup types |
| src/hooks/useTagGroup/tests/* | Comprehensive test suite for the new hook |
| docusaurus/pages/useTagGroup.tsx | Documentation example page |
| cypress/e2e/useTagGroup.cy.js | End-to-end tests |
| tsconfig.json | Updated to emit TypeScript declarations |
| src/hooks/useTagGroup/README.md | Detailed documentation for the hook |
Comments suppressed due to low confidence (1)
docusaurus/utils.ts:38
- Corrected typo in variable name from 'tagGroupSyles' to 'tagGroupStyles'. Note: This change should be propagated to all usage sites in docusaurus/pages/useMultipleSelect.js and docusaurus/pages/useMultipleCombobox.js.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Copilot reviewed 121 out of 126 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Copilot reviewed 122 out of 127 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
What:
Creates the
useTagGrouphook and exports it.Why:
Better DX for building multi selection combobox and select components. Also useful as a standalone component.
How:
Checklist: