-
Notifications
You must be signed in to change notification settings - Fork 10
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
Disable keyboard interactions for DropdownCore if component is disabled #2250
Conversation
…e storybook args included opened:false, the select was always closed, which was hiding a bug where the disabled select could still be opened using keyboard arrows
…sabled if it is true. This is needed now that the dropdown opener could potentially not have the disabled attribute set (since we use aria-disabled now on the selectopener so that it can be focusable
🦋 Changeset detectedLatest commit: d266079 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Size Change: +15 B (+0.02%) Total Size: 96.8 kB
ℹ️ View Unchanged
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2250 +/- ##
==========================================
+ Coverage 94.02% 95.84% +1.81%
==========================================
Files 248 248
Lines 29362 29380 +18
Branches 1639 1811 +172
==========================================
+ Hits 27609 28158 +549
+ Misses 1749 1208 -541
- Partials 4 14 +10
... and 47 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
A new build was pushed to Chromatic! 🚀undefined Chromatic results:
|
39c5f11
to
9188844
Compare
GeraldRequired Reviewers
Don't want to be involved in this pull request? Comment |
npm Snapshot: Published🎉 Good news!! We've packaged up the latest commit from this PR (a008181) and published all packages with changesets to npm. You can install the packages in webapp by running: ./services/static/dev/tools/deploy_wonder_blocks.js --tag="PR2250" Packages can also be installed manually by running: yarn add @khanacademy/wonder-blocks-<package-name>@PR2250 |
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.
suggestion: This makes me realize that we should force the listbox/dropdown to be closed when it is disabled
even if open/opened
is set to true
.
Right now, if I use the Default
story and turn on both the opened
and disabled
controls, then the listbox will be shown, but to me it looks incorrect as disabled should take more precedence (IMO). What are your thoughts on that?
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.
That's a good point! I've updated it so the derived open state will always be false if the disabled
prop is true!
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.
LGTM! Thanks for fixing this
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.
praise: Thanks for adding all the tests (including the open + disabled
case.
Summary:
opened
prop anddisabled
prop are both trueIssue: WB-1238
Test plan:
?path=/story/packages-dropdown-singleselect--disabled
?path=/story/packages-dropdown-multiselect--disabled