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

Set review stepper state to complete after user submits registration #1162

Merged
merged 2 commits into from
Mar 4, 2024

Conversation

daniellemaxwell
Copy link
Collaborator

@daniellemaxwell daniellemaxwell commented Feb 28, 2024

Scope of changes

Sets the stepper status to complete after a user submits the registration form.

Type of change

  • bug fix
  • new feature
  • documentation
  • other (describe)

Acceptance criteria

https://www.awesomescreenshot.com/video/25370460?key=2b8264fa9105338e9f47cf1ebeb01572

Author checklist

  • I have manually tested the change and/or added automation in the form of unit tests or integration tests
  • I have updated the dependencies list
  • I have recompiled and included new protocol buffers to reflect changes I made
  • I have added new test fixtures as needed to support added tests
  • Check this box if a reviewer can merge this pull request after approval (leave it unchecked if you want to do it yourself)
  • I have moved the associated Shortcut story to "Ready for Review"

Reviewer(s) checklist

  • Any new user-facing content that has been added for this PR has been QA'ed to ensure correct grammar, spelling, and understandability.

@daniellemaxwell daniellemaxwell marked this pull request as ready for review February 28, 2024 21:07
@@ -71,6 +72,11 @@ const ReviewSubmit: React.FC<ReviewSubmitProps> = ({
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isSent]);

// Update the review step status to complete if the user submits a registration.
if (isTestNetSubmitted || isMainNetSubmitted) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The stepper label color doesn't immediately update after the registration is submitted. To fix this, I think react-query will have to be used which would require some refactoring that should be handled in a separate story.

Copy link
Collaborator

@pdeziel pdeziel left a comment

Choose a reason for hiding this comment

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

Makes sense to me, I just had one question about the setStepStatus method.

@@ -71,6 +72,11 @@ const ReviewSubmit: React.FC<ReviewSubmitProps> = ({
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isSent]);

// Update the review step status to complete if the user submits a registration.
if (isTestNetSubmitted || isMainNetSubmitted) {
dispatch(setStepStatus({ step: 6, status: LSTATUS.COMPLETE }));
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the significance of the 6? Is it the step number?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, 6 is the review step number. There are constants for steps 1-5. I was unable to determine why 6 was excluded, since 6 is listed as a step number a few times in the code. However, I did notice some cases where the constants weren't used for other step numbers, so a story updating this should be added.

@daniellemaxwell daniellemaxwell merged commit a5e35a6 into main Mar 4, 2024
15 checks passed
@daniellemaxwell daniellemaxwell deleted the review-stepper branch March 4, 2024 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants