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: Locale overwriting #1175

Merged
merged 3 commits into from
Sep 14, 2023
Merged

fix: Locale overwriting #1175

merged 3 commits into from
Sep 14, 2023

Conversation

bprusinowski
Copy link
Collaborator

@bprusinowski bprusinowski commented Sep 12, 2023

Fixes #1174.

This PR fixes overwriting of locale when redirecting to a versioned cube by removing locale from pathname. There is no need to pass the locale here, and using it led to making the router switch to old locale, while it previously had already updated the locale via routeChangeComplete event.

This behavior was only visible when previewing larger cubes, probably due to a fact that it took longer to update the content and a small lag was introduced that made the broken behavior visible.

@vercel
Copy link

vercel bot commented Sep 12, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
visualization-tool ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 12, 2023 2:40pm

@bprusinowski bprusinowski marked this pull request as draft September 12, 2023 13:54
@bprusinowski bprusinowski marked this pull request as ready for review September 12, 2023 14:06
...there is no need to specify the locale in pathname. Using this led to overwiting the locale, as we used the old locale, while the router was setting a new one on route change.
...to avoid showing stale data and updating the localised content once the data fetches in the background. This is needed as we do not reload the page via changing pathname when redirecting to versioned cube.
@bprusinowski
Copy link
Collaborator Author

Sorry for spam @ptbrowne, should be good now 😅

@bprusinowski bprusinowski merged commit 8b79ac7 into main Sep 14, 2023
3 of 4 checks passed
@bprusinowski bprusinowski deleted the fix/locale-overwriting branch September 14, 2023 07:37
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.

PROD +INT : Dataset preview, problem by changing language
1 participant