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(TreeView): prevent disabled node selection and expansion #11520

Conversation

emyarod
Copy link
Member

@emyarod emyarod commented Jun 1, 2022

Related #6792
Related #11402

This PR prevents keyboard shortcuts and mouse interactions to affect disabled tree node expansion and selection states

Changelog

New

  • prevent disabled node expansion and selection

Changed

  • unnest CSS

Testing / Reviewing

the existing keyboard shortcuts should still function as expected except for disabled tree nodes

reviewers can also hide whitespace changes in GitHub for a cleaner diff on the style changes

@emyarod emyarod requested a review from a team as a code owner June 1, 2022 15:06
@emyarod emyarod requested review from aledavila and jnm2377 June 1, 2022 15:06
@netlify
Copy link

netlify bot commented Jun 1, 2022

Deploy Preview for carbon-components-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit f005ed2
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/6298da899e61930008c4f94f
😎 Deploy Preview https://deploy-preview-11520--carbon-components-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Jun 1, 2022

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit f005ed2
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/6298da898f64740008d591fd
😎 Deploy Preview https://deploy-preview-11520--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@jnm2377
Copy link
Contributor

jnm2377 commented Jun 1, 2022

Hey @emyarod thanks for opening this. Maybe I'm missing something, but when I test in the current storybook example of TreeView, it's already not clickable/expandable via mouse or keyboard. Should I be testing this differently to make sure it's working? I am testing via mouse + keyboard arrows/space/enter.

Screen.Recording.2022-06-01.at.1.00.13.PM.mov

@emyarod
Copy link
Member Author

emyarod commented Jun 1, 2022

@jnm2377 the PR will also prevent expansion and collapsing when clicking disabled toggle buttons

this is the current storybook behavior:

Screen.Recording.2022-06-01.at.15.05.26.mov

@kodiakhq kodiakhq bot merged commit a7964cd into carbon-design-system:main Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants