fix(ui): use router navigation instead of page load after submit #12950
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I noticed this while investigating #12868 (comment), although I don't think this would fix that issue.
Also related to / similar to #12930
Motivation
document.location.href
causes the browser to load a new page which is a full page loadnavigation.goto
should always be used when we're routing within the single-page app (SPA)history
, same as changing thelocation
)fix
name
andnamespace
in Workflow Details to actually change when the URL changesstate
despite not actually beingstate
, meaning they only ever received the initial URL and no further changesModifications
navigation.goto
instead of assigningdocument.location.href
in the submit, resubmit, and retry panelsstate
forname
andnamespace
in Workflow Details and instead always get them from the URLVerification
I made a few screencaptures to verify this:
Submit no longer does a full page reload
submit.without.full.page.reload.mov
Resubmit no longer does a full page reload
resubmit.without.full.page.reload.mov
Retry no longer does a full page reload
Retry.without.full.page.reload.mov
(I used a different software to record this initially, that's why it's a bit different from the other two)