docbrown/app/javascript
Suzanne Aitchison 5bed8f56d4
improve keyboard accessibility of modals 12427 10610 (#12511)
* adds focusTrap wrapper to preact Modal component

* add view specific code for focus trap in admin add nav link

* add script to return a focustrap toggle, use in add nav link modal partial

* add trap to edit nav link modal

* add handlers for sign up modal

* update modal controller for admin section, update nav link modals to use

* update other admin modals with new data values for trap

* remove unneeded erb script file

* remove unneeded target

* refactor to remove extra unneeded param

* remove duplicate code, store getFocusTrapToggle in window

* trap focus in comment and bookmark showModal instances for not logged in user

* remove need for activator id

* clean up id refs no longer needed

* remove custom code and re-use focsu-trap lib

* update storybook docs

* update default export in focusTrap

* prevent close button click triggering a modal toggle twice

* ensure if user navigates from a modal the trap is deactivated

* add jsdoc comments and add dynamic import

* ensure admin controller modal traps are cleaned up on disconnect

* update sign up modal to use crayons

* update modal controller and admin nav links modals to use preact modal

* update profile fields modals for new controller

* tweak styling of sign up and admin modals to match previous

* update listings modal to use crayons modal, adapt focus trap to work with click outside

* memoize deactivate callback to ensure modal can be presented on first page load

* add missed focustrap changes

* fix focus trap issues in onboarding flow

* refactor onboarding focus trap, remove getFocusTrapToggle

* tweaks for styling and article modal toggle

* add click outside tests to modal

* add cypress tests for the login modal

* update liquid tag tests affected by change

* refactors to address review comments

* fix issue with login modal presented twice on comment add

* change ids to selectors in admin modals

* small pr comment refactors

* add listings e2e tests

* add nav link modal tests

* fix issue with help modal

* tweak to fix ui bug from merge

* remove context from showLoginModal

* rename toggleModal

* rename state property for clarity

Co-authored-by: Nick Taylor <nick@dev.to>
2021-02-24 16:01:10 +00:00
..
.storybook Added the @components webpack alias to the project (#12808) 2021-02-24 16:07:48 +01:00
actionsPanel CSS size reduce + cleanups. (#12625) 2021-02-16 13:44:26 +01:00
admin improve keyboard accessibility of modals 12427 10610 (#12511) 2021-02-24 16:01:10 +00:00
analytics Updates ESLint rules to error on default imports (#12512) 2021-02-02 10:24:03 -05:00
article-form improve keyboard accessibility of modals 12427 10610 (#12511) 2021-02-24 16:01:10 +00:00
articles improve keyboard accessibility of modals 12427 10610 (#12511) 2021-02-24 16:01:10 +00:00
chat bugfix (#12703) 2021-02-16 15:50:37 +01:00
CommentSubscription Remove non application files from frontend code coverage (#11752) 2020-12-04 20:00:20 -05:00
common-prop-types Updates ESLint rules to error on default imports (#12512) 2021-02-02 10:24:03 -05:00
contentDisplayPolicy Updates ESLint rules to error on default imports (#12512) 2021-02-02 10:24:03 -05:00
crayons improve keyboard accessibility of modals 12427 10610 (#12511) 2021-02-24 16:01:10 +00:00
githubRepos Deprecate old button stylings with Crayons buttons (#10694) [deploy] 2020-10-14 07:28:41 -07:00
icons Storybook: Add DocsPage and test out static content (#11397) 2020-12-02 09:56:38 -08:00
leftSidebar Replace redundant div with Fragment (#12613) 2021-02-09 11:41:46 -06:00
listings improve keyboard accessibility of modals 12427 10610 (#12511) 2021-02-24 16:01:10 +00:00
modCenter Updates ESLint rules to error on default imports (#12512) 2021-02-02 10:24:03 -05:00
onboarding improve keyboard accessibility of modals 12427 10610 (#12511) 2021-02-24 16:01:10 +00:00
organization Fixed Error: Not implemented: window.computedStyle(elt, pseudoElt) console error in frontend tests. (#11633) 2020-11-26 16:55:33 -05:00
packs improve keyboard accessibility of modals 12427 10610 (#12511) 2021-02-24 16:01:10 +00:00
podcasts Remove non application files from frontend code coverage (#11752) 2020-12-04 20:00:20 -05:00
profileDropdown Updates ESLint rules to error on default imports (#12512) 2021-02-02 10:24:03 -05:00
readingList Add skip links to readinglist, podcasts, and listings (#12769) 2021-02-23 08:33:26 +00:00
responseTemplates improve keyboard accessibility of modals 12427 10610 (#12511) 2021-02-24 16:01:10 +00:00
Search Storybook: Add DocsPage and test out static content (#11397) 2020-12-02 09:56:38 -08:00
searchableItemList Reading List 15 minute fixes to prepare for #11983 (#12710) 2021-02-18 11:16:50 +01:00
shared/components improve keyboard accessibility of modals 12427 10610 (#12511) 2021-02-24 16:01:10 +00:00
sidebar-widget Refactoring SidebarWidget and sidebarUser (#10887) 2021-02-03 17:47:54 +00:00
Snackbar Storybook: Add DocsPage and test out static content (#11397) 2020-12-02 09:56:38 -08:00
topNavigation Remove 'showing' from settings dropdown in mobile devices when page loads (#12753) 2021-02-19 16:47:38 -06:00
utilities Add paste image (#10212) 2021-02-04 10:58:56 -05:00
.eslintrc.js Added the @components webpack alias to the project (#12808) 2021-02-24 16:07:48 +01:00
netlify.toml Update Netlify config to handle stylesheet changes for Storybook (#9753) 2020-08-12 11:02:14 -04:00