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

🐛 Convert assessment wizard to modal #1486

Merged
merged 8 commits into from
Oct 27, 2023

Conversation

ibolton336
Copy link
Member

@ibolton336 ibolton336 changed the title 🐛 Convert assessment wizard to moda 🐛 Convert assessment wizard to modal Oct 23, 2023
@codecov
Copy link

codecov bot commented Oct 23, 2023

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (4624f4d) 40.29% compared to head (00a6f39) 40.22%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1486      +/-   ##
==========================================
- Coverage   40.29%   40.22%   -0.07%     
==========================================
  Files         143      143              
  Lines        4532     4539       +7     
  Branches     1096     1096              
==========================================
  Hits         1826     1826              
- Misses       2609     2616       +7     
  Partials       97       97              
Flag Coverage Δ
client 40.22% <0.00%> (-0.07%) ⬇️
server ∅ <ø> (∅)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
client/src/app/queries/assessments.ts 20.96% <0.00%> (-2.67%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gitdallas gitdallas self-requested a review October 25, 2023 14:12
Copy link
Collaborator

@mturley mturley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ibolton336 this mostly LGTM, but with the wizard in a modal it should have a WizardHeader at the top passed in via the header prop of Wizard (example here)

Screenshot 2023-10-25 at 10 34 14 AM

@gitdallas
Copy link
Collaborator

gitdallas commented Oct 25, 2023

I was going to comment about the wizard header as well. With title/sub something like Questionaire/[Title of questionaire].

Also, I was wondering why you hid the button like that instead of using showClose={false} on the modal.. but when i attempt to do that, I get an error about a focus trap without a tabbable node. Perhaps this would change with the wizard header in place.

Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks ok, but another issue -- on the Assessment Actions screen, the archived questionnaires View buttons have a spinner to the left:
image

@ibolton336 ibolton336 force-pushed the fix-assessment-form-bug branch 2 times, most recently from 21788c3 to 23cb0a7 Compare October 25, 2023 20:47
Copy link
Collaborator

@gitdallas gitdallas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still seeing the focus trap without tabbable node error, also I think this should be reworded now that it isn't a page:

image

perhaps just replace "page" with "assessment" or "questionnare"?

<Modal
isOpen={isOpen}
onClose={onRequestClose}
showClose={false}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
showClose={false}
showClose={isFetching || !!fetchError}

this seems to fix the focus trap issue. it is an issue when you have an error/loader rather than the wizard.

Copy link
Collaborator

@gitdallas gitdallas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly lgtm, one verbiage comment

@@ -583,13 +583,13 @@ export const AssessmentWizard: React.FC<AssessmentWizardProps> = ({
<ConfirmDialog
title={t("dialog.title.leavePage")}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

title should probably be changed too. "Close Assessment"? or if you want to use existing message... maybe dialog.title.discard with Assessment for the what?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other possible confirm modal titles:

  • "Leave assessment"
  • "Confirm cancel"
  • "Close wizard"

Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes LGTM.
The assessment actions page and the wizard all work well.

As already noted, the title for the confirm cancel modal is confusing since the assessment is a wizard and not a page anymore.

@ibolton336 ibolton336 force-pushed the fix-assessment-form-bug branch 2 times, most recently from cdfc25b to 1b08eac Compare October 27, 2023 18:30
@ibolton336 ibolton336 force-pushed the fix-assessment-form-bug branch from 1b08eac to b50969c Compare October 27, 2023 18:31
Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a nice confirm title and everything!

Signed-off-by: ibolton336 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants