Skip to content

Commit 14d67c2

Browse files
author
Katie George
committed
chore: Update test data
1 parent e8ffaeb commit 14d67c2

File tree

4 files changed

+88
-74
lines changed

4 files changed

+88
-74
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"./avatar": "./avatar/index.js",
4343
"./chat-bubble": "./chat-bubble/index.js",
4444
"./loading-bar": "./loading-bar/index.js",
45+
"./support-prompt-group": "./support-prompt-group/index.js",
4546
"./test-utils/dom": "./test-utils/dom/index.js",
4647
"./test-utils/selectors": "./test-utils/selectors/index.js",
4748
"./internal/api-docs/*.js": "./internal/api-docs/*.js"
@@ -120,7 +121,7 @@
120121
],
121122
"*.{scss,css}": [
122123
"stylelint --fix"
123-
],
124+
],
124125
"package-lock.json": [
125126
"./scripts/prepare-package-lock.js"
126127
]

pages/support-prompt-group/in-context.page.tsx

Lines changed: 70 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -16,75 +16,82 @@ export default function SupportPromptPage() {
1616
<ScreenshotArea>
1717
<main style={{ maxWidth: "800px" }}>
1818
<TestBed>
19-
<Container header={<Header>Image generator</Header>}>
20-
<SpaceBetween direction="vertical" size="xxl">
21-
<div style={{ height: "100px" }} />
19+
<SpaceBetween size="xl">
20+
<Container header={<Header>Image generator</Header>}>
21+
<SpaceBetween direction="vertical" size="xxl">
22+
<div style={{ height: "100px" }} />
2223

23-
<SpaceBetween direction="vertical" size="m">
24-
<SupportPromptGroup
25-
ariaLabel="Horizontal support prompt group"
26-
alignment="horizontal"
27-
onItemClick={({ detail }) => console.log(detail)}
28-
items={[
29-
{
30-
text: "Create a really detailed and powerful image. Create a really detailed and powerful image. Create a really detailed and powerful image. Create a really detailed and powerful image. Create a really detailed and powerful image. Create a really detailed and powerful image. Create a really detailed and powerful image. ",
31-
id: "image",
32-
},
33-
{
34-
text: "Help me brainstorm for an upcoming sign-off. Help me brainstorm for an upcoming sign-off. Help me brainstorm for an upcoming sign-off.",
35-
id: "brainstorm",
36-
},
37-
{
38-
text: "Summarize this long and complex PDF for me. Summarize this long and complex PDF for me. Summarize this long and complex PDF for me. Summarize this long and complex PDF for me. Summarize this long and complex PDF for me. ",
39-
id: "summarize",
40-
},
41-
]}
42-
/>
43-
<PromptInput placeholder="Write a prompt" value="" actionButtonIconName="send" />
24+
<SpaceBetween direction="vertical" size="m">
25+
<SupportPromptGroup
26+
alignment="horizontal"
27+
ariaLabel="Horizontal support prompt group"
28+
onItemClick={({ detail }) => console.log(detail)}
29+
items={[
30+
{
31+
text: "Create a really detailed and powerful image.",
32+
id: "image",
33+
},
34+
{
35+
text: "Help me brainstorm for an upcoming sign-off.",
36+
id: "brainstorm",
37+
},
38+
{
39+
text: "Summarize this long and complex PDF for me.",
40+
id: "summarize",
41+
},
42+
]}
43+
/>
44+
45+
<PromptInput placeholder="Write a prompt" value="" actionButtonIconName="send" />
46+
</SpaceBetween>
4447
</SpaceBetween>
45-
</SpaceBetween>
46-
</Container>
48+
</Container>
4749

48-
<Container header={<Header>Image generator</Header>}>
49-
<SpaceBetween direction="vertical" size="xxl">
50-
<div>
51-
<ChatBubble type="outgoing" avatar={<ChatBubbleAvatarUser />} ariaLabel="User at 4:23:20pm">
52-
What can I do with Amazon S3?
53-
</ChatBubble>
54-
<SpaceBetween direction="vertical" size="xs">
55-
<ChatBubble avatar={<ChatBubbleAvatarGenAI />} type="incoming" ariaLabel="Gen AI at at 4:23:23pm">
56-
Amazon S3 provides a simple web service interface that you can use to store and retrieve any amount
57-
of data, at any time, from anywhere.
50+
<Container header={<Header>Image generator</Header>}>
51+
<SpaceBetween direction="vertical" size="xxl">
52+
<div>
53+
<ChatBubble type="outgoing" avatar={<ChatBubbleAvatarUser />} ariaLabel="User at 4:23:20pm">
54+
What can I do with Amazon S3?
5855
</ChatBubble>
59-
<div style={{ marginInlineStart: "36px" }}>
60-
<SupportPromptGroup
61-
ariaLabel="Horizontal support prompt group"
62-
alignment="vertical"
63-
onItemClick={({ detail }) => console.log(detail)}
64-
items={[
65-
{
66-
text: "Create a really detailed and powerful image.",
67-
id: "image",
68-
},
69-
{
70-
text: "Help me brainstorm for an upcoming sign-off.",
71-
id: "brainstorm",
72-
},
73-
{
74-
text: "Summarize this long and complex PDF for me.",
75-
id: "summarize",
76-
},
77-
]}
78-
/>
79-
</div>
80-
</SpaceBetween>
81-
</div>
56+
<SpaceBetween direction="vertical" size="xs">
57+
<ChatBubble avatar={<ChatBubbleAvatarGenAI />} type="incoming" ariaLabel="Gen AI at at 4:23:23pm">
58+
Amazon S3 provides a simple web service interface that you can use to store and retrieve any
59+
amount of data, at any time, from anywhere.
60+
</ChatBubble>
61+
<div style={{ marginInlineStart: "36px" }}>
62+
<SupportPromptGroup
63+
ariaLabel="Horizontal support prompt group"
64+
alignment="vertical"
65+
onItemClick={({ detail }) => console.log(detail)}
66+
items={[
67+
{
68+
text: "Create a really detailed and powerful image. The image should be of a mountain scene with a blue lake and green hills, with a sunset in the background. In the lake, there should be 3 whales leaping out of the water.",
69+
id: "image",
70+
},
71+
{
72+
text: "Help me brainstorm for an upcoming sign-off.",
73+
id: "brainstorm",
74+
},
75+
{
76+
text: "Summarize this long and complex PDF for me. Include a paragraph containing 3-4 sentences that capture the main ideas and overall message of the documents, a list of 5 to 10 key points from the document, and up to 3 follow-up questions that arise from the content of the document.",
77+
id: "summarize",
78+
},
79+
{
80+
text: "What questions remain unanswered after reading the document(s)? The response shall consider all current or past uploaded documents.",
81+
id: "image",
82+
},
83+
]}
84+
/>
85+
</div>
86+
</SpaceBetween>
87+
</div>
8288

83-
<SpaceBetween direction="vertical" size="m">
84-
<PromptInput placeholder="Write a prompt" value="" actionButtonIconName="send" />
89+
<SpaceBetween direction="vertical" size="m">
90+
<PromptInput placeholder="Write a prompt" value="" actionButtonIconName="send" />
91+
</SpaceBetween>
8592
</SpaceBetween>
86-
</SpaceBetween>
87-
</Container>
93+
</Container>
94+
</SpaceBetween>
8895
</TestBed>
8996
</main>
9097
</ScreenshotArea>

pages/support-prompt-group/simple.page.tsx

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ export default function SupportPromptPage() {
3535
<h2>vertical group</h2>
3636
<SupportPromptGroup
3737
ariaLabel="Vertical support prompt group"
38-
alignment="vertical"
3938
onItemClick={({ detail }) => console.log(detail)}
4039
items={[
4140
{
@@ -60,38 +59,45 @@ export default function SupportPromptPage() {
6059
onItemClick={({ detail }) => console.log(detail)}
6160
items={[
6261
{
63-
text: "Create a really detailed and powerful image. Create a really detailed and powerful image. Create a really detailed and powerful image. Create a really detailed and powerful image. Create a really detailed and powerful image. Create a really detailed and powerful image. Create a really detailed and powerful image. ",
62+
text: "Create a really detailed and powerful image. The image should be of a mountain scene with a blue lake and green hills, with a sunset in the background. In the lake, there should be 3 whales leaping out of the water.",
6463
id: "image",
6564
},
6665
{
67-
text: "Help me brainstorm for an upcoming sign-off. Help me brainstorm for an upcoming sign-off. Help me brainstorm for an upcoming sign-off.",
66+
text: "Help me brainstorm for an upcoming sign-off.",
6867
id: "brainstorm",
6968
},
7069
{
71-
text: "Summarize this long and complex PDF for me. Summarize this long and complex PDF for me. Summarize this long and complex PDF for me. Summarize this long and complex PDF for me. Summarize this long and complex PDF for me. ",
70+
text: "Summarize this long and complex PDF for me. Include a paragraph containing 3-4 sentences that capture the main ideas and overall message of the documents, a list of 5 to 10 key points from the document, and up to 3 follow-up questions that arise from the content of the document.",
7271
id: "summarize",
7372
},
73+
{
74+
text: "What questions remain unanswered after reading the document(s)? The response shall consider all current or past uploaded documents.",
75+
id: "image",
76+
},
7477
]}
7578
/>
7679

7780
<h2>vertical group with really long text</h2>
7881
<SupportPromptGroup
7982
ariaLabel="Horizontal support prompt group"
80-
alignment="vertical"
8183
onItemClick={({ detail }) => console.log(detail)}
8284
items={[
8385
{
84-
text: "Create a really detailed and powerful image. Create a really detailed and powerful image. Create a really detailed and powerful image. Create a really detailed and powerful image. Create a really detailed and powerful image. Create a really detailed and powerful image. Create a really detailed and powerful image. ",
86+
text: "Create a really detailed and powerful image. The image should be of a mountain scene with a blue lake and green hills, with a sunset in the background. In the lake, there should be 3 whales leaping out of the water.",
8587
id: "image",
8688
},
8789
{
88-
text: "Help me brainstorm for an upcoming sign-off. Help me brainstorm for an upcoming sign-off. Help me brainstorm for an upcoming sign-off.",
90+
text: "Help me brainstorm for an upcoming sign-off.",
8991
id: "brainstorm",
9092
},
9193
{
92-
text: "Summarize this long and complex PDF for me. Summarize this long and complex PDF for me. Summarize this long and complex PDF for me. Summarize this long and complex PDF for me. Summarize this long and complex PDF for me. ",
94+
text: "Summarize this long and complex PDF for me. Include a paragraph containing 3-4 sentences that capture the main ideas and overall message of the documents, a list of 5 to 10 key points from the document, and up to 3 follow-up questions that arise from the content of the document.",
9395
id: "summarize",
9496
},
97+
{
98+
text: "What questions remain unanswered after reading the document(s)? The response shall consider all current or past uploaded documents.",
99+
id: "image",
100+
},
95101
]}
96102
/>
97103
</TestBed>

src/support-prompt-group/internal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import styles from "./styles.css.js";
2525
export const InternalSupportPromptGroup = forwardRef(
2626
(
2727
{
28-
alignment = "horizontal",
28+
alignment = "vertical",
2929
onItemClick,
3030
items,
3131
__internalRootRef,
@@ -170,7 +170,7 @@ export const InternalSupportPromptGroup = forwardRef(
170170
{...getDataAttributes(rest)}
171171
role="menubar"
172172
className={clsx(styles.root, {
173-
[styles.vertical]: alignment === "vertical",
173+
[styles.vertical]: alignment !== "horizontal",
174174
})}
175175
aria-label={ariaLabel}
176176
onFocus={onFocus}

0 commit comments

Comments
 (0)