-
Notifications
You must be signed in to change notification settings - Fork 293
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
Pressing the ESC key when editing a role closes the modal #5442
Comments
IB ✅ |
QA Update ❌@nfmohit I noticed two issues: Issue 1 : if user edit roles via opening 'who can view' access through icon, selects no role and clicks 'ESC' then user gets exit from edit roles. But if user open 'edit role' via clicking on 'Add roles' text and after that selects no role then and clicks on 'ESC' then nothing happens. Issue 2 : If user edit roles and after that selects view access from dropdown and clicks on 'ESC' then nothing happens. If user manage both settings individually and clicks on 'ESC' then it closes the editor. Recording.122.mp4 |
Thank you for reporting this @mohitwp! I've added a new PR to address this. |
QA Update ✅Both reported issues here are now resolved.
|
Bug Description
Bug bash issue: https://app.asana.com/0/1202258919887896/1202445324880218 please see Asana for background
When the user is editing the roles, via the UserRoleSelect component, pressing the ESC key closes the modal dialog altogether which should not be the case. Instead, when editing the roles, pressing the ESC key closes the edit mode state, i.e where we have the pills. Pressing the ESC key again only should close the dialog.
This is definitely a nice-to-have for accessibility/keyboard users, because it's unexpected behaviour… but given you can still close the edit mode state by navigating to the close button with a keyboard I don't think it needs to be a launch blocker.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Essentially, when in this view:
Pressing "Esc" should not close the modal but instead return to this view:
Implementation Brief
In
assets/js/components/dashboard-sharing/DashboardSharingSettingsButton.js
:escapeKeyAction
prop to the<Dialog />
component.EDITING_USER_ROLE_SELECT_SLUG_KEY
state has a nonundefined
value, conditionally set the value for theescapeKeyAction
prop to an empty string.close
.Test Coverage
QA Brief
dashboardSharing
feature flag is enabled.escape
key while editing roles doesn't close the modal, it should just close the role editor instead.escape
key while not editing roles closes the modal.escape
key closes the role editor when opened using theAdd Roles
link.escape
key closes the role editor after editing theWho can manage access
dropdown.Changelog entry
The text was updated successfully, but these errors were encountered: