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

Add the Osano snippet #16365

Merged
merged 2 commits into from
Sep 12, 2022
Merged

Add the Osano snippet #16365

merged 2 commits into from
Sep 12, 2022

Conversation

timroes
Copy link
Collaborator

@timroes timroes commented Sep 6, 2022

What

Part of https://github.com/airbytehq/airbyte-cloud/issues/2426 (Step 1)

Adds the Osano snippet to the code. At the moment this is configured only as "Scanning" in the Osano UI to collect which scripts exist.

In a separate step later we'll need to activate it to block in the UI as well as adding a link to the UI to open the drawer for users who want to open it (since we hide the default widget button).

How

I've used an environment variable to inject that directly into the index.html, since the Osano script should load as early as possible to prevent all further scripts from loading, unless the user gave consent to them.

This currently requires though to have that parameter available at build time. Thus if we'd later only want to enable that in Cloud we'll need to either move this into index.tsx and use the window.CLOUD parameter or need to build the frontend for each environment. Since the latter is anyway our plan I already added that, and try to move forward with Infra and the Config Provider refactoring, that we can actually move the FE to be build separate for each environment until we want to enable this (it's anyway not clear right now if we want to enable that only in CLoud or also in OSS).

@timroes timroes requested a review from a team as a code owner September 6, 2022 16:36
@github-actions github-actions bot added area/platform issues related to the platform area/frontend Related to the Airbyte webapp labels Sep 6, 2022
@@ -13,6 +13,12 @@
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="stylesheet" href="%PUBLIC_URL%/index.css">
<title>Airbyte</title>
<% if (process.env.REACT_APP_OSANO) { %>
<style>
.osano-cm-widget { display: none; }
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ℹ️ This is the official way to hide their widget (cookie button on the bottom of the page): https://docs.osano.com/hiding-the-cookie-widget

Copy link
Contributor

@krishnaglick krishnaglick left a comment

Choose a reason for hiding this comment

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

Confirmed network request made
However document.querySelector(".osano-cm-widget"); is returning nothing. Is that expected?

@timroes
Copy link
Collaborator Author

timroes commented Sep 6, 2022

@krishnaglick yes That's currently expected. The widget would only show up once we activate the modal (i.e. it's not longer in just discovering mode).

@timroes timroes merged commit 8bb95a8 into master Sep 12, 2022
@timroes timroes deleted the tim/osano branch September 12, 2022 08:13
robbinhan pushed a commit to robbinhan/airbyte that referenced this pull request Sep 29, 2022
jhammarstedt pushed a commit to jhammarstedt/airbyte that referenced this pull request Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend Related to the Airbyte webapp area/platform issues related to the platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants