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

fix: perform server navigation roundtrip only when client side navigation is completed #20187

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

mcollovati
Copy link
Collaborator

Description

In the case of server-side forward, even if the server callback is not required, the client-side navigation is completed when the React router blocker is still blocked, causing an unwanted roundtrip when location then changes to the desired state.
This change prevents server roundtrip if the blocker is in a blocked state.

Fixes #19822

Type of change

  • Bugfix
  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs/latest/guide/contributing/overview/
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

Additional for Feature type of change

  • Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created.

@tepi tepi self-requested a review October 8, 2024 15:13
Copy link

sonarcloud bot commented Oct 8, 2024

Copy link

github-actions bot commented Oct 8, 2024

Test Results

1 141 files  ± 0  1 141 suites  ±0   1h 11m 29s ⏱️ + 2m 24s
7 442 tests + 2  7 392 ✅ + 2  50 💤 ±0  0 ❌ ±0 
7 789 runs  +33  7 729 ✅ +33  60 💤 ±0  0 ❌ ±0 

Results for commit b87f741. ± Comparison against base commit 92c0853.

@tepi tepi merged commit c4db041 into main Oct 9, 2024
26 checks passed
@tepi tepi deleted the issues/19822_routerlink-forward-prevent-roundtrip branch October 9, 2024 12:33
vaadin-bot pushed a commit that referenced this pull request Oct 9, 2024
vaadin-bot pushed a commit that referenced this pull request Oct 9, 2024
vaadin-bot added a commit that referenced this pull request Oct 9, 2024
vaadin-bot added a commit that referenced this pull request Oct 9, 2024
…tion is completed (#20187) (CP: 24.4) (#20196)

* fix: perform server navigation roundtrip only when client side navigation is completed (#20187)

Fixes #19822

* format

---------

Co-authored-by: Marco Collovati <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants