-
Notifications
You must be signed in to change notification settings - Fork 11.6k
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
Explore: List query templates #86897
Conversation
# Conflicts: # docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md # packages/grafana-data/src/types/featureToggles.gen.ts # pkg/services/featuremgmt/registry.go # pkg/services/featuremgmt/toggles_gen.csv # pkg/services/featuremgmt/toggles_gen.go # pkg/services/featuremgmt/toggles_gen.json
This is required to have better UI and an indication of selected state in split view
This is to make it consistent with the toolbar button
This is to avoid confusing UX with 2 button triggering the drawer but with slightly different behavior
To avoid confusion for current users and test it internally a bit more it's behind a feature toggle. Bigger drawer may obstruct the view and add more friction in the UX.
# Conflicts: # pkg/services/featuremgmt/toggles_gen.json
This is just moved from the app. To be cleaned up and refactored later.
# Conflicts: # packages/grafana-data/src/types/featureToggles.gen.ts # pkg/services/featuremgmt/registry.go # pkg/services/featuremgmt/toggles_gen.csv # pkg/services/featuremgmt/toggles_gen.go # pkg/services/featuremgmt/toggles_gen.json
# Conflicts: # public/app/features/explore/QueriesDrawer/QueriesDrawerDropdown.tsx # public/app/features/explore/RichHistory/RichHistory.tsx
It will be moved to the kebab
Just to simplify the PR, it's not needed for Explore yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scaffolding looks great, confirmed by adding a query to the library app and seeing it in Explore! Exciting stuff!
@grafana/grafana-frontend-platform I'm not 100% how to correctly add a dependency to
The error is coming from rollup which should be able to resolve the dependency from the parent but it fails 🤔 Not sure why though, maybe because react-is resolves dependency conditionally?
Adding dependency/peerDependency cause the module to be marked as external (via externals rollup plugin) and it's bundled correctly, but I'm not sure if that's the right way of doing this 🤔 |
…/list-query-templates
…/list-query-templates
Had a chat with @ashharrison90 and @joshhunt about this - unfortunately this PR is in the middle of two unknown and emerging practices that the frontend platform team is working on - both app platform and a common interface for generating endpoints. They would ideally like some of the code that is handwritten in here to be generated, to provide guardrails and shape to minimize the possibility of API instability between releases. If this ends up taking long enough where it becomes a blocker, we can look into marking the query library API as internal and making extremely clear it is unstable and moving forward with it. I communicated to them that I don't consider myself blocked at the moment and it could wait, and I would just work off this branch. Cc: @ifrost |
After having a chat with @grafana/grafana-frontend-platform we have decided to move this functionality back to core and used it from there until there's a consenus reached on how such APIs should be exposed. Related issues/prs/docs: |
Fixes #86122
For testing please use Query Library App plugin, or create some templates by posting requests directly to the API:
Screen.Recording.2024-04-26.at.14.11.11.mov
Changes:
Out of scope:
Follow-ups: