grafana/.github
Piotr Jamróz fd218edca4
Explore: List query templates (#86897)
* Create basic feature toggle

* Rename context to reflect it contains query history and query library

* Update icons and variants

* Rename hooks

* Update tests

* Fix mock

* Add tracking

* Turn button into a toggle

* Make dropdown active as well

This is required to have better UI and an indication of selected state in split view

* Update Query Library icon

This is to make it consistent with the toolbar button

* Hide query history button when query library is available

This is to avoid confusing UX with 2 button triggering the drawer but with slightly different behavior

* Make the drawer bigger for query library

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.

* Fix tests

The test was failing because queryLibraryAvailable was set to true for tests. This change makes it more explicit what use case is being tested

* Remove active state underline from the dropdown

* Add basic types and api methods

This is just moved from the app. To be cleaned up and refactored later.

* Move API utils from Query Library app to Grafana packages

* Move API utils from Query Library app to Grafana packages

* Move API utils from Query Library app to Grafana packages

* Add basic table for query templates

* Add sorting

* Style cells

* Style table cells

* Allow closing Query Library drawer from the toolbar

* Remove Private Query toggle

It will be moved to the kebab

* Add empty state

* Remove variables detection for now

Just to simplify the PR, it's not needed for Explore yet.

* Simplify getting useDatasource.tsx

* Rename cell

* Move QueryTemplatesTable to a separate folder

* Use RTK Query to get list of query templates

* Clean up query templates table

* Simplify useDatasource hook

* Add a test

* Retrigger the build

* Remove unused code

* Small clean up

* Update import

* Add reduxjs/toolkit as a peer dependecy

* Revert "Add reduxjs/toolkit as a peer dependecy"

This reverts commit aa9da6e442.

* Update import

* Add reduxjs/toolkit as a peer dependecy

* Revert "Add reduxjs/toolkit as a peer dependecy"

This reverts commit 2e68a62ab6.

* Add @reduxjs/toolkit as peer dependency

* Add @reduxjs/toolkit as peer dependecy

* Move reactjs/toolkit to dev dependecies

* Minor clean up and use react-redux as a peer dependency

* Move query library code to core features

* Update code owners

* Update export

* Update exports

* Use Redux store instead of APIProvider

* Await for query templates to show during the test

* Add more explicit docs that the feature is experimental

---------

Co-authored-by: Kristina Durivage <kristina.durivage@grafana.com>
2024-05-14 10:05:39 +02:00
..
ISSUE_TEMPLATE remove default label from feature request template (#77862) 2023-11-08 13:27:47 +01:00
workflows Chore: Updated go.work.sum file (#87622) 2024-05-10 14:59:44 +02:00
bot.md Docs: Fix typos (#85651) 2024-04-16 09:58:40 +02:00
CODEOWNERS Explore: List query templates (#86897) 2024-05-14 10:05:39 +02:00
commands.json Add grafana program label command (#76790) 2023-10-19 11:00:42 +03:00
dependabot.yml Configure Renovate (#40336) 2021-10-13 12:25:12 +01:00
issue-opened.json GHActions: move new 'opened' action to separate workflow (#63228) 2023-02-10 07:27:28 -10:00
metrics-collector.json GHActions: add issue type to each query (#63972) 2023-03-02 09:00:30 -10:00
pr-checks.json Revert "ci: remove milestone check" (#86856) 2024-04-25 01:31:29 -04:00
pr-commands.json Update GitHub Actions to add datasource/Parca label (#84455) 2024-03-15 03:11:12 -07:00
PULL_REQUEST_TEMPLATE.md Remove two PR reviewer checklist items (#65290) 2023-04-03 09:13:56 -06:00
renovate.json5 Renovate: Add Slate and related packages to ignore list (#87250) 2024-05-02 18:36:32 +03:00
teams.yml chore: Add slack notification to dataviz channel when OSS issues are created (#75596) 2023-10-04 16:25:29 -07:00