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: URL params UXQA items #6225

Merged
merged 3 commits into from
Dec 6, 2024
Merged

fix: URL params UXQA items #6225

merged 3 commits into from
Dec 6, 2024

Conversation

AdityaHegde
Copy link
Collaborator

  • Compare dimension is not shared between explore and TTD views on a fresh tab. Once sessionStore is populated this is not the case.
  • Dashboards without timezone shouldn't add the tz param. Note that the default of UTC / localIANA is used still.
  • Add view in the correct order when switching using the tabs.
  • grain should not appear in pivot.
  • Timezone selected should appear in the url instead of silently getting applied. This is a different behaviour that previous system.

Comment on lines 240 to 245
url.searchParams.forEach((value, key) => {
// ignore `view` param since it is already part of partialExploreState
// in case `view` was same as default adding it here would mess up the order.
if (key === ExploreStateURLParams.WebView) return;
newUrl.searchParams.set(key, value);
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this logic should go in the convertExploreStateToURLSearchParams() function. Whenever the view is the default view, it shouldn't be stringified into query params (which it looks like the shouldSetParam() function is for).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. But convertExploreStateToURLSearchParams is not the one adding the params here. It is getUrlForWebView that always set the view, it should not set it if it is default.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine for it to set explicit parameters, then the load function can remove (via redirect) any parameters that are defaults

@AdityaHegde AdityaHegde merged commit 65c2743 into main Dec 6, 2024
7 checks passed
@AdityaHegde AdityaHegde deleted the fix/url-params-uxqa-items branch December 6, 2024 14:11
AdityaHegde added a commit that referenced this pull request Dec 9, 2024
* URL params UXQA items

* Fix lint

* PR comments
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.

2 participants