-
Notifications
You must be signed in to change notification settings - Fork 3
Modals
Main file: https://github.com/benetech/MathShare/blob/development/src/components/ModalContainer/index.js
Modal Directory: https://github.com/benetech/MathShare/tree/development/src/components/ModalContainer/components
By default the first child in the modal is focused when the modal opens, but it can be customized (ref - https://github.com/davidtheclark/react-aria-modal#initialfocus). Currently we are manually focusing the header from within redux saga, it can be changed to use this option to avoid any conflicts with the library.
react-aria-modal uses focus-trap (https://github.com/davidtheclark/focus-trap) library to trap focus within the modal, it can be disabled using the following option (https://github.com/davidtheclark/react-aria-modal#focustrappaused)
Code: https://github.com/benetech/MathShare/blob/development/src/components/ModalContainer/components/ConfirmationModal/index.js Shown when user tries to move away from current page when it has unsaved work.
Code: https://github.com/benetech/MathShare/blob/development/src/components/ModalContainer/components/NewProblemSetShareModal/index.js This modal is deprecated, it was used to show share link of new problem set.
Code: https://github.com/benetech/MathShare/blob/development/src/components/Home/components/ButtonsPaletteChooser/index.js This modal is shown to select the available palettes, while creating a new problem set.
Code: https://github.com/benetech/MathShare/blob/development/src/components/ModalContainer/components/PersonalizationModal/index.js This modal is only available for logged in users and is used to personalize user settings.
Code: https://github.com/benetech/MathShare/blob/development/src/components/ModalContainer/components/ProblemModal/index.js This modal is deprecated, it was used to show the problem title and math in a modal.
Code: https://github.com/benetech/MathShare/blob/development/src/components/ModalContainer/components/ProblemSetShareModal/index.js This is a common modal used to share Problem Set and Solution by copying its link or sharing it on integrated 3rd party services like Google Classroom or Microsoft Teams
Code: https://github.com/benetech/MathShare/blob/development/src/components/ModalContainer/components/SaveModal/index.js This modal is deprecated, it was used to show edit link of new problem set.
Code: https://github.com/benetech/MathShare/blob/development/src/components/ModalContainer/components/ShareModal/index.js This modal is deprecated, it was used to show share link of solution set.
Code: https://github.com/benetech/MathShare/blob/development/src/components/ModalContainer/components/SignInModal/index.js This is 'Sign In' prompt shown to users who are not logged in.
Code: https://github.com/benetech/MathShare/blob/development/src/components/ModalContainer/components/TitleEditModal/index.js This modal is available on the Problem Set edit view, it is used to edit the Problem Set title