Skip to content

ui: Improve label name and values UI#5989

Merged
yomete merged 7 commits into
mainfrom
persist-user-preferences
Oct 8, 2025
Merged

ui: Improve label name and values UI#5989
yomete merged 7 commits into
mainfrom
persist-user-preferences

Conversation

@yomete
Copy link
Copy Markdown
Contributor

@yomete yomete commented Oct 8, 2025

This PR contains improvements to how the SimpleMatchers and MatchersInput components work with label values. It also contains logic to persist the "Color by" and "Left/Right align function names" user preferences.

For the SimpleMatchers and MatchersInput components:

  • Stopped aggressively hiding label name and values when editing more than 3 label names and values in the SimpleMatcher component. Now when editing the label rows and you're working with a lot, you see all the label rows without having to always click on Show more/Show less all the time.
  • Added a loading indicator to the label value selector.
  • If a label name and value is selected we now show it instantly, regardless of loading or not loading the values from the API.
  • Increased the max width of dropdown when the dropdown is open so as to see the full value (for most cases, extremely long values will still get line breaks)
  • Reduced staleTime for label value requests to 2 minutes (previously 5 minutes).
  • Added a "Refresh results" button to fetch new label values.

yomete added 3 commits October 6, 2025 14:20
Introduces new user preferences for 'Color by' and 'Align function names' in the flamegraph visualization.

Updates state management and toolbar components to support these preferences/
Introduces a refetch method to label value hooks and context, allowing manual refresh of label values. Reduces staleTime from 5 minutes to 30 seconds and enables keepPreviousData for smoother UI updates. Refactors ViewMatchers label value fetching for better performance and maintainability. Adds cacheTime option to useGrpcQuery for more flexible caching.
Introduces a 'Refresh results' button to manually refetch label values in both SuggestionsList and Select components, improving user experience when label values may be stale or missing.

Reduces label names and values cache time to 2 minutes and ensures UI state resets appropriately after search.

Also improves handling of label name/value options to ensure selected values are always visible, and disables 'Show more/less' while editing.
@yomete yomete requested a review from a team as a code owner October 8, 2025 09:50
@alwaysmeticulous
Copy link
Copy Markdown

alwaysmeticulous Bot commented Oct 8, 2025

✅ Meticulous spotted visual differences in 69 of 551 screens tested, but all differences have already been approved: view differences detected.

Meticulous evaluated ~4 hours of user flows against your PR.

Last updated for commit 55dcede. This comment will update as new commits are pushed.

labelName !== undefined &&
labelName !== '',
staleTime: 1000 * 60 * 5, // 5 minutes
staleTime: 1000 * 60 * 2, // 2 minutes
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why do we need staleness at all? Shouldn’t the timeframe and a success already be sufficient?

note the important thing is that we fetch label names and values based on the selected time (even before hitting search)

Copy link
Copy Markdown
Contributor Author

@yomete yomete Oct 8, 2025

Choose a reason for hiding this comment

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

note the important thing is that we fetch label names and values based on the selected time (even before hitting search)

Can confirm we do this already.

Agree about the staleness too. We just might not need it after all for these type of requests.

@yomete yomete enabled auto-merge (squash) October 8, 2025 15:20
@yomete yomete merged commit 701acd8 into main Oct 8, 2025
38 checks passed
@yomete yomete deleted the persist-user-preferences branch October 8, 2025 15:51
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