-
Notifications
You must be signed in to change notification settings - Fork 21
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
[WOR-1461] Emit events for clipboard copy events (WOR-1461). #4638
Conversation
@@ -37,6 +40,11 @@ export const AzureStorageDetails = (props: AzureStorageDetailsProps): ReactNode | |||
'aria-label': 'Copy resource group ID to clipboard', | |||
text: azureContext.managedResourceGroupId, | |||
style: { marginLeft: '0.25rem' }, | |||
onClick: (_) => { |
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.
Note that onClick
doesn't prevent the default action (copying to clipboard) from happening.
The IA integration tests are failing in dev/staging as well, and I have notified the IA team. |
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.
LGTM; just question about * import.
@@ -1,11 +1,32 @@ | |||
import { screen } from '@testing-library/react'; | |||
import userEvent from '@testing-library/user-event'; | |||
import * as clipboard from 'clipboard-polyfill/text'; |
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.
is this a normal pattern to use * for import?
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.
No, not in our "regular" code (though it sometimes still is done for utils files). But it is necessary here for mocking.
JIRA ticket: https://broadworkbench.atlassian.net/browse/WOR-1461
Adds events for clipboard copy events on the dashboard, as we wish to see how often people click them.
Azure:
GCP: