docbrown/app/assets/javascripts/utilities
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
..
browserStoreCache.js Fixes some lint issues (#3786) 2019-08-22 15:59:13 -04:00
buildArticleHTML.js Fix irregular comment count buttons (#12724) 2021-02-22 12:11:44 -06:00
buildCommentFormHTML.js.erb Fixing overflow of comment button (#11562) 2020-11-23 12:17:30 +01:00
buildCommentHTML.js.erb Comments UI update (#11283) 2020-11-18 18:21:19 -05:00
checkUserLoggedIn.js Replace querySelector and getElementsByTagName when selecting for head and body (#8315) 2020-06-08 20:08:40 -04:00
dynamicallyLoadScript.js Ran prettier on *.js, *.jsx and *.md files. (#11586) 2020-11-23 20:45:50 -05:00
getCsrfToken.js [deploy] Remove ERB pre-processing from pure JS files and cleanup (#8030) 2020-05-27 08:25:39 -05:00
getCurrentPage.js Fixes some lint issues (#3786) 2019-08-22 15:59:13 -04:00
getImageForLink.js Fixes some lint issues (#3786) 2019-08-22 15:59:13 -04:00
insertAfter.js Fixes some lint issues (#3786) 2019-08-22 15:59:13 -04:00
localDateTime.js Using global util function for displaying date in listing dashboard (#10244) 2020-09-09 09:35:05 +02:00
localStorageTest.js Fixes some lint issues (#3786) 2019-08-22 15:59:13 -04:00
preventDefaultAction.js Fixes some lint issues (#3786) 2019-08-22 15:59:13 -04:00
sendFetch.js Ran prettier on *.js, *.jsx and *.md files. (#11586) 2020-11-23 20:45:50 -05:00
sendHapticMessage.js Fixed some lint issues (#3782) 2019-08-21 10:44:23 -04:00
showLoginModal.js improve keyboard accessibility of modals 12427 10610 (#12511) 2021-02-24 16:01:10 +00:00
showUserAlertModal.js Fixing gap property for all occurrences of flex to work in Safari (#12667) 2021-02-17 11:40:38 +01:00
slideSidebar.js Remove swipe gestures and other unnecessary code (#12027) 2020-12-30 12:17:29 -05:00
timeAgo.js Ran prettier on *.js, *.jsx and *.md files. (#11586) 2020-11-23 20:45:50 -05:00
userData.js Refactored userData while working on hompage makeover. (#5916) [deploy] 2020-02-06 11:18:52 -08:00