Skip to content

Upgrade react-router #942#1587

Open
louise-davies wants to merge 9 commits intodevelopfrom
upgrade-react-router-#942
Open

Upgrade react-router #942#1587
louise-davies wants to merge 9 commits intodevelopfrom
upgrade-react-router-#942

Conversation

@louise-davies
Copy link
Copy Markdown
Member

Description

Remove connected-react-router and upgrade react-router to v6 and then v7. Had to turn off transitions as they don't work nicely with redux (as it uses useSyncExternalStore) (see https://reactrouter.com/explanation/react-transitions#opt-out-via-unstable_usetransitionsfalse). Mostly the issue was with the autoLogin middleware changing things around mid routing I think?

Otherwise nothing super ground-breaking I think? Had a bit of trouble with how to test certain things with no access to history anymore but some research solved all the issues.

Testing instructions

Add a set up instructions describing how the reviewer should test the code

  • Review code
  • Check Actions build
  • Review changes to test coverage
  • Test with all plugins & espescially test any plugins "weird" routing logic (if they have any)

Agile board tracking

Closes #942

@louise-davies louise-davies marked this pull request as ready for review March 12, 2026 18:06
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 13, 2026

Codecov Report

❌ Patch coverage is 98.70690% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.17%. Comparing base (39f0ce1) to head (e43ed02).
⚠️ Report is 4 commits behind head on develop.

Files with missing lines Patch % Lines
src/App.tsx 84.61% 2 Missing ⚠️
src/mainAppBar/mobileOverflowMenu.component.tsx 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1587      +/-   ##
===========================================
- Coverage    97.60%   97.17%   -0.43%     
===========================================
  Files           56       56              
  Lines         6004     6226     +222     
  Branches       679      680       +1     
===========================================
+ Hits          5860     6050     +190     
- Misses         143      175      +32     
  Partials         1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@louise-davies louise-davies marked this pull request as draft March 27, 2026 10:02
- v5 didn't work nicely with newer react-router, sometimes the single-spa navigation would "finish" before RR (generally when plugins would route to different plugins, but also going forward/back in browser)
- and thus the plugin would load into the backup div instead of the proper div
@louise-davies louise-davies marked this pull request as ready for review March 27, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade to react-router v6

1 participant