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

Refactor out shared utilities for overlay components #345

Closed
4 of 7 tasks
lavelle opened this issue Jun 24, 2019 · 3 comments
Closed
4 of 7 tasks

Refactor out shared utilities for overlay components #345

lavelle opened this issue Jun 24, 2019 · 3 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@lavelle
Copy link
Contributor

lavelle commented Jun 24, 2019

ModalCurtain already has a couple of these as subcomponents. They could be rewritten to use React Hooks with their own unit tests.

Some code we could share between Modal, Popover and Tooltip

  • Esc Listener
  • No Scroll
  • Focus Trap
  • Aria role and label
  • Conditional portal-ing
  • Popper
  • SRR check
@lavelle lavelle added the help wanted Extra attention is needed label Jun 24, 2019
@lavelle
Copy link
Contributor Author

lavelle commented Jun 24, 2019

Looking at writing tests for Popover, i definitely think this is a good idea. So many of the tests for ModalCurtain are just for testing the ESC functionality. We can make those generic tests for the utility function, rather than copying them for every component that has that behaviour

cc @danoc

@lavelle lavelle self-assigned this Jun 24, 2019
@lavelle
Copy link
Contributor Author

lavelle commented Jun 26, 2019

Started in #351

@lavelle
Copy link
Contributor Author

lavelle commented Jun 28, 2019

Will close this for now. We can maybe handle the other hooks in their own issues if we want to, but i think the most important ones are done.

@lavelle lavelle closed this as completed Jun 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant