Skip to content

UI - Remove Reg Id from Query Param + Modals #31002

Closed

Description

@dimak1
  • Need to remove Registration Id from url query param (eg. &renewal=true&registrationId=123)
  • Store Registration Id in the application state instead
  • Add default browser modal when trying to refresh the page while in renewal flow
  • Add custom modal when trying to navigate away from renewal application (below)

The rules below apply to new renewal applications and saved drafts applications

Show browser/custom modal:

  • When user refreshes the page (which will kick them out of the form)
  • When user clicks a link or button that navigates them away from the form. Example: breadcrumb, browser back button, cancel button etc.

Do NOT show browser/custom modal:

  • When user clicks button: Save and Resume Later
  • When user navigates within the form (ex: using the stepper or form buttons to move back and forth between the pages in the form)
  • If the user clicks a link that opens up a new tab (in this case the user is not getting kicked out of the form and does not need a warning)

Screenshot 2025-10-21 at 11.04.22.png

Activity

  1. added theissue type on Oct 8, 2025
  2. dimak1 commented on Oct 16, 2025

    @dimak1
    CollaboratorAuthor

    @arlentees this ticket is to address some of the potential security implications. Should I pull into sprint? It is related to Renewals.

  3. arlentees commented on Oct 16, 2025

    @arlentees

    @dimak1 we never got a chance to get an estimate on this - if it's a straightforward effort then I think it makes sense to remove a potential vector for a bad actor - thanks!

  4. dimak1 commented on Oct 16, 2025

    @dimak1
    CollaboratorAuthor

    @arlentees it looks like a straightforward effort, dev team discussed and we all agreed that this should be addressed. Thanks!

  5. self-assigned this
    on Oct 17, 2025
  6. dimak1 commented on Oct 21, 2025

    @dimak1
    CollaboratorAuthor

    Ready for UXA in Dev. Reg App Oct 21-1 H044533695 is expired. @saragunnarsson

  7. saragunnarsson commented on Oct 21, 2025

    @saragunnarsson

    @dimak1 Just a couple notes below:

    • The modal should show up when navigating away from the page in any way, except when they click save and resume later. If they click that button there should be no warning modal (since they saving their edits and there is no risk of losing changes made).
    • When I resume a draft, make changes and navigate away from the form, the warning modal doesn't show up anymore. It just kicks you out of the form with no warning.
    • Same goes for the browser re-load page warning, it doesn't show up when resuming a draft and reloading the page. Which is should.
  8. changed the title [-]UI - Remove Reg Id from Query Param[/-] [+]UI - Remove Reg Id from Query Param + Modals[/+] on Oct 21, 2025
  9. dimak1 commented on Oct 22, 2025

    @dimak1
    CollaboratorAuthor

    @saragunnarsson ready for UXA with fixes https://strr-hosts-dev--pr-895-uojhj3v5.web.app/

    • Confirm Modal will show on all Application flows (new & renewals & drafts)
  10. saragunnarsson commented on Oct 23, 2025

    @saragunnarsson

    This looks good @dimak1 ! It can go to qa

  11. moraesfm commented on Oct 29, 2025

    @moraesfm

    @saragunnarsson how about a scenario when the user hits "Save" first, and after it's saved user clicks on "Cancel" ?
    Would that be part of the condition where the modal is not displayed?

  12. moraesfm commented on Oct 29, 2025

    @moraesfm

    Also, when I hit Refresh, the modal is displayed at the top with this layout:
    image.png
    differently from the one displayed when I click on "Cancel" at the bottom:
    image.png

    Can you please confirm if that's expected?

  13. assigned and unassigned on Oct 29, 2025
  14. moraesfm commented on Oct 29, 2025

    @moraesfm

    When window remains too long without activity, both modals are popped-up
    image.png

  15. dimak1 commented on Oct 29, 2025

    @dimak1
    CollaboratorAuthor

    @moraesfm

    • We do not track if application was saved to dynamically show/hide confirm modal. We only have few scenarios where we can skip confirm modal (eg Save and Resume). So if they click Save, and then Cancel, the modal would show
    • There are two confirm modals: Browser's default (triggered when using browser's buttons) and app's custom modal. That's why you see different styles, because they are different modals.
    • I can make an update and skip the confirm modal on session timeout
  16. moraesfm commented on Oct 29, 2025

    @moraesfm

    Ok. Moving this back to in progress to be fixed

  17. removed their assignment
    on Oct 29, 2025
  18. saragunnarsson commented on Oct 29, 2025

    @saragunnarsson

    Thanks for jumping in and clarifying @dimak1

    @moraesfm as always, great feedback! but functionality is limited so yea, we won't be checking for a save right before canceling and there are 2 different modals being loaded depending on what triggers it. Great catching the 2 modals on time out though! And thanks Dima for fixing that:)

  19. dimak1 commented on Oct 30, 2025

    @dimak1
    CollaboratorAuthor

    Fix in under code review. Will update here once ready for re-test.

  20. self-assigned this
    on Nov 7, 2025
  21. dimak1 commented on Nov 11, 2025

    @dimak1
    CollaboratorAuthor

    Host UI is deployed to Test env.

  22. moraesfm commented on Nov 12, 2025

    @moraesfm

    It is now working as expected

  23. victorc-bcgov commented on Nov 17, 2025

    @victorc-bcgov

    Passed BAA - Attempting to navigate away on an unsaved page of the draft will cause either the app's modal dialogue box or browser's modal dialogue box to activate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions