Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

FS-3664 Read-only summary flag on the summary page #551

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

sfount
Copy link

@sfount sfount commented Sep 4, 2024

Description

This introduces a new flag is_read_only_summary that can be passed in the existing metadata payload when instantiating a new form. This instructs the summary page to not show "Change" links on the questions summary list and provides a direct back link.

The is_read_only_summary flag can be used along with options.redirectPath to direct the user to a read-only view of data they've previously provided.

Currently this fixes the back link and page title text for the summary page according to if the flag is set but it would be preferable for these values to be set using options bassed in my the service requesting a new form rather than fixed in the form logic -- if there are existing options payloads for customising this we should move to use those.

I'm applying the change to the existing custom form builder as well as the newer form builder adpater to not be blocked on deployments as the new patterns gains maturity and is released in different environments.

Note it doesn't look like individual flags like this are curretly covered by tests even though they can change the behaviour of the server, I'll look to do this in lining up with the methodology used by the newer form builder adapter.

Please delete options that are not relevant.

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] This change requires a documentation update

Read only summary page without change links

image

This introduces a new flag `is_read_only_summary` that can be passed in
the existing `metadata` payload when instantiating a new form. This
instructs the summary page to not show "Change" links on the questions
summary list and provides a direct back link.

Currently this fixes the back link and page title text for the summary
page according to if the flag is set but it would be preferable for
these values to be set using options bassed in my the service requesting
a new form rather than fixed in the form logic -- if there are existing
`options` payloads for customising this we should move to use those.

I'm applying the change to the existing custom form builder as well as
the newer form builder adpater to not be blocked on deployments as the
new patterns gains maturity and is released in different environments.

Note it doesn't look like individual flags like this are curretly
covered by tests even though they can change the behaviour of the
server, I'll look to do this in lining up with the methodology used by
the newer form builder adapter.
@sfount sfount marked this pull request as ready for review September 5, 2024 08:55
@sfount sfount merged commit fd9d771 into main Sep 5, 2024
13 of 15 checks passed
@sfount sfount deleted the FS-3664-flag-read-only-summary branch September 5, 2024 09:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants