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

Configure Review layout for SDC catalog application #2783

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rahulmalhotra
Copy link
Member

IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).

Fixes #2777

Description
This change configures Review layout for SDC Catalog Application. It consist of the following updates:

  1. Add new parameter enableReviewMode to Layout enum under LayoutListViewModel.kt and pass it as true for the REVIEW enum value along with layout_review.json to render questionnaire
  2. Pass this parameter's value as an argument to DemoQuestionnaireFragment.kt and use it to show Review Page when its value is true
  3. Fix layout_review.json to render questionnaire properly

Alternative(s) considered
N/A

Type
Bug fix

Screenshots (if applicable)
Screenshot 2025-02-03 at 1 36 26 PM

Checklist

  • I have read and acknowledged the Code of conduct.
  • I have read the Contributing page.
  • I have signed the Google Individual CLA, or I am covered by my company's Corporate CLA.
  • I have discussed my proposed solution with code owners in the linked issue(s) and we have agreed upon the general approach.
  • I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the style guide of this project.
  • I have run ./gradlew check and ./gradlew connectedCheck to test my changes locally.
  • I have built and run the demo app(s) to verify my change fixes the issue and/or does not break the demo app(s).

@rahulmalhotra rahulmalhotra self-assigned this Feb 3, 2025
@rahulmalhotra rahulmalhotra marked this pull request as ready for review February 3, 2025 09:33
@rahulmalhotra rahulmalhotra requested a review from a team as a code owner February 3, 2025 09:33
@rahulmalhotra rahulmalhotra enabled auto-merge (squash) February 3, 2025 09:34
Copy link
Collaborator

@santosh-pingle santosh-pingle left a comment

Choose a reason for hiding this comment

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

Can we directly launch the review mode by providing both the questionnaire JSON and the questionnaire response? This way, when the layout is displayed in review mode, it will show the pre-filled answers. If the user wants to edit those answers, they can click on the edit button at the top.

@@ -146,6 +146,7 @@ class DemoQuestionnaireFragment : Fragment() {
.LOCATION_WIDGET_PROVIDER,
)
setQuestionnaire(args.questionnaireJsonStringKey!!)
showReviewPageBeforeSubmit(args.enableReviewMode)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I suggest we should also use showReviewPageFirst(true) and show the use-case where the user ends up directly into the review page.

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.

Setup Review Layout for SDC Catalog Application
3 participants