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

Create Accessible and Reusable Modal Dialog Component and Refactor Existing Dialogs to Use It #1282

Closed
3 of 4 tasks
entrotech opened this issue Dec 1, 2022 · 10 comments · Fixed by #1422, #1424 or #1426
Closed
3 of 4 tasks

Comments

@entrotech
Copy link
Member

entrotech commented Dec 1, 2022

Overview

We need to use a common dialog component for implementing modal dialogs in the application in order to reduce duplicate code and ensure consistency in the look and feel of the various dialogs. Currently, there are several modal dialogs in the application, each of them implemented independently, with differing behavior and styles.

Action Items

  • Create the common dialog component. The behavior should be:
    • Auto-focus on the first focusable body element when the modal is opened.
    • Trap focus on the modal so that it doesn't leave the modal elements until the modal is closed.
    • The Escape key should close the modal without taking any action.
    • The Enter key should have standard behavior (i.e., if a button has focus, clicking the button)
    • Standardize the appearance of the Header's close button.
  • Use it to replace the Project Delete dialog
  • Replace the "Leave the Project Wizard" Dialog,
  • Replace the Delete FAQ dialog,

Resources/Instructions

See https://medium.com/@seif_ghezala/how-to-create-an-accessible-react-modal-5b87e6a27503 for a good implementation.

Examples:
Checklist Modal Dialog:
image

Leave the project Wizard Dialog:
image

Delete Project Dialog:
image

Terms and Conditions Dialog
image

@entrotech entrotech changed the title Refactor Modal Dialogs to use common dialog component. Create Accessible and Reusable Modal Dialog Component and Refactor Existing Dialogs to Use It Dec 1, 2022
@ExperimentsInHonesty ExperimentsInHonesty added this to the Z - Continuous milestone Jan 29, 2023
@Jonathanko52 Jonathanko52 self-assigned this Mar 16, 2023
@Biuwa
Copy link
Member

Biuwa commented May 10, 2023

@Jonathanko52

Please provide update

Progress: "What is the current status of your project? What have you completed and what is left to do?"
Blockers: "Difficulties or errors encountered."
Availability: "How much time will you have this week to work on this issue?"
ETA: "When do you expect this issue to be completed?"
Pictures (if necessary): "Add any pictures that will help illustrate what you are working on."

@Jonathanko52
Copy link
Member

Progress: Two of eight modals replaced on my local repository.
Blockers: I'd like to run my current plans for how functions/icons/other data in modals should be stored in the app
Availability: Limited in the coming weeks. I can probably reply to slack messages.
ETA: Two weeks.
Pictures (if necessary):

@Jonathanko52
Copy link
Member

Progress: Four of eight modals replaced on my local repository. Modals have been modified to take in functions and open/close state as props from parent components.
Blockers: None.
Availability: Limited in the coming weeks. I can probably reply to slack messages.
ETA: Two weeks.
Pictures (if necessary):

@Jonathanko52
Copy link
Member

Progress: Removed two modals, bringing the total number of modals down to six. Three of which are completed.
Blockers: I don't feel comfotable proceeding until I've discussed with team best practices for moving functionality out of modals into parent components.
Availability: Limited in the coming weeks. I can probably reply to slack messages.
ETA: One week
Pictures (if necessary):

@Biuwa
Copy link
Member

Biuwa commented Jun 15, 2023

@Jonathanko52 Please provide an update.

@Jonathanko52
Copy link
Member

Progress: Added the ability for Modal to take components as props, which is used for some other modals in the project that have extensive text. Now working on The last two Modals, duplicate and delete project.
Blockers: None.
Availability: Limited in the coming weeks. I can probably reply to slack messages.
ETA: One week
Pictures (if necessary):

@Jonathanko52
Copy link
Member

Progress: "Duplicate" modal now able to make duplicates. I still have to add the ability to change titles. That aside, that leaves the "Delete" Modal
Blockers: None.
Availability: Weekdays.
ETA: End of week
Pictures (if necessary):

@Jonathanko52
Copy link
Member

Progress: Inapplicable, Navconfirm, DeleteProject, Duplicate, Terms and Conditions, and Checklist Modals replaced. Trap focus to Modal function added.
Blockers: None.
Availability: Weekdays.
ETA: Code complete. Ready for testing/review.
Pictures (if necessary):

@Jonathanko52
Copy link
Member

Progress: Code cleanup. Enter now standardized to activate in-focus item. Colors added for delete, duplicate, and terms and conditions buttons
Blockers: None.
Availability: Weekdays.
ETA:
Pictures (if necessary):

@Biuwa
Copy link
Member

Biuwa commented Aug 10, 2023

@entrotech - Please review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment