Skip to content

Update useTagGroup and useTag returned prop names #4156

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

Merged
merged 2 commits into from
Mar 3, 2023

Conversation

reidbarber
Copy link
Member

Updating the returned props from useTagGroup and useTag to better reflect the roles of the elements they are used for. This better matches out existing APIs (i.e. useGridList) and makes it more clear to the user what roles are being used.

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

@reidbarber reidbarber added the small review Easy to review PR label Mar 3, 2023
@rspbot
Copy link

rspbot commented Mar 3, 2023

snowystinger
snowystinger previously approved these changes Mar 3, 2023
@rspbot
Copy link

rspbot commented Mar 3, 2023

@rspbot
Copy link

rspbot commented Mar 3, 2023

## API Changes

unknown top level export { type: 'identifier', name: 'Column' }
unknown top level export { type: 'identifier', name: 'Column' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }

@react-aria/tag

TagGroupAria

 TagGroupAria {
   descriptionProps: DOMAttributes
   errorMessageProps: DOMAttributes
+  gridProps: DOMAttributes
   labelProps: DOMAttributes
-  tagGroupProps: DOMAttributes
 }

it changed:

  • useTagGroup

TagAria

 TagAria {
   clearButtonProps: AriaButtonProps
+  gridCellProps: DOMAttributes
   labelProps: DOMAttributes
-  tagProps: DOMAttributes
-  tagRowProps: DOMAttributes
+  rowProps: DOMAttributes
 }

it changed:

  • useTag

@reidbarber reidbarber merged commit 31c81da into main Mar 3, 2023
@reidbarber reidbarber deleted the taggroup-api-changes branch March 3, 2023 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
small review Easy to review PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants