Skip to content

Commit 70ee85c

Browse files
update readme (#48)
* update readme * Update packages/nutritionfacts/README.md Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
1 parent e5d4966 commit 70ee85c

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

packages/nutritionfacts/README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,17 @@ The "Copy embed code" generates an iFrame that is sized to fit the content witho
5555
5656
### JSON
5757

58-
When viewing a Nutrition Facts page a "Copy JSON Object" helper is displayed in the header. This object is for use with @instructure/ui AI Components.
58+
When viewing a Nutrition Facts page a "Copy JSON Object" helper is displayed in the header. This object is for use with @instructure/ui AI Components. An sha256 and a last updated Epoch timestamp are included for easier update validation.
5959

6060
```JSON
6161
{
62-
"id": "askyourdata",
63-
"sha256": "ce29be981e1f8fc6ee4b68f653223ffefc6ca7ca378cfe4d81fd427277ee1ee9",
64-
"lastUpdated": "1758638262",
65-
"nutritionFacts": "<StrictNutritionFacts>",
66-
"dataPermissionsLevel": "<AiPermissions>",
67-
"AiInformation": "<StrictAiInformation>"
62+
"id": "<uid>",
63+
"name": "<featureName>",
64+
"sha256": "abc...xyz",
65+
"lastUpdated": "1234567890",
66+
"nutritionFacts": "<StrictNutritionFacts>",
67+
"dataPermissionsLevel": "<AiPermissions>",
68+
"AiInformation": "<StrictAiInformation>"
6869
}
6970
```
7071

@@ -76,15 +77,14 @@ This makes outputting AI Components fairly simple, and standard.
7677
const ai = {jsonObj}
7778

7879
<AiInformation
79-
trigger={<Button>AI information</Button>}
80-
8180
data={ai.AiInformation}
8281
dataPermissionLevelsCurrentFeature={ai.name}
8382
dataPermissionLevelsData={ai.dataPermissionsLevel}
8483
nutritionFactsFeatureName={ai.name}
8584
nutritionFactsData={ai.nutritionFacts.data}
8685

8786
title="Features"
87+
trigger={<Button>AI information</Button>}
8888

8989
dataPermissionLevelsTitle="Data Permission Levels"
9090
dataPermissionLevelsCurrentFeatureText="Current Feature:"
@@ -111,7 +111,7 @@ const { nutritionFacts } = jsonObj // Destructured
111111

112112
<NutritionFacts
113113
featureName={ai.name || nutritionFacts.name}
114-
data={ai.nutritionFacts.data || nutritionFacts.data }
114+
data={ai.nutritionFacts.data || nutritionFacts.data }
115115

116116
title="Nutrition Facts"
117117
modalLabel="This is a modal for AI facts"
@@ -127,16 +127,16 @@ const { nutritionFacts } = jsonObj // Destructured
127127
const ai = {jsonObj}
128128

129129
<DataPermissionLevels
130-
131130
currentFeature={ai.name}
132-
data={ai.dataPermissionsLevel}
131+
data={ai.dataPermissionsLevel}
133132

134133
title="Data Permission Levels"
135134
currentFeatureText="Current Feature:"
136135
closeIconButtonScreenReaderLabel="Close"
137136
closeButtonText="Close"
138137
modalLabel="This is a Data Permission Levels modal"
139138
triggerText="Data Permission Levels"
139+
/>
140140
```
141141

142142
### Importing

0 commit comments

Comments
 (0)