Skip to content

Conversation

@Siyasanga
Copy link
Contributor

@Siyasanga Siyasanga commented Aug 26, 2025

Addresses: #10132

Country-config PR: opencrvs/opencrvs-countryconfig#959

Description

Clearly describe what has been changed. Include relevant context or background.
Explain how the issue was fixed (if applicable) and the root cause.

Link this pull request to the GitHub issue (and optionally name the branch ocrvs-<issue #>)

Checklist

  • I have linked the correct Github issue under "Development"
  • I have tested the changes locally, and written appropriate tests
  • I have tested beyond the happy path (e.g. edge cases, failure paths)
  • I have updated the changelog with this change (if applicable)
  • I have updated the GitHub issue status accordingly

Note

Always display a "Go to review" button across event forms by default, replacing "Back to review" and updating i18n, navigation, components, and tests accordingly.

  • Frontend
    • Form navigation:
      • Default showReviewButton to true in v2-events/features/events/components/Pages.tsx; remove conditional showReviewButton passing from DECLARE/REGISTER/VALIDATE/REQUEST_CORRECTION pages; explicitly set showReviewButton=false for PRINT_CERTIFICATE.
      • Rename button label from "Back to review""Go to review" in FormWizard, VerificationWizard, and all usages; update button ids/keys.
    • i18n:
      • Add messages.goToReviewButton in i18n/messages/views/register.ts; adjust references throughout.
    • Review/Summary:
      • Update correction summary top action to "Go to review" and navigation; adjust ReviewSection to persist (writeDeclaration) before navigating from review edits.
    • Stories/Tests:
      • Replace interactions expecting "Back to review" with "Go to review" across multiple Storybook tests.
  • Docs
    • Add CHANGELOG entry: always display a "Go to review" button on every form page.

Written by Cursor Bugbot for commit 0507adf. This will update automatically on new commits. Configure here.

{continueButtonText}
</Button>

{showReviewButton && (
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the showReviewButton being used for something else? If not can we remove it then?

description: 'Back button text',
id: 'v2.buttons.back'
},
backToReview: {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
backToReview: {
goToReview: {

)}
</Button>
),
declaration.review && (
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want the same change in v1 too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @Zangetsu101, what do you mean by v1? I thought this is v1

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry let me rephrase that, do we need the change in v1? Or just having it in v2 is enough?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @Zangetsu101 I'm not sure about this detail, @euanmillar can you weigh in please. My thinking was that I needed to do it for both v1 and v2 to keep things consistent but since Residence Registration is a v2 event I think it makes sense to to only make the change on v2 side

@Zangetsu101 Zangetsu101 changed the title feat: Ensure "Go to review" is always desplayed for forms feat: Ensure "Go to review" is always displayed for forms Aug 28, 2025
@Siyasanga Siyasanga requested a review from Zangetsu101 August 29, 2025 08:10
@github-actions
Copy link

github-actions bot commented Oct 3, 2025

This PR has been marked with label stale Since it has been inactive for 20 days. It will automatically be closed in 10 days if no further activity occurs.

@github-actions github-actions bot added the Stale The pr is inactive label Oct 3, 2025
@Siyasanga Siyasanga removed the Stale The pr is inactive label Oct 3, 2025
@Siyasanga Siyasanga force-pushed the ocrvs-10132 branch 4 times, most recently from f2e2b31 to b24039a Compare October 8, 2025 08:29
formPages={formPages}
pageId={currentPageId}
setFormData={(data) => setAnnotation(data)}
showReviewButton={false}
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to show the review button during the initial correction form too? There are two forms during the correction flow, one that collects details regarding the correction and the other is the usual declaration form where we make the corrections. This is the first one so let's make sure we are consciously removing it

})}
pageId={currentPageId}
setFormData={(data) => setAnnotation(data)}
showReviewButton={searchParams.from === 'review'}
Copy link
Contributor

Choose a reason for hiding this comment

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

similarly for this one, during print certificate action we do not even have a review page so wouldn't make sense to show the button

const { draft, pageRoute, writeDeclaration } = this.props
const declaration = draft
declaration.review = true
writeDeclaration(declaration)
Copy link
Contributor

Choose a reason for hiding this comment

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

is this intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it is, otherwise the tests fail for some reason the in-memory storage was not working well in testing environment since we re-routing

Copy link
Contributor

Choose a reason for hiding this comment

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

That's a bit weird as we aren't really making any changes on the v1 side 🤔

@rikukissa
Copy link
Member

@Siyasanga is this still relevant? Can we close this

@Siyasanga
Copy link
Contributor Author

Siyasanga commented Oct 31, 2025

@Siyasanga is this still relevant? Can we close this

@rikukissa yes it is still relevant since the Household members list still accepts up to 30 members so for big households we'll still need a way to jump to the review screen

It was blocked by the unrelated failing checks. I will update the PR to see if they still fail

- Not persisting was causing errors within the tests for packages/client/src/views/RegisterForm/DeclarationForm.test.tsx ` renders preview page test
- Also add back the translations for v1 to still work

#10132
We don't need to show the "Go to review" button on metadata form like certificate collector's form and correction request forms.

#10132
@rikukissa
Copy link
Member

@Siyasanga which release should this go to?

@Siyasanga Siyasanga added this to the IET Triage milestone Nov 17, 2025
@github-actions
Copy link

github-actions bot commented Dec 8, 2025

This PR has been marked with label stale Since it has been inactive for 20 days. It will automatically be closed in 10 days if no further activity occurs.

@github-actions github-actions bot added the Stale The pr is inactive label Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants