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

Allow copying and pasting metrics in analysis settings #2368

Merged
merged 7 commits into from
May 1, 2024

Conversation

bttf
Copy link
Collaborator

@bttf bttf commented Apr 9, 2024

Closes #1831

Changes

  • Introduces compact clipboard icon underneath MetricsSelector component when metrics are selected
  • Copy the list of metric IDs to clipboard on click
  • Capture the onPaste event for select elements and check for:
    • That they are JSON.parse-able
    • That it is an array with metric id strings only
    • If so, we trigger an onChange with the given IDs, effectively setting the metrics. And block the paste event.
    • Otherwise, we bubble the paste event as usual

Apr-09-2024 17-58-26

Apr-10-2024 13-40-00

The clipboard icon, detail
Screenshot 2024-04-30 at 4 55 07 PM

Copy link

github-actions bot commented Apr 9, 2024

Your preview environment pr-2368-bttf has been deployed.

Preview environment endpoints are available at:

Copy link
Member

@bryce-fitzsimons bryce-fitzsimons left a comment

Choose a reason for hiding this comment

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

tested functionality, works fine

@bttf
Copy link
Collaborator Author

bttf commented May 1, 2024

Did some more testing this morning and pushed minor styling fixes; screencap in dark mode

Screenshot 2024-05-01 at 10 06 43 AM

@bttf bttf merged commit d75a04d into main May 1, 2024
3 checks passed
@bttf bttf deleted the adnan/copy-paste-metrics branch May 1, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Copy and paste metrics from/to the selection box within experiments
2 participants