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

Explore: Add a query template to query library from query history #88047

Merged
merged 11 commits into from
May 23, 2024

Conversation

ifrost
Copy link
Contributor

@ifrost ifrost commented May 20, 2024

Fixes #88042

Screen.Recording.2024-05-20.at.13.06.26.mov

@ifrost ifrost marked this pull request as ready for review May 21, 2024 12:51
@ifrost ifrost requested review from a team as code owners May 21, 2024 12:51
@ifrost ifrost requested review from joshhunt and JoaoSilvaGrafana and removed request for a team, joshhunt and JoaoSilvaGrafana May 21, 2024 12:51
variant="secondary"
aria-label={buttonLabel}
onClick={() => {
handleAddQueryTemplate({ title: 'Test', targets: [query] });
Copy link
Contributor

Choose a reason for hiding this comment

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

I know this will get replaced later, but I'd like the title field to be optional, could we have a better default here? Like "Imported from Explore - {timestamp}" or something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but I'd like the title field to be optional,

By optional you mean so the user can leave the input blank and then it'd default to "Imported from Explore - {timestamp}"?

cc @diegoadams. Not sure if we've discussed. In your designs - is the description field required or would default to something it the description is not provided? If we fallback to a default, what's the best way to show it to the user? With a placeholder in the input field?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added in db9a12f

Copy link
Contributor

Choose a reason for hiding this comment

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

Great! Already approved but now I EXTRA approve :D

@ifrost ifrost added no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes labels May 22, 2024
@diegoadams
Copy link

@ifrost , if I'm understanding this correctly, I would say that it is not required. this is an example of queries that have and done have descriptions.

Screenshot 2024-05-22 at 17 22 34

@ifrost ifrost enabled auto-merge (squash) May 23, 2024 08:23
@ifrost ifrost merged commit 84ef99c into main May 23, 2024
15 checks passed
@ifrost ifrost deleted the ifrost/add-query-template-from-query-history branch May 23, 2024 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/explore area/frontend no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Explore: Add query template to query history without the edit form
3 participants