Skip to content

Conversation

@yomete
Copy link
Contributor

@yomete yomete commented Jan 15, 2024

We currently have a bug where special characters get lost (replaced by an empty space) in the query browser, only after using the Group and Sort actions. See #4158.

This is happening because (when a navigation is triggered using the useURLState hook) the query expression param is not being encoded before being sent back to the URL. This PR fixes that and also for additional cases that were not listed in the original issue i.e. when comparing two profiles and closing one of the compared profiles.

How to reproduce:
Add the following to your parca.yaml file to add the label value

   labels:
      pod: "querier.+"

Using the query browser, query for the label value above (querier.+) and then try to sort or group, and you should get the error below, and notice in the query browser that the plus sign has been replaced by an empty space.

image

Resolves #4158

@yomete yomete requested a review from a team as a code owner January 15, 2024 14:08
@alwaysmeticulous
Copy link

alwaysmeticulous bot commented Jan 15, 2024

🤖 Meticulous spotted visual differences in 10 of 369 screens tested: view and approve differences detected.

Last updated for commit 6a7a673. This comment will update as new commits are pushed.

@yomete yomete changed the title Encode query params when navigation is triggered in useURLState Encode query params when navigation is triggered in useURLState (wip) Jan 15, 2024
<div
className={cx(
'!absolute inset-y-[1px] right-[1px] rounded-bl-none rounded-tl-none rounded-md w-8 z-10'
'!absolute inset-y-[1px] right-[1px] rounded-bl-none rounded-tl-none rounded-md w-8 z-4'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This fixes a visual bug where the filter by function action button is superimposed on top of the metrics graph tooltip.

image

@yomete yomete changed the title Encode query params when navigation is triggered in useURLState (wip) Encode query params when navigation is triggered in useURLState Jan 15, 2024
@brancz brancz merged commit e72c8c5 into main Jan 15, 2024
@brancz brancz deleted the special-characters branch January 15, 2024 22:39
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.

Special characters in search bar get lost when changing UI settings

3 participants