Skip to content

Conversation

@kegrimes
Copy link
Contributor

@kegrimes kegrimes commented Dec 13, 2025

Description

Since the percentage in ASR is calculated based on number of filled fields, it may be confusing to users when the first step shows 0% and does not increase after clicking "Continue". To eliminate this confusion, I included the steps in the percentage calculation so that progress is reflected immediately. This logic aligns with the other reports, which calculate progress based on step completion.

Testing

  • Go to /reports/additionalSalaryRequest
  • Check that there is an initial percent
  • Click "Continue" button
  • Check that the percent has updated
  • Add a few values in fields
  • Check the percent updates

Checklist:

  • I have given my PR a title with the format "MPDX-(JIRA#) (summary sentence max 80 chars)"
  • I have applied the appropriate labels (Add the label "Preview" to automatically create a preview environment)
  • I have run the Claude Code /pr-review command locally and fixed any relevant suggestions
  • I have requested a review from another person on the project
  • I have tested my changes in preview or in staging
  • I have cleaned up my commit history

@github-actions
Copy link
Contributor

Bundle sizes [mpdx-react]

Compared against 4f67f48

No significant changes found

@kegrimes kegrimes added the Preview Environment Add this label to create an Amplify Preview label Dec 13, 2025
@github-actions
Copy link
Contributor

@kegrimes kegrimes requested a review from wjames111 December 13, 2025 10:36
@wjames111
Copy link
Contributor

I really like the combination of steps and fields filled. I think this is a good middle ground for ASR. @canac what do you think?

Copy link
Contributor

@wjames111 wjames111 left a comment

Choose a reason for hiding this comment

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

Looks great thanks for updating this! I think this is a good in between, that being said Caleb brought up a good point that it is likely most of these fields will go unitized. In light of this factoring in the fields might be a little misleading. I'm thinking maybe we should just go with calculating the steps only.

(value) => typeof value === 'string' || typeof value === 'number',
);

const stepsCompleted = currentIndex + 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

This makes the form start at 5%. Although changing this makes the form end at 95%. I would think we want it to start at 0% and end at 100%

Suggested change
const stepsCompleted = currentIndex + 1;
const stepsCompleted = currentIndex;

@canac
Copy link
Contributor

canac commented Dec 15, 2025

I think it should be 0% on the first page and 100% on the confirmation page. But I don't have strong opinions about what the percentage shows on the actual form. Honestly, I'm not sure that the progress indicator adds much value on the ASR form, but I'm also not opposed to keeping it. Sorry, that's probably not super helpful, but I don't think it matters too much.

@dr-bizz
Copy link
Contributor

dr-bizz commented Dec 18, 2025

@canac Katelyn and I went back and forth on this. I'm unsure what the best way is as well, but fine with what Katelyn has done for now and it's easy to change it later on.

If we started at 0%
First step: 0%
Second step: 25%
Third step: 50%
Fourth step: 100%

If we started at 25%
First step: 25%
Second step: 50%
Third step: 75%
Fourth step: 100%

So it really comes down to where you want the 25% jump, at the start or the beginning.

@dr-bizz
Copy link
Contributor

dr-bizz commented Dec 18, 2025

Actually, maybe I'm thinking of MHA

@wjames111
Copy link
Contributor

wjames111 commented Dec 18, 2025

@dr-bizz this one's weird as it only really has 1 true step, there's the about the form, then the complete the form and the receipt. Initially we thought it made the most sense to go by fields filled out for the percentage but then realized, for most people the majority of fields would stay blank. This PR combines both the steps and the fields filled out to get the percentage. I think we probably want to change it so that either it's only steps being calculated or do away entirely with the percent.

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

Labels

Preview Environment Add this label to create an Amplify Preview

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants