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

feat(opentrons-ai-client): Created the footer component with the privacy policy and EULA #16535

Merged
merged 6 commits into from
Oct 23, 2024

Conversation

connected-znaim
Copy link
Collaborator

@connected-znaim connected-znaim commented Oct 18, 2024

Overview

Test Plan and Hands on Testing

Manually tested both links

Changelog

image

The footer links to the following two urls:

Privacy policy:
"https://insights.opentrons.com/hubfs/Legal%20Documentation/Opentrons-Labworks-Privacy-Policy-5-4-23.docx-1.pdf"

EULA:
"https://insights.opentrons.com/hubfs/Legal%20Documentation/Opentrons%20EULA%2020240710.pdf"

Review requests

Risk assessment

}
`;

const DISCLAIMER_TEXT_STYLE = css`
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe we can use the styled component approach to keep consistency?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

@connected-znaim connected-znaim changed the title Created the footer component with the privacy policy and EULA feat(opentrons-ai-client): Created the footer component with the privacy policy and EULA Oct 21, 2024
@connected-znaim connected-znaim marked this pull request as ready for review October 21, 2024 18:36
@connected-znaim connected-znaim requested a review from a team as a code owner October 21, 2024 18:36
Comment on lines 36 to 42
const [
firstPart,
privacyPolicy,
and,
EULA,
copyright,
] = privacyPolicyText.split('\n')
Copy link
Member

Choose a reason for hiding this comment

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

you can use the Trans component in i18next so you dont have to split apart the text and feed it into different components:

https://react.i18next.com/latest/trans-component

so it would be something like this in the translation file:

{
  "privacy_policy": "{{firstPart}} <privacyPolicyLink>Privacy Policy</privacyPolicyLink> {{and}} <EULALink>EULA</EULALink> {{copyright}}"
}

and like this in your react component:

import { Trans, useTranslation } from 'react-i18next';

const { t } = useTranslation('protocol_generator');

<FooterText>
  <Trans
    i18nKey="privacy_policy"
    components={{
      privacyPolicyLink: (
        <BlueLink
          href="https://insights.opentrons.com/hubfs/Legal%20Documentation/Opentrons-Labworks-Privacy-Policy-5-4-23.docx-1.pdf"
          target="_blank"
          rel="noopener noreferrer"
        />
      ),
      EULALink: (
        <BlueLink
          href="https://insights.opentrons.com/hubfs/Legal%20Documentation/Opentrons%20EULA%2020240710.pdf"
          target="_blank"
          rel="noopener noreferrer"
        />
      )
    }}
  />
  <NewLineText>{t('copyright')}</NewLineText>
</FooterText>

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

@connected-znaim connected-znaim merged commit 7bc2504 into edge Oct 23, 2024
8 checks passed
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.

3 participants