-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(protocol-designer, components): analytics opt-in modal and footer
- Loading branch information
Showing
13 changed files
with
260 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
components/src/organisms/EndUserAgreementFooter/__tests__/EndUserAgreementFooter.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { describe, it, expect } from 'vitest' | ||
import { screen } from '@testing-library/react' | ||
import { renderWithProviders } from '../../../testing/utils' | ||
import { EndUserAgreementFooter } from '../index' | ||
|
||
const render = () => { | ||
return renderWithProviders(<EndUserAgreementFooter />) | ||
} | ||
|
||
describe('EndUserAgreementFooter', () => { | ||
it('should render text and links', () => { | ||
render() | ||
screen.getByText('Copyright © 2024 Opentrons') | ||
expect( | ||
screen.getByRole('link', { name: 'privacy policy' }) | ||
).toHaveAttribute('href', 'https://opentrons.com/privacy-policy') | ||
expect( | ||
screen.getByRole('link', { name: 'end user license agreement' }) | ||
).toHaveAttribute('href', 'https://opentrons.com/eula') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { StyledText } from '../../atoms' | ||
import { COLORS } from '../../helix-design-system' | ||
import { Flex, Link } from '../../primitives' | ||
import { DIRECTION_COLUMN, TEXT_DECORATION_UNDERLINE } from '../../styles' | ||
import { SPACING } from '../../ui-style-constants' | ||
|
||
const PRIVACY_POLICY_URL = 'https://opentrons.com/privacy-policy' | ||
const EULA_URL = 'https://opentrons.com/eula' | ||
|
||
// TODO(ja: 10/22/24): figure out the i18n stuff since components package.json does not have i18n and | ||
// should not have i18n (since other projects use it). Due to the links, we would need access to both t and Trans | ||
export function EndUserAgreementFooter(): JSX.Element { | ||
return ( | ||
<Flex | ||
backgroundColor={COLORS.grey20} | ||
padding={SPACING.spacing24} | ||
width="100%" | ||
alignItems="center" | ||
flexDirection={DIRECTION_COLUMN} | ||
gridGap={SPACING.spacing8} | ||
> | ||
<StyledText desktopStyle="captionRegular"> | ||
By continuing, you agree to the Opentrons{' '} | ||
<Link | ||
external | ||
href={PRIVACY_POLICY_URL} | ||
color={COLORS.black90} | ||
textDecoration={TEXT_DECORATION_UNDERLINE} | ||
> | ||
privacy policy | ||
</Link>{' '} | ||
and{' '} | ||
<Link | ||
external | ||
href={EULA_URL} | ||
color={COLORS.black90} | ||
textDecoration={TEXT_DECORATION_UNDERLINE} | ||
> | ||
end user license agreement | ||
</Link> | ||
</StyledText> | ||
<StyledText desktopStyle="captionRegular"> | ||
Copyright © 2024 Opentrons | ||
</StyledText> | ||
</Flex> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './DeckLabelSet' | ||
export * from './EndUserAgreementFooter' | ||
export * from './Toolbox' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 0 additions & 49 deletions
49
protocol-designer/src/components/modals/GateModal/index.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.