Altinn / Altinn/app-frontend-react
Stranded when Edit-button in Summary2 changes visibility of page
- Dominant language
- TypeScript
- Stars
- 21
- Forks
- 33
- Avg merge
- 6d 23h
- Merged PRs (30d)
- 3
Description
### Description of the bug
If you have a **Summary2** component on a page "C", and you press the Edit-button to come back to page "B" to change the element, you risk "getting stuck" in the form. From page "B" there is a button "Back to summary" ("Tilbake til sammendrag") that brings you back to page "C". The problem occurs when a change on page "B" causes page **"C" to be hidden**. The "Back to summary"-button does not work, because there is no page to go back to. There isn't a "Next"-button on page "B" either, so the only way to continue filling out the form is by pushing the "Previous"-button, and then navigate forward again by pressing the "Next"-button from a previous page "A".
This situation will occur if you f.ex. have a radiobutton-question on page B that causes page C to be hidden.
I would have expected that the "Back to summary"-button would be hidden (or the functionality and text changed) and **replaced with a "Next"-button**, when the page you came from is hidden.
### Steps To Reproduce
1. Create a summary2-component on a page that will be hidden if you change the element shown the summary
2. Press the "Edit"-button
3. Change the answer so the page with the summary-component is "hidden"
4. Try pressing the "Back to summary"-button.
### Additional Information
Connected to the discussion in this thread: https://altinn.slack.com/archives/C02EJ9HKQA3/p1734603772652409
Contributor guide
Research direction
Reproduce the Summary2 flow described in the issue: edit an element from page C, change the answer on page B so page C is hidden, and try the “Back to summary” button. Trace the Summary2 edit navigation and page-visibility handling; done means the user can continue without being stranded when the originating summary page becomes hidden.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100