-
Notifications
You must be signed in to change notification settings - Fork 4
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
DT-979: Add Appcues Support #2722
Conversation
@@ -22,7 +22,6 @@ | |||
<link rel="icon" type="image/png" href="%PUBLIC_URL%/images/favicon/favicon-32x32.png" sizes="32x32" /> | |||
<link rel="icon" type="image/png" href="%PUBLIC_URL%/images/favicon/favicon-16x16.png" sizes="16x16" /> | |||
<link rel="mask-icon" href="%PUBLIC_URL%/images/favicon/safari-pinned-tab.svg"> | |||
<script src="https://accounts.google.com/gsi/client" async defer id="gsiClient"></script> |
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.
Drive by fix - we removed "google sign in" in #2667
// Set default timeout for all metrics calls to 30 seconds | ||
const defaultSignal: AbortSignal = AbortSignal.timeout(30000); |
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 this was necessary for typescriptification to make all the axios calls compile. I'm open to alternative suggestions here but this seems like a safe timeout for bard & appcues calls.
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.
Nothing here looks unreasonable!
@@ -5,8 +5,11 @@ | |||
<meta charset="utf-8"> | |||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |||
<meta name="viewport" content="width=device-width,initial-scale=1.0"> | |||
<script src="https://accounts.google.com/gsi/client" async defer id="gsiClient"></script> |
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.
Another drive by fix - we removed "google sign in" in #2667
<!-- AppCues Requirements --> | ||
<script type="text/javascript"> | ||
window.AppcuesSettings = { enableURLDetection: true }; | ||
</script> |
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.
I'm open to testing suggestions here. I was unable to figure out a way to unit test the global Appcues
window object.
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.
I think at some point it is worth trusting the library. We could add tests that verify we're setting the right values, but as far as appcues itself, I think that's probably out of our purview to test? But happy to have that contested
# Conflicts: # src/components/SignInButton.tsx
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.
looks good 👍
Addresses
https://broadworkbench.atlassian.net/browse/DT-979
Summary
This PR adds Appcues support to DUOS. This borrows heavily from Terra's implementation, similarly to how we borrow our Metrics implementation. See how Terra does this:
See also: https://github.com/broadinstitute/terra-helmfile/pull/5951
Notable Features
Metrics
@databiosphere/bard-client
since there is only a js client.events
Appcues
user on any sign-in or registrationAppcues
tracking event on any trackedMetrics
eventLocal Testing
If you have an account in Appcues, you can log in and see events in the "Events Explorer" page. The examples I have here are from signing in locally with a dev account.
Note that when I was testing locally, I was sending the Sam subject id. Since that time, I've updated the code to send the same OIDC user profile
sub
value that Terra uses.Have you read Terra's Contributing Guide lately? If not, do that first.