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

Bug/225 browser back button not navigating in app #325

Closed

Conversation

mjulstein
Copy link
Contributor

@mjulstein mjulstein commented Jul 5, 2022

Description

I changed the behavior of how the form url changes where it now puts the page id at he end of the route.
By doing so we get to listen to history-changes and re-render the Form component based on the page id inside the formLayout.

Tested in Firefox.

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)
  • All tests run green

NOTE

The below steps (in Norwegian) do reproduce am error. However, the issue seems to be related to not being able to access pages after the allowed pages after the page order has been updated or switching layout sets:

  1. Du har tidligere instanser, velg en fra listen eller start en ny. Jeg startet en ny.
  2. Velkommen til frontend-test, noen beskrivelser, en knapp for å starte. Jeg trykker på knappen. (Tror URL sier /formLayout på dette tidspunktet)
  3. Skjema for å endre navn. Jeg fyller ut skjemaet.
  4. Oppsummeringsside for endring av navn. Jeg trykker neste.
  5. Side for repeterende grupper.
  6. Side for å fylle ut et tekstfelt (innmelder?).
  7. Oppsummeringsside for repeterende grupper.
    Hvis du står på steg 4 og trykker tilbake, kommer du til steg 3, men hvis du står på steg 3 og går tilbake fikk jeg en feilmelding (appen kræsjet). Samme hvis jeg stod på steg 5, 6 eller 7 og prøvde å gå tilbake til steg 4.

@mjulstein mjulstein marked this pull request as draft July 7, 2022 07:14
@github-actions github-actions bot added area/test related to automated and functional testing area/attachments area/instantiation labels Jul 7, 2022
@mjulstein mjulstein marked this pull request as ready for review July 13, 2022 06:22
@mjulstein mjulstein marked this pull request as draft July 14, 2022 13:08
@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jul 20, 2022

This pull request introduces 1 alert and fixes 1 when merging 5035e38 into 140e818 - view on LGTM.com

new alerts:

  • 1 for Unneeded defensive code

fixed alerts:

  • 1 for Unneeded defensive code

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jul 20, 2022

This pull request fixes 1 alert when merging 09c75ab into 140e818 - view on LGTM.com

fixed alerts:

  • 1 for Unneeded defensive code

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jul 21, 2022

This pull request fixes 1 alert when merging ca00ddc into 140e818 - view on LGTM.com

fixed alerts:

  • 1 for Unneeded defensive code

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jul 21, 2022

This pull request fixes 1 alert when merging 2fdcb39 into 140e818 - view on LGTM.com

fixed alerts:

  • 1 for Unneeded defensive code

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jul 21, 2022

This pull request fixes 1 alert when merging 031418b into dbe5ed9 - view on LGTM.com

fixed alerts:

  • 1 for Unneeded defensive code

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jul 22, 2022

This pull request fixes 1 alert when merging 0408f0b into dbe5ed9 - view on LGTM.com

fixed alerts:

  • 1 for Unneeded defensive code

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jul 23, 2022

This pull request fixes 1 alert when merging 5d4b478 into 93b8938 - view on LGTM.com

fixed alerts:

  • 1 for Unneeded defensive code

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jul 23, 2022

This pull request fixes 1 alert when merging 4bd1a5b into 93b8938 - view on LGTM.com

fixed alerts:

  • 1 for Unneeded defensive code

@mjulstein mjulstein marked this pull request as ready for review July 23, 2022 02:01
@mjulstein mjulstein linked an issue Jul 23, 2022 that may be closed by this pull request
@mjulstein mjulstein requested a review from haakemon July 23, 2022 02:04
Copy link
Contributor

@olemartinorg olemartinorg left a comment

Choose a reason for hiding this comment

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

Great job in cleaning up cognitive complexity and such along the way! 🥇 This looks good, but I still think we should find a way to solve the usability issue you noted in the initial description - I'm not sure we should be releasing this early at a stage where it causes (apparent) app crashes when clicking the browser back button in some apps.

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jul 26, 2022

This pull request introduces 3 alerts and fixes 1 when merging 514915b into 93b8938 - view on LGTM.com

new alerts:

  • 2 for Ineffective parameter type
  • 1 for Superfluous trailing arguments

fixed alerts:

  • 1 for Unneeded defensive code

@mjulstein mjulstein force-pushed the bug/225-browser-back-button-not-navigating-in-app branch from 514915b to f75450d Compare July 26, 2022 13:49
@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jul 26, 2022

This pull request introduces 3 alerts and fixes 1 when merging f75450d into 93b8938 - view on LGTM.com

new alerts:

  • 2 for Ineffective parameter type
  • 1 for Superfluous trailing arguments

fixed alerts:

  • 1 for Unneeded defensive code

@mjulstein mjulstein marked this pull request as draft July 26, 2022 14:44
@mjulstein mjulstein force-pushed the bug/225-browser-back-button-not-navigating-in-app branch from f75450d to f3ce986 Compare July 26, 2022 14:46
@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jul 26, 2022

This pull request introduces 3 alerts and fixes 1 when merging f3ce986 into 93b8938 - view on LGTM.com

new alerts:

  • 2 for Ineffective parameter type
  • 1 for Superfluous trailing arguments

fixed alerts:

  • 1 for Unneeded defensive code

Refactor: split code in useFormLayoutHistory to smaller chunks
@mjulstein mjulstein force-pushed the bug/225-browser-back-button-not-navigating-in-app branch from f3ce986 to 6cbe77b Compare July 27, 2022 08:05
@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jul 27, 2022

This pull request introduces 3 alerts when merging 6cbe77b into a5f1f8f - view on LGTM.com

new alerts:

  • 2 for Ineffective parameter type
  • 1 for Superfluous trailing arguments

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

97.7% 97.7% Coverage
0.0% 0.0% Duplication

@olemartinorg
Copy link
Contributor

Closing this, but keeping the branch for a while. The changes here are similar to #451, which we intend to keep (but have to rewrite to keep up with the ever-changing main).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Browser back button do not apply to app pages
3 participants