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

DataTrails: Sticky controls #83286

Merged
merged 2 commits into from
Feb 23, 2024
Merged

DataTrails: Sticky controls #83286

merged 2 commits into from
Feb 23, 2024

Conversation

torkelo
Copy link
Member

@torkelo torkelo commented Feb 23, 2024

I think this simple take on it works quite well and can be refined later.

Cool things to consider in the future

  • An option to include main graph in sticky bit (but should be an optional option in the options dropdown we removed)
  • Possibly an option to disable sticky (not sure we need it)
agent_request_duration_seconds_bucket---Metrics---Explore---Grafana.mp4

@adrapereira
Copy link
Contributor

Stickying the main graph would be nice, I'll add it in a following PR

alignItems: 'flex-end',
flexWrap: 'wrap',
position: 'sticky',
background: theme.isDark ? theme.colors.background.canvas : theme.colors.background.primary,
Copy link
Contributor

@darrenjaneczek darrenjaneczek Feb 23, 2024

Choose a reason for hiding this comment

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

Why conditional? Do primary and canvas not look good here depending on isDark?

Copy link
Member Author

Choose a reason for hiding this comment

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

@darrenjaneczek data trails is breaking out normal background rules. normally we would not do this. we would use theme.colors.background.primary

but for data trails I am testing a different pattern, using canvas for dark theme and primary for light theme

Copy link
Contributor

@darrenjaneczek darrenjaneczek Feb 23, 2024

Choose a reason for hiding this comment

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

Maybe in the future, something like theme.colors.background.trailsCanvas?

@catherineymgui
Copy link
Contributor

Thanks Torkel!

  1. Noticed this interaction when someone adds a label filter - the whole page resets and I wasn't sure what happened.
    https://github.com/grafana/grafana/assets/5264102/3aedab70-61c0-4f94-9feb-7fe60a8e768c

Is there a way we can keep the same "sticky" filter on interaction? Or have the filters expand on interaction? The original idea
Screenshot 2024-02-23 at 10 01 37

  1. On the metric select page - could we also sticky the search and prefix filter? However since this is 3 lines of sticky filtering (and there are other usability challenges w/ the prefix filter) - we will be moving prefix filter out.

@torkelo
Copy link
Member Author

torkelo commented Feb 23, 2024

Is there a way we can keep the same "sticky" filter on interaction? Or have the filters expand on interaction? The original idea

@catherineymgui sadly when you add a new filter we have to query and rebuild a lot of the breakdown views, and the browser loses the scroll position during this process. We could remember it and try to scroll back but this requires some tricky code.

On the metric select page - could we also sticky the search and prefix filter? However since this is 3 lines of sticky filtering (and there are other usability challenges w/ the prefix filter) - we will be moving prefix filter out.

Yes, I think we could move the search up into the filters row. could be cramped if there are lot of filters but usually not the case on the select metric view. But this requires a bigger change (as the current select metric view is also used in the related metrics tab). So leaving that for the follow PRs

@torkelo torkelo merged commit ea8b326 into main Feb 23, 2024
14 checks passed
@torkelo torkelo deleted the datatrails-sticky-controls branch February 23, 2024 15:22
yuri-tceretian pushed a commit that referenced this pull request Feb 26, 2024
* DataTrails: Sticky controls

* Update
chalapat pushed a commit to nokia/grafana that referenced this pull request Feb 27, 2024
* DataTrails: Sticky controls

* Update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants