Skip to content

Commit 447e40b

Browse files
committed
feat(ui-instructure): add privacy notice link to the ai information panel
1 parent 06c9e79 commit 447e40b

7 files changed

Lines changed: 33 additions & 0 deletions

File tree

packages/ui-instructure/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"@instructure/ui-buttons": "workspace:*",
3030
"@instructure/ui-heading": "workspace:*",
3131
"@instructure/ui-link": "workspace:*",
32+
"@instructure/ui-icons": "workspace:*",
3233
"@instructure/ui-modal": "workspace:*",
3334
"@instructure/ui-popover": "workspace:*",
3435
"@instructure/ui-react-utils": "workspace:*",

packages/ui-instructure/src/AiInformation/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ readonly: true
2323
data={[
2424
{
2525
featureName: "Feature name",
26+
privacyNoticeText: "AI Privacy Notice",
27+
privacyNoticeUrl: "https://www.instructure.com/policies/artificial-intelligence-privacy",
2628
permissionLevelText: "Permission Level",
2729
permissionLevel: "LEVEL 1",
2830
description: "We leverage anonymized aggregate data for detailed analytics to inform model development and product improvements. No AI models are used at this level.",
@@ -169,6 +171,8 @@ readonly: true
169171
data={[
170172
{
171173
featureName: "Feature name",
174+
privacyNoticeText: "AI Privacy Notice",
175+
privacyNoticeUrl: "https://www.instructure.com/policies/artificial-intelligence-privacy",
172176
permissionLevelText: "Permission Level",
173177
permissionLevel: "LEVEL 1",
174178
description: "We leverage anonymized aggregate data for detailed analytics to inform model development and product improvements. No AI models are used at this level.",

packages/ui-instructure/src/AiInformation/index.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ import { Popover } from '@instructure/ui-popover'
2626
import { CloseButton } from '@instructure/ui-buttons'
2727
import { Heading } from '@instructure/ui-heading'
2828
import { Text } from '@instructure/ui-text'
29+
import { Link } from '@instructure/ui-link'
30+
import { IconExternalLinkLine } from '@instructure/ui-icons'
2931
import { useStyle } from '@instructure/emotion'
3032
import { NutritionFacts, DataPermissionLevels } from '../'
3133

@@ -99,6 +101,8 @@ const AiInformation = ({
99101
(
100102
{
101103
featureName,
104+
privacyNoticeText,
105+
privacyNoticeUrl,
102106
permissionLevelText,
103107
permissionLevel,
104108
description,
@@ -110,6 +114,17 @@ const AiInformation = ({
110114
index
111115
) => (
112116
<div key={index}>
117+
<div css={styles?.privacyNotice}>
118+
<Link
119+
href={privacyNoticeUrl}
120+
renderIcon={<IconExternalLinkLine />}
121+
iconPlacement="end"
122+
variant="standalone"
123+
target="_blank"
124+
>
125+
{privacyNoticeText}
126+
</Link>
127+
</div>
113128
<div css={styles?.featureName}>
114129
<Heading level="h3" variant="titleCardRegular">
115130
{featureName}

packages/ui-instructure/src/AiInformation/props.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ type AiInformationOwnProps = {
3939
*/
4040
data: {
4141
featureName: string
42+
privacyNoticeText: string
43+
privacyNoticeUrl: string
4244
permissionLevelText: string
4345
permissionLevel: string
4446
description: string
@@ -127,6 +129,7 @@ type AiInformationProps = AiInformationOwnProps &
127129
type AiInformationStyle = ComponentStyle<
128130
| 'aiInformation'
129131
| 'header'
132+
| 'privacyNotice'
130133
| 'featureName'
131134
| 'permissionLevelText'
132135
| 'permissionLevel'

packages/ui-instructure/src/AiInformation/styles.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ const generateStyle = (
4949
label: 'ai-information__header',
5050
marginBottom: componentTheme.headingBottomMargin
5151
},
52+
privacyNotice: {
53+
label: 'ai-information__privacyNotice',
54+
marginBottom: componentTheme.headingBottomMargin
55+
},
5256
featureName: {
5357
label: 'ai-information__feature-name',
5458
marginBottom: componentTheme.featureNameBottomMargin

packages/ui-instructure/tsconfig.build.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@
4343
{
4444
"path": "../ui-text/tsconfig.build.json"
4545
},
46+
{
47+
"path": "../ui-icons/tsconfig.build.json"
48+
},
4649
{
4750
"path": "../ui-themes/tsconfig.build.json"
4851
},

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)