Skip to content
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

fix(table-batch-action): remove default iconDescription, add proptype check, update stories #3928

Merged
merged 7 commits into from
Sep 10, 2019

Conversation

jendowns
Copy link
Contributor

@jendowns jendowns commented Sep 6, 2019

Closes #3809

The 2 big takeaways for me from #3809 are:

  1. if button text is provided, iconDescription is not necessary (and shouldn't be present)
  2. iconDescription should not be "Add" by default because that adds noise for screen readers

Both of these points are very similar to what's been changed with the Button's props recently (https://github.com/carbon-design-system/carbon/blob/master/packages/react/src/components/Button/Button.js#L177) , so I used that component as a guide here.

Changelog

New

Changed

Removed

Testing / Reviewing

Please note that I am unable to test in JAWS myself (cc @dakahn how should we verify this? thanks for your help!)

@netlify
Copy link

netlify bot commented Sep 6, 2019

Deploy preview for the-carbon-components ready!

Built with commit 61634e4

https://deploy-preview-3928--the-carbon-components.netlify.com

@netlify
Copy link

netlify bot commented Sep 6, 2019

Deploy preview for carbon-elements ready!

Built with commit 61634e4

https://deploy-preview-3928--carbon-elements.netlify.com

@netlify
Copy link

netlify bot commented Sep 6, 2019

Deploy preview for carbon-components-react ready!

Built with commit 61634e4

https://deploy-preview-3928--carbon-components-react.netlify.com

@netlify
Copy link

netlify bot commented Sep 6, 2019

Deploy preview for the-carbon-components ready!

Built with commit b3fa472

https://deploy-preview-3928--the-carbon-components.netlify.com

@netlify
Copy link

netlify bot commented Sep 6, 2019

Deploy preview for carbon-components-react ready!

Built with commit b3fa472

https://deploy-preview-3928--carbon-components-react.netlify.com

@netlify
Copy link

netlify bot commented Sep 6, 2019

Deploy preview for carbon-elements ready!

Built with commit b3fa472

https://deploy-preview-3928--carbon-elements.netlify.com

*/
iconDescription: PropTypes.string.isRequired,
hasIconOnly: PropTypes.bool,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is hasIconOnly being used anywhere?

Copy link
Contributor Author

@jendowns jendowns Sep 6, 2019

Choose a reason for hiding this comment

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

Oh right, it's not 😅

I could update the batch actions story to include sample usage of hasIconOnly with iconDescription? Something like this, maybe for that last button in the batch actions series ("Download"):

<TableBatchAction
  hasIconOnly
  renderIcon={Download}
  iconDescription="Download the selected rows"
  onClick={batchActionClick(selectedRows)}
/>

Or would you prefer to remove hasIconOnly from this?

@jnm2377 jnm2377 requested a review from a team September 9, 2019 19:22
@ghost ghost requested review from alisonjoseph and asudoh and removed request for a team September 9, 2019 19:22
Copy link
Contributor

@asudoh asudoh left a comment

Choose a reason for hiding this comment

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

LGTM 👍 - Thanks @jendowns!

@asudoh asudoh merged commit 765e7ec into carbon-design-system:master Sep 10, 2019
@jendowns jendowns deleted the 3809 branch September 11, 2019 15:02
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.

TableBatchAction iconDescription should only be required when there are no children and should default to ''
4 participants