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: fix client side navigation #173

Merged
merged 2 commits into from
Jan 22, 2025
Merged

fix: fix client side navigation #173

merged 2 commits into from
Jan 22, 2025

Conversation

kantord
Copy link
Member

@kantord kantord commented Jan 22, 2025

fixes #162

Summary:

  • the problem was simply caused by not using client-side routing in most cases - which meant that most navigation lead to a full page reload, which effectively invalidates react-router's cache, since the cache is only stored in memory
  • This was solved earlier when I added the client-side routing configuration for ui-kit components. But this fix was later removed because it broke external links.
  • I discovered that if I simply do not provide useHref to the router provider, external links work, and all client side navigation seems to work as well

Demo:

Record_select-area_20250122140657.mp4

@kantord kantord marked this pull request as ready for review January 22, 2025 13:07
@coveralls
Copy link
Collaborator

coveralls commented Jan 22, 2025

Pull Request Test Coverage Report for Build 12909010997

Details

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.05%) to 69.289%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/lib/ui-kit-client-side-routing.tsx 0 1 0.0%
Totals Coverage Status
Change from base Build 12908199574: -0.05%
Covered Lines: 613
Relevant Lines: 792

💛 - Coveralls

@kantord kantord enabled auto-merge (squash) January 22, 2025 13:14
@kantord kantord merged commit 30b1112 into main Jan 22, 2025
7 checks passed
@kantord kantord deleted the fix-client-side-navigation branch January 22, 2025 13:15
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.

nit: every time you change page, we refetch prompts for display in sidebar
3 participants