Skip to content

fix: remove redundant "Review" step from various template previews#1631

Merged
yoganandaness merged 3 commits into
developfrom
SWAP-5658-remove-reviewtab
Jul 22, 2026
Merged

fix: remove redundant "Review" step from various template previews#1631
yoganandaness merged 3 commits into
developfrom
SWAP-5658-remove-reviewtab

Conversation

@shivoomiess

@shivoomiess shivoomiess commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR removes the redundant "Review" step from various template previews. A missing previewMode parameter for the inherited QuestionarySubmissionState was missing across various templates which has now been added.

Motivation and Context

The change is required to streamline the template preview process by removing unnecessary steps, thus solving the problem of redundancy and improving user interaction.

Changes

  1. Added previewMode property in various components to handle the removal of the "Review" step in preview mode. This flow already existed in the code, but some templates (listed below) were not passing the parameter to the QuestionaryState and this led to the "Review" tab being rendered.
  2. Updated the ExperimentSafetySubmissionState, GenericTemplateSubmissionState, SampleSubmissionState, ShipmentSubmissionState, and VisitRegistrationSubmissionState classes to accommodate the new previewMode property.
  3. Updated the initial state in ExperimentSafetyContainer, GenericTemplateContainer, SampleDeclarationContainer, ShipmentContainer, and VisitRegistrationContainer components to use the new previewMode property.

How Has This Been Tested?

The author of this PR has confirmed that the "Review" step is now not visible in the template previews but is visible in the user's interactions with the Questionary components.

Fixes Jira Issue

https://jira.ess.eu//browse/SWAP-5658

Depends On

Tests included/Docs Updated?

  • I have added tests to cover my changes.
  • All relevant doc has been updated

@shivoomiess
shivoomiess requested a review from a team as a code owner July 7, 2026 13:21
@shivoomiess
shivoomiess requested review from simonfernandes and removed request for a team July 7, 2026 13:21
@yoganandaness
yoganandaness enabled auto-merge (squash) July 20, 2026 09:27
@yoganandaness
yoganandaness merged commit 5a8dac0 into develop Jul 22, 2026
21 checks passed
@yoganandaness
yoganandaness deleted the SWAP-5658-remove-reviewtab branch July 22, 2026 09:48
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