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

Breakdowns: Add share menu #983

Merged
merged 3 commits into from
Jan 7, 2025
Merged

Conversation

gtk-grafana
Copy link
Contributor

@gtk-grafana gtk-grafana commented Jan 7, 2025

Adds a share button similar to button in classic Explore:

image image

Fixes: #771
Related: grafana/scenes#1022

…1/share-menu
@gtk-grafana gtk-grafana self-assigned this Jan 7, 2025
@gtk-grafana gtk-grafana added the enhancement New feature or request label Jan 7, 2025
@gtk-grafana gtk-grafana marked this pull request as ready for review January 7, 2025 17:12
@gtk-grafana gtk-grafana requested a review from a team as a code owner January 7, 2025 17:12
}
};

export const copyStringToClipboard = (string: string) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason not to use the existing function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh snap I never sent my comment:
copyText seems to require a button to append the textarea for fallback when clipboard.writeText isn't available, we should probably refactor copyText to work like copyStringToClipboard instead of the other way around.

Created #986 to track, I can clean this up in the morning

Copy link
Contributor

Choose a reason for hiding this comment

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

No worries. IIRC the other function has a backwards compatibility feature that makes it a bit more resilient.

@gtk-grafana gtk-grafana merged commit f84e7b4 into main Jan 7, 2025
4 checks passed
@gtk-grafana gtk-grafana deleted the gtk-grafana/issues/771/share-menu branch January 7, 2025 20:44
@gtk-grafana gtk-grafana added this to the 1.0.5 milestone Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: easy link for sharing (shortlinks)
2 participants