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

Enhancement/modal #631

Merged
merged 10 commits into from
Aug 31, 2021
Merged

Enhancement/modal #631

merged 10 commits into from
Aug 31, 2021

Conversation

henriquecbuss
Copy link
Member

@henriquecbuss henriquecbuss commented Aug 26, 2021

What issue does this PR close

Closes #618

Changes Proposed ( a list of new changes introduced by this PR)

  • Fix overflowing issue with the "Add contact" modal
  • Make the contact flag selection element and the user nav a lot more accessible
  • Add a keyListener custom element. It's useful to listen for keys without the need for a subscription. It's very extensible, allowing us to listen to any event, such as keydown, keypress and keyup. It also allows for multiple (typed) keys to be listened to, and to stopPropagation. We use this element to listen for Escape on modals.
  • Add a focusTrap custom element. It acts like a div, but won't let focus get outside of it. We should be careful when using it though

How to test ( a list of instructions on how to test this PR)

Testing modals:

  1. Open up a modal
  2. Press Tab a bunch of times. That should cycle the focus within the modal, but shouldn't focus elements outside of the modal. Do the same with Shift+Tab (to go in the opposite direction)
  3. Make sure you can exit it by pressing Esc on your keyboard, clicking outside of it and by clicking on the "X" button on the top

Testing the contact flag selection:

  1. Go to either the "Edit contact" page on your profile, or to the "Add contact" modal on the dashboard (it only shows up if you have no contact options)
  2. Press Tab and notice how the select is only focused once. If you enter the select, you should see that pressing the up key or down key cycles through the options

Copy link
Member

@lucca65 lucca65 left a comment

Choose a reason for hiding this comment

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

🦾

@juramos-2020
Copy link

Hello guys

Testing modals: - it's working 👌
Testing the contact flag selection: - it's working 👌

It was great 👌

@henriquecbuss henriquecbuss merged commit 073da96 into master Aug 31, 2021
@henriquecbuss henriquecbuss deleted the enhancement/modal branch August 31, 2021 13:37
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.

Close modal when pressing Esc
3 participants