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

[WOR-1461] Emit events for clipboard copy events (WOR-1461). #4638

Merged
merged 1 commit into from
Feb 7, 2024
Merged

Conversation

cahrens
Copy link
Member

@cahrens cahrens commented Feb 6, 2024

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:
image

GCP:
image

@@ -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: (_) => {
Copy link
Member Author

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.

@cahrens cahrens marked this pull request as ready for review February 6, 2024 23:30
@cahrens cahrens requested a review from a team as a code owner February 6, 2024 23:30
@cahrens cahrens requested review from blakery, a team and sergiygetlin and removed request for a team February 6, 2024 23:30
@cahrens
Copy link
Member Author

cahrens commented Feb 7, 2024

The IA integration tests are failing in dev/staging as well, and I have notified the IA team.

Copy link
Contributor

@sergiygetlin sergiygetlin left a 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';
Copy link
Contributor

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?

Copy link
Member Author

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.

@cahrens cahrens added this pull request to the merge queue Feb 7, 2024
Merged via the queue into dev with commit 130649d Feb 7, 2024
6 of 7 checks passed
@cahrens cahrens deleted the WOR-1461 branch February 7, 2024 20:38
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.

4 participants