oneslash-design-system 2.23.1 → 2.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/DESIGN.md +20 -5
- package/dist/cases/activity-timeline/activity.d.ts +1 -0
- package/dist/cases/activity-timeline/activity.jsx +43 -0
- package/dist/cases/activity-timeline/versions.d.ts +1 -0
- package/dist/cases/activity-timeline/versions.jsx +130 -0
- package/dist/cases/activity-timeline.md +315 -0
- package/dist/cases/agent-plan-proposal.md +1 -0
- package/dist/cases/ask-page/answered.d.ts +1 -0
- package/dist/cases/ask-page/answered.jsx +248 -0
- package/dist/cases/ask-page/first-visit.d.ts +1 -0
- package/dist/cases/ask-page/first-visit.jsx +118 -0
- package/dist/cases/ask-page.md +551 -0
- package/dist/cases/billing-page/self-serve.jsx +4 -4
- package/dist/cases/billing-page/trial.d.ts +1 -0
- package/dist/cases/billing-page/trial.jsx +115 -0
- package/dist/cases/billing-page.md +166 -5
- package/dist/cases/chart/bars.d.ts +1 -0
- package/dist/cases/chart/bars.jsx +83 -0
- package/dist/cases/chart/lines.d.ts +1 -0
- package/dist/cases/chart/lines.jsx +71 -0
- package/dist/cases/chart.md +258 -0
- package/dist/cases/collapsible-search/popover.jsx +1 -1
- package/dist/cases/collapsible-search.md +2 -2
- package/dist/cases/comment-thread/card.d.ts +1 -0
- package/dist/cases/comment-thread/card.jsx +141 -0
- package/dist/cases/comment-thread/thread.d.ts +1 -0
- package/dist/cases/comment-thread/thread.jsx +87 -0
- package/dist/cases/comment-thread.md +349 -0
- package/dist/cases/cookie-choice/banner.d.ts +1 -0
- package/dist/cases/cookie-choice/banner.jsx +82 -0
- package/dist/cases/cookie-choice/settings.d.ts +1 -0
- package/dist/cases/cookie-choice/settings.jsx +75 -0
- package/dist/cases/cookie-choice.md +234 -0
- package/dist/cases/dashboard/numbers-first.jsx +63 -2
- package/dist/cases/dashboard/work-first.jsx +1 -1
- package/dist/cases/dashboard.md +77 -5
- package/dist/cases/data-table-page/all-rows.jsx +1 -1
- package/dist/cases/data-table-page/paged.jsx +1 -1
- package/dist/cases/data-table-page.md +2 -2
- package/dist/cases/invoice-list/table.jsx +21 -9
- package/dist/cases/invoice-list.md +27 -12
- package/dist/cases/leaderboard/ranked.d.ts +1 -0
- package/dist/cases/leaderboard/ranked.jsx +44 -0
- package/dist/cases/leaderboard/table.d.ts +1 -0
- package/dist/cases/leaderboard/table.jsx +87 -0
- package/dist/cases/leaderboard.md +177 -0
- package/dist/cases/message-reactions/picker.jsx +1 -1
- package/dist/cases/message-reactions.md +2 -2
- package/dist/cases/message-row.md +2 -1
- package/dist/cases/newsletter-signup/inline.d.ts +1 -0
- package/dist/cases/newsletter-signup/inline.jsx +72 -0
- package/dist/cases/newsletter-signup/section.d.ts +1 -0
- package/dist/cases/newsletter-signup/section.jsx +72 -0
- package/dist/cases/newsletter-signup.md +234 -0
- package/dist/cases/number-format.md +9 -3
- package/dist/cases/onboarding/checklist.d.ts +1 -0
- package/dist/cases/onboarding/checklist.jsx +92 -0
- package/dist/cases/onboarding/steps.d.ts +3 -0
- package/dist/cases/onboarding/steps.jsx +177 -0
- package/dist/cases/onboarding.md +368 -0
- package/dist/cases/people-row/stack.jsx +1 -1
- package/dist/cases/people-row.md +2 -2
- package/dist/cases/plan-comparison/table.d.ts +1 -0
- package/dist/cases/plan-comparison/table.jsx +47 -0
- package/dist/cases/plan-comparison.md +94 -0
- package/dist/cases/plan-picker.md +1 -0
- package/dist/cases/plan-sign-off/one-approver.d.ts +1 -0
- package/dist/cases/plan-sign-off/one-approver.jsx +129 -0
- package/dist/cases/plan-sign-off/team.d.ts +1 -0
- package/dist/cases/plan-sign-off/team.jsx +213 -0
- package/dist/cases/plan-sign-off.md +541 -0
- package/dist/cases/pricing-section.md +1 -1
- package/dist/cases/site-footer/columns.jsx +2 -1
- package/dist/cases/site-footer.md +3 -1
- package/dist/cases/stat-row/tiles.jsx +2 -1
- package/dist/cases/stat-row.md +5 -2
- package/dist/cases/task-header/agent-sets-status.d.ts +1 -0
- package/dist/cases/task-header/agent-sets-status.jsx +164 -0
- package/dist/cases/task-header/people-change-status.d.ts +1 -0
- package/dist/cases/task-header/people-change-status.jsx +175 -0
- package/dist/cases/task-header.md +576 -0
- package/dist/cases.json +883 -30
- package/dist/components/alert.d.ts +3 -1
- package/dist/components/alert.jsx +5 -5
- package/dist/components/barChart.d.ts +35 -0
- package/dist/components/barChart.jsx +92 -0
- package/dist/components/dateField.jsx +1 -1
- package/dist/components/formatNumber.d.ts +10 -2
- package/dist/components/formatNumber.js +44 -9
- package/dist/components/heading.d.ts +2 -2
- package/dist/components/heading.jsx +5 -3
- package/dist/components/layout.d.ts +4 -2
- package/dist/components/layout.jsx +13 -2
- package/dist/components/lineChart.d.ts +39 -0
- package/dist/components/lineChart.jsx +128 -0
- package/dist/components/markdown.d.ts +24 -0
- package/dist/components/markdown.jsx +81 -0
- package/dist/components/pageShell.d.ts +3 -3
- package/dist/components/pageShell.jsx +6 -5
- package/dist/components/popover.d.ts +5 -1
- package/dist/components/popover.jsx +3 -2
- package/dist/components/progress.jsx +1 -1
- package/dist/components/select.jsx +5 -2
- package/dist/components/statTile.d.ts +1 -1
- package/dist/components/statTile.jsx +7 -2
- package/dist/components/tableCell.d.ts +4 -3
- package/dist/components/tableCell.jsx +2 -2
- package/dist/components/timeline.d.ts +32 -0
- package/dist/components/timeline.jsx +54 -0
- package/dist/components/titleBar.d.ts +3 -1
- package/dist/components/titleBar.jsx +9 -4
- package/dist/components/toaster.jsx +81 -11
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/internal/chart.d.ts +39 -0
- package/dist/internal/chart.js +110 -0
- package/dist/internal/chartFrame.d.ts +29 -0
- package/dist/internal/chartFrame.jsx +57 -0
- package/dist/internal/markdown.d.ts +40 -0
- package/dist/internal/markdown.js +577 -0
- package/dist/internal/toaster.d.ts +2 -0
- package/dist/internal/toaster.js +8 -0
- package/dist/native-mapping.json +28 -4
- package/dist/stories/BarChart.stories.d.ts +10 -0
- package/dist/stories/BarChart.stories.jsx +104 -0
- package/dist/stories/Cases.generated.stories.d.ts +22 -0
- package/dist/stories/Cases.generated.stories.jsx +44 -0
- package/dist/stories/Heading.stories.d.ts +1 -0
- package/dist/stories/Heading.stories.jsx +17 -0
- package/dist/stories/LineChart.stories.d.ts +9 -0
- package/dist/stories/LineChart.stories.jsx +34 -0
- package/dist/stories/Markdown.stories.d.ts +9 -0
- package/dist/stories/Markdown.stories.jsx +66 -0
- package/dist/stories/Onboarding.probe.stories.d.ts +6 -0
- package/dist/stories/Onboarding.probe.stories.jsx +12 -0
- package/dist/stories/Popover.stories.d.ts +2 -0
- package/dist/stories/Popover.stories.jsx +33 -0
- package/dist/stories/StatTile.stories.d.ts +4 -0
- package/dist/stories/StatTile.stories.jsx +47 -2
- package/dist/stories/Timeline.stories.d.ts +8 -0
- package/dist/stories/Timeline.stories.jsx +49 -0
- package/dist/stories/TitleBar.stories.d.ts +1 -0
- package/dist/stories/TitleBar.stories.jsx +13 -0
- package/dist/stories/Toaster.stories.d.ts +4 -0
- package/dist/stories/Toaster.stories.jsx +30 -0
- package/package.json +1 -1
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
# History and activity
|
|
2
|
+
|
|
3
|
+
A person reads what happened on a task, or opens an older version of a document and brings it back.
|
|
4
|
+
|
|
5
|
+
## Do
|
|
6
|
+
|
|
7
|
+
- Show the history in a `SidePane` titled 'History' beside the page, as the case 'Side pane' says.
|
|
8
|
+
- Use `Timeline`, newest first. It draws one dot per row and a line to the next.
|
|
9
|
+
- Write each event as who did what: 'Dana Lee approved the plan', 'Acme Agent opened a pull request'.
|
|
10
|
+
- Write each time in full in `when`, such as 'Nov 16, 2026, 2:40 PM', and the ISO value in `dateTime`.
|
|
11
|
+
- Pass `actor` with `agent: true` for the agent, so its row shows the agent face and no picture.
|
|
12
|
+
- Pass `href` when an event has a page of its own, such as a pull request. The title becomes the link.
|
|
13
|
+
- Mark an event that needs a look with a `tag`, such as a warning 'Needs fixing' on 'Check failed'. The word says it, not the dot.
|
|
14
|
+
- Pass `onSelect` and `selectedId` for versions. Each row is one button, and the chosen one has `aria-current`.
|
|
15
|
+
- Give the newest version the `tag` 'Current'.
|
|
16
|
+
- Show the chosen version under the list, with who saved it and when, and a secondary Button 'Restore This Version'. The current version has no Restore.
|
|
17
|
+
- Confirm a restore in a small Modal, as the rule 'A confirm says exactly what will happen' says. Title it 'Restore Version', with 'Cancel' and then 'Restore'.
|
|
18
|
+
- Say in the body what changes and what is kept: 'This makes the version from Nov 15, 2026, 5:45 PM the current plan, and everyone signs it off again. Your current plan is kept as a version.'
|
|
19
|
+
- Make 'Restore' `loading` with its label, disable 'Cancel' and ignore `onClose` while the request runs.
|
|
20
|
+
- Add the restore as the newest version once it works, marked Current, and say so in an inline success `Alert`.
|
|
21
|
+
- Show `Skeleton` rows while the history loads, then the list as soon as it loads.
|
|
22
|
+
- Say that it failed when the history cannot load, as the case 'Load failure' says: 'Could not load the history', with 'Try Again'.
|
|
23
|
+
- Show `EmptyBox` when there is nothing yet, as the rule 'An empty list says what will fill it' says: 'No changes yet' and 'Each saved edit shows here.'
|
|
24
|
+
|
|
25
|
+
## Don't
|
|
26
|
+
|
|
27
|
+
- Do not color the dots by the kind of event. A color with no word means nothing to a screen reader.
|
|
28
|
+
- Do not show a relative time alone, such as '2h'. Write the date and the time.
|
|
29
|
+
- Do not show the empty text when the history failed to load.
|
|
30
|
+
- Do not let a restore overwrite the current version. Keep it as a version first.
|
|
31
|
+
- Do not draw the dots and the line by hand. Use `Timeline`.
|
|
32
|
+
|
|
33
|
+
## Option: Activity
|
|
34
|
+
|
|
35
|
+
Use when: A person reads what happened on a task, in order.
|
|
36
|
+
|
|
37
|
+
Uses: `AppShell`, `IconButton`, `MenuItem`, `Navigation`, `Paragraph`, `SidePane`, `Stack`, `Timeline`, `TitleBar`, `Tooltip`
|
|
38
|
+
|
|
39
|
+
```tsx
|
|
40
|
+
'use client';
|
|
41
|
+
import { useRef, useState } from 'react';
|
|
42
|
+
import AppShell from 'oneslash-design-system/components/appShell';
|
|
43
|
+
import SidePane, { type SidePaneHandle } from 'oneslash-design-system/components/sidePane';
|
|
44
|
+
import Navigation from 'oneslash-design-system/components/navigation';
|
|
45
|
+
import MenuItem from 'oneslash-design-system/components/menuItem';
|
|
46
|
+
import TitleBar from 'oneslash-design-system/components/titleBar';
|
|
47
|
+
import IconButton from 'oneslash-design-system/components/iconButton';
|
|
48
|
+
import Tooltip from 'oneslash-design-system/components/tooltip';
|
|
49
|
+
import Timeline, { type TimelineItem } from 'oneslash-design-system/components/timeline';
|
|
50
|
+
import Paragraph from 'oneslash-design-system/components/paragraph';
|
|
51
|
+
import { Stack } from 'oneslash-design-system/components/layout';
|
|
52
|
+
|
|
53
|
+
const task = 'Launch checklist';
|
|
54
|
+
|
|
55
|
+
// Newest first. Each title says who did what, and each time is written in full.
|
|
56
|
+
const events: TimelineItem[] = [
|
|
57
|
+
{ id: 'e6', title: 'Check failed', when: 'Nov 16, 2026, 3:05 PM', dateTime: '2026-11-16T15:05', detail: 'The sign-up form test failed on a phone.', tag: { label: 'Needs fixing', color: 'warning' } },
|
|
58
|
+
{ id: 'e5', title: 'Acme Agent opened a pull request', when: 'Nov 16, 2026, 2:58 PM', dateTime: '2026-11-16T14:58', actor: { name: 'Acme Agent', agent: true }, detail: 'Updates the home page and its tests', href: '/pulls/42' },
|
|
59
|
+
{ id: 'e4', title: 'Dana Lee approved the plan', when: 'Nov 16, 2026, 2:52 PM', dateTime: '2026-11-16T14:52', actor: { name: 'Dana Lee' } },
|
|
60
|
+
{ id: 'e3', title: 'Acme Agent wrote the plan', when: 'Nov 16, 2026, 2:40 PM', dateTime: '2026-11-16T14:40', actor: { name: 'Acme Agent', agent: true } },
|
|
61
|
+
{ id: 'e2', title: 'Ben Carter added Omar Reyes to the task', when: 'Nov 15, 2026, 4:10 PM', dateTime: '2026-11-15T16:10', actor: { name: 'Ben Carter' } },
|
|
62
|
+
{ id: 'e1', title: 'Ben Carter created the task', when: 'Nov 15, 2026, 4:02 PM', dateTime: '2026-11-15T16:02', actor: { name: 'Ben Carter' } },
|
|
63
|
+
];
|
|
64
|
+
|
|
65
|
+
// The places. A real app lets each link go to its page.
|
|
66
|
+
const sidebar = (
|
|
67
|
+
<Navigation aria-label="Main">
|
|
68
|
+
<MenuItem
|
|
69
|
+
size="small"
|
|
70
|
+
label="Tasks"
|
|
71
|
+
iconName="ListChecks"
|
|
72
|
+
href="/tasks"
|
|
73
|
+
isSelected
|
|
74
|
+
aria-current="page"
|
|
75
|
+
onClick={(event: { preventDefault: () => void }) => event.preventDefault()}
|
|
76
|
+
/>
|
|
77
|
+
</Navigation>
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
export default function ActivityTimelineActivity() {
|
|
81
|
+
const [navOpen, setNavOpen] = useState(false);
|
|
82
|
+
// The person opened the history from the task header. The example starts with the pane open.
|
|
83
|
+
const [open, setOpen] = useState(true);
|
|
84
|
+
const pane = useRef<SidePaneHandle>(null);
|
|
85
|
+
|
|
86
|
+
return (
|
|
87
|
+
<AppShell
|
|
88
|
+
title="Tasks"
|
|
89
|
+
navOpen={navOpen}
|
|
90
|
+
onNavOpenChange={setNavOpen}
|
|
91
|
+
sidebar={sidebar}
|
|
92
|
+
pane={
|
|
93
|
+
open && (
|
|
94
|
+
<SidePane ref={pane} title="History" onClose={() => setOpen(false)}>
|
|
95
|
+
{/* A real app shows Skeleton rows while it loads, the case 'Load failure' if it fails, and EmptyBox when there is nothing yet. */}
|
|
96
|
+
<Timeline id="activity-timeline-events" aria-label={`History of ${task}`} items={events} />
|
|
97
|
+
</SidePane>
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
>
|
|
101
|
+
<Stack gap="large">
|
|
102
|
+
<TitleBar
|
|
103
|
+
title={task}
|
|
104
|
+
actions={
|
|
105
|
+
<Tooltip title="History">
|
|
106
|
+
<IconButton
|
|
107
|
+
color="iconOnly"
|
|
108
|
+
state={open ? 'selected' : 'enabled'}
|
|
109
|
+
size="medium"
|
|
110
|
+
iconName="History"
|
|
111
|
+
ariaLabel={`Show the history of ${task}`}
|
|
112
|
+
aria-expanded={open}
|
|
113
|
+
onClick={() => (open ? pane.current?.focus() : setOpen(true))}
|
|
114
|
+
/>
|
|
115
|
+
</Tooltip>
|
|
116
|
+
}
|
|
117
|
+
/>
|
|
118
|
+
<Paragraph tone="secondary" measure="none">Acme Agent opened a pull request for the new home page. One check failed.</Paragraph>
|
|
119
|
+
</Stack>
|
|
120
|
+
</AppShell>
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Option: Versions
|
|
126
|
+
|
|
127
|
+
Use when: A document has saved versions that a person can open and restore.
|
|
128
|
+
|
|
129
|
+
Uses: `Alert`, `AppShell`, `Button`, `Cluster`, `Heading`, `IconButton`, `Line`, `List`, `MenuItem`, `Modal`, `Navigation`, `Paragraph`, `SidePane`, `Stack`, `Timeline`, `TitleBar`, `Tooltip`
|
|
130
|
+
|
|
131
|
+
```tsx
|
|
132
|
+
'use client';
|
|
133
|
+
import { useEffect, useRef, useState } from 'react';
|
|
134
|
+
import AppShell from 'oneslash-design-system/components/appShell';
|
|
135
|
+
import SidePane, { type SidePaneHandle } from 'oneslash-design-system/components/sidePane';
|
|
136
|
+
import Navigation from 'oneslash-design-system/components/navigation';
|
|
137
|
+
import MenuItem from 'oneslash-design-system/components/menuItem';
|
|
138
|
+
import TitleBar from 'oneslash-design-system/components/titleBar';
|
|
139
|
+
import IconButton from 'oneslash-design-system/components/iconButton';
|
|
140
|
+
import Tooltip from 'oneslash-design-system/components/tooltip';
|
|
141
|
+
import Timeline from 'oneslash-design-system/components/timeline';
|
|
142
|
+
import Heading from 'oneslash-design-system/components/heading';
|
|
143
|
+
import Paragraph from 'oneslash-design-system/components/paragraph';
|
|
144
|
+
import List from 'oneslash-design-system/components/list';
|
|
145
|
+
import Line from 'oneslash-design-system/components/line';
|
|
146
|
+
import Button from 'oneslash-design-system/components/button';
|
|
147
|
+
import Modal from 'oneslash-design-system/components/modal';
|
|
148
|
+
import Alert from 'oneslash-design-system/components/alert';
|
|
149
|
+
import { Cluster, Stack } from 'oneslash-design-system/components/layout';
|
|
150
|
+
|
|
151
|
+
type Version = {
|
|
152
|
+
id: string;
|
|
153
|
+
title: string;
|
|
154
|
+
when: string;
|
|
155
|
+
dateTime: string;
|
|
156
|
+
by: string;
|
|
157
|
+
agent?: boolean;
|
|
158
|
+
steps: string[];
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
const task = 'Launch checklist';
|
|
162
|
+
|
|
163
|
+
// The plan's saved versions, newest first. The newest is the current plan.
|
|
164
|
+
const firstVersions: Version[] = [
|
|
165
|
+
{ id: 'v5', title: 'Moved the launch to Nov 20, 2026', when: 'Nov 16, 2026, 2:40 PM', dateTime: '2026-11-16T14:40', by: 'Dana Lee', steps: ['Update the home page and its tests.', 'Write the new copy.', 'Check the screens on a phone.', 'Merge on Nov 20, 2026.'] },
|
|
166
|
+
{ id: 'v4', title: 'Added a check on a phone', when: 'Nov 16, 2026, 9:10 AM', dateTime: '2026-11-16T09:10', by: 'Acme Agent', agent: true, steps: ['Update the home page and its tests.', 'Write the new copy.', 'Check the screens on a phone.', 'Merge on Nov 18, 2026.'] },
|
|
167
|
+
{ id: 'v3', title: 'Gave the copy to Omar Reyes', when: 'Nov 15, 2026, 5:45 PM', dateTime: '2026-11-15T17:45', by: 'Ben Carter', steps: ['Update the home page and its tests.', 'Write the new copy.', 'Merge on Nov 18, 2026.'] },
|
|
168
|
+
{ id: 'v2', title: 'Split the release into two steps', when: 'Nov 15, 2026, 1:00 PM', dateTime: '2026-11-15T13:00', by: 'Acme Agent', agent: true, steps: ['Update the home page.', 'Merge on Nov 18, 2026.'] },
|
|
169
|
+
{ id: 'v1', title: 'Wrote the first plan', when: 'Nov 14, 2026, 10:20 AM', dateTime: '2026-11-14T10:20', by: 'Acme Agent', agent: true, steps: ['Update the home page and merge it.'] },
|
|
170
|
+
];
|
|
171
|
+
|
|
172
|
+
// The places. A real app lets each link go to its page.
|
|
173
|
+
const sidebar = (
|
|
174
|
+
<Navigation aria-label="Main">
|
|
175
|
+
<MenuItem
|
|
176
|
+
size="small"
|
|
177
|
+
label="Tasks"
|
|
178
|
+
iconName="ListChecks"
|
|
179
|
+
href="/tasks"
|
|
180
|
+
isSelected
|
|
181
|
+
aria-current="page"
|
|
182
|
+
onClick={(event: { preventDefault: () => void }) => event.preventDefault()}
|
|
183
|
+
/>
|
|
184
|
+
</Navigation>
|
|
185
|
+
);
|
|
186
|
+
|
|
187
|
+
export default function ActivityTimelineVersions() {
|
|
188
|
+
const [navOpen, setNavOpen] = useState(false);
|
|
189
|
+
// The person opened the history from the task header and chose a version. The example starts there.
|
|
190
|
+
const [open, setOpen] = useState(true);
|
|
191
|
+
const [versions, setVersions] = useState(firstVersions);
|
|
192
|
+
const [selectedId, setSelectedId] = useState('v4');
|
|
193
|
+
const [confirming, setConfirming] = useState(false);
|
|
194
|
+
const [restoring, setRestoring] = useState(false);
|
|
195
|
+
const [restored, setRestored] = useState<string | null>(null);
|
|
196
|
+
const pane = useRef<SidePaneHandle>(null);
|
|
197
|
+
const timer = useRef<ReturnType<typeof setTimeout>>();
|
|
198
|
+
|
|
199
|
+
// On unmount it stops the request.
|
|
200
|
+
useEffect(() => () => clearTimeout(timer.current), []);
|
|
201
|
+
|
|
202
|
+
const current = versions[0];
|
|
203
|
+
const chosen = versions.find((v) => v.id === selectedId) ?? current;
|
|
204
|
+
|
|
205
|
+
// While the request runs, Escape and Cancel do nothing.
|
|
206
|
+
function keepCurrent() {
|
|
207
|
+
if (restoring) return;
|
|
208
|
+
setConfirming(false);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// The current plan stays as a version. The restore is a new version on top, marked Current.
|
|
212
|
+
// The Modal gives focus back to 'Restore This Version', which stays: the chosen version is not the current one.
|
|
213
|
+
function restore() {
|
|
214
|
+
if (restoring) return;
|
|
215
|
+
setRestoring(true);
|
|
216
|
+
// Stands in for the request to the server.
|
|
217
|
+
timer.current = setTimeout(() => {
|
|
218
|
+
setRestoring(false);
|
|
219
|
+
setConfirming(false);
|
|
220
|
+
setVersions((list) => [
|
|
221
|
+
{ ...chosen, id: `v${list.length + 1}`, title: `Restored the version from ${chosen.when}`, when: 'Nov 16, 2026, 2:55 PM', dateTime: '2026-11-16T14:55', by: 'Dana Lee', agent: false },
|
|
222
|
+
...list,
|
|
223
|
+
]);
|
|
224
|
+
setRestored(chosen.when);
|
|
225
|
+
}, 1200);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
return (
|
|
229
|
+
<AppShell
|
|
230
|
+
title="Tasks"
|
|
231
|
+
navOpen={navOpen}
|
|
232
|
+
onNavOpenChange={setNavOpen}
|
|
233
|
+
sidebar={sidebar}
|
|
234
|
+
pane={
|
|
235
|
+
open && (
|
|
236
|
+
<SidePane ref={pane} title="History" onClose={() => setOpen(false)}>
|
|
237
|
+
<Stack gap="large">
|
|
238
|
+
{restored && (
|
|
239
|
+
// An inline Alert is a polite status, so a screen reader hears it.
|
|
240
|
+
<Alert variant="inline" type="success" autoDismiss={false} message={`Restored the version from ${restored}.`} />
|
|
241
|
+
)}
|
|
242
|
+
<Timeline
|
|
243
|
+
id="activity-timeline-versions"
|
|
244
|
+
aria-label={`Versions of the plan for ${task}`}
|
|
245
|
+
items={versions.map((v, i) => ({
|
|
246
|
+
id: v.id,
|
|
247
|
+
title: v.title,
|
|
248
|
+
when: v.when,
|
|
249
|
+
dateTime: v.dateTime,
|
|
250
|
+
actor: { name: v.by, agent: v.agent },
|
|
251
|
+
tag: i === 0 ? { label: 'Current' } : undefined,
|
|
252
|
+
}))}
|
|
253
|
+
selectedId={chosen.id}
|
|
254
|
+
onSelect={setSelectedId}
|
|
255
|
+
/>
|
|
256
|
+
<Line />
|
|
257
|
+
{/* The chosen version, under the list. */}
|
|
258
|
+
<Stack gap="medium">
|
|
259
|
+
<Stack gap="small">
|
|
260
|
+
<Heading level={3} size="subtitle1">{chosen.title}</Heading>
|
|
261
|
+
<Paragraph size="body2" tone="secondary" measure="none">Saved by {chosen.by}, {chosen.when}</Paragraph>
|
|
262
|
+
</Stack>
|
|
263
|
+
<List marker="number" items={chosen.steps} />
|
|
264
|
+
{chosen.id !== current.id && (
|
|
265
|
+
<Cluster>
|
|
266
|
+
<Button size="small" type="secondary" state="enabled" label="Restore This Version" onClickButton={() => setConfirming(true)} />
|
|
267
|
+
</Cluster>
|
|
268
|
+
)}
|
|
269
|
+
</Stack>
|
|
270
|
+
</Stack>
|
|
271
|
+
</SidePane>
|
|
272
|
+
)
|
|
273
|
+
}
|
|
274
|
+
>
|
|
275
|
+
<Stack gap="large">
|
|
276
|
+
<TitleBar
|
|
277
|
+
title={task}
|
|
278
|
+
actions={
|
|
279
|
+
<Tooltip title="History">
|
|
280
|
+
<IconButton
|
|
281
|
+
color="iconOnly"
|
|
282
|
+
state={open ? 'selected' : 'enabled'}
|
|
283
|
+
size="medium"
|
|
284
|
+
iconName="History"
|
|
285
|
+
ariaLabel={`Show the history of ${task}`}
|
|
286
|
+
aria-expanded={open}
|
|
287
|
+
onClick={() => (open ? pane.current?.focus() : setOpen(true))}
|
|
288
|
+
/>
|
|
289
|
+
</Tooltip>
|
|
290
|
+
}
|
|
291
|
+
/>
|
|
292
|
+
<Paragraph tone="secondary" measure="none">The plan for this task has {versions.length} saved versions.</Paragraph>
|
|
293
|
+
</Stack>
|
|
294
|
+
<Modal
|
|
295
|
+
isOpen={confirming}
|
|
296
|
+
size="small"
|
|
297
|
+
title="Restore Version"
|
|
298
|
+
onClose={keepCurrent}
|
|
299
|
+
actions={
|
|
300
|
+
<>
|
|
301
|
+
<Button size="small" type="tertiary" state={restoring ? 'disabled' : 'enabled'} label="Cancel" onClickButton={keepCurrent} />
|
|
302
|
+
<Button size="small" type="primary" state="enabled" label="Restore" loading={restoring} onClickButton={restore} />
|
|
303
|
+
</>
|
|
304
|
+
}
|
|
305
|
+
>
|
|
306
|
+
<Paragraph measure="none">This makes the version from {chosen.when} the current plan, and everyone signs it off again. Your current plan is kept as a version.</Paragraph>
|
|
307
|
+
</Modal>
|
|
308
|
+
</AppShell>
|
|
309
|
+
);
|
|
310
|
+
}
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
## Native
|
|
314
|
+
|
|
315
|
+
On Apple use a `List` of rows with a `Circle` and a connecting line in an overlay, in an inspector, and a `confirmationDialog` for a restore. On Android use a `LazyColumn` with the dot and line drawn behind each row, in a side sheet.
|
|
@@ -31,6 +31,7 @@ The agent is about to change shared work and needs the person to approve it firs
|
|
|
31
31
|
- Move focus to the field when 'Edit' or 'Request Changes' opens it, and back to that button after 'Discard', or after 'Save' in an edit.
|
|
32
32
|
- Move focus to 'Stop' when the run's progress row appears.
|
|
33
33
|
- Move focus to the message box when the card's buttons or 'Stop' go away and nothing takes their place.
|
|
34
|
+
- Use the case 'Plan sign-off' when several people must approve one plan, or the plan is a document beside the task.
|
|
34
35
|
|
|
35
36
|
## Don't
|
|
36
37
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function AskPageAnswered(): import("react").JSX.Element;
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
14
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
15
|
+
if (ar || !(i in from)) {
|
|
16
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
17
|
+
ar[i] = from[i];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
21
|
+
};
|
|
22
|
+
import { useEffect, useRef, useState } from 'react';
|
|
23
|
+
import { BookOpen, Bot, ListChecks, MessageSquare, Plug } from 'lucide-react';
|
|
24
|
+
import Toaster, { toast, dismissToast } from '../../components/toaster';
|
|
25
|
+
import AppShell from '../../components/appShell';
|
|
26
|
+
import Navigation from '../../components/navigation';
|
|
27
|
+
import MenuItem from '../../components/menuItem';
|
|
28
|
+
import TitleBar from '../../components/titleBar';
|
|
29
|
+
import Button from '../../components/button';
|
|
30
|
+
import Popover from '../../components/popover';
|
|
31
|
+
import Menu from '../../components/menu';
|
|
32
|
+
import Line from '../../components/line';
|
|
33
|
+
import Message from '../../components/message';
|
|
34
|
+
import UserImage from '../../components/userImage';
|
|
35
|
+
import TimeStamp from '../../components/timeStamp';
|
|
36
|
+
import Tag from '../../components/tag';
|
|
37
|
+
import Paragraph from '../../components/paragraph';
|
|
38
|
+
import Markdown from '../../components/markdown';
|
|
39
|
+
import SourceCard from '../../components/sourceCard';
|
|
40
|
+
import Composer from '../../components/composer';
|
|
41
|
+
import StepList from '../../components/stepList';
|
|
42
|
+
import { Cluster, Grid, Stack } from '../../components/layout';
|
|
43
|
+
// A real app reads these from the session.
|
|
44
|
+
var me = 'Dana Lee';
|
|
45
|
+
var agentName = 'Acme Agent';
|
|
46
|
+
var workspaces = ['Acme Design', 'Acme Engineering', 'Acme Marketing'];
|
|
47
|
+
var all = "All ".concat(workspaces.length, " Workspaces");
|
|
48
|
+
var question = { from: me, at: new Date('2026-11-16T14:40:00Z'), text: 'Who owns the press kit for the launch?' };
|
|
49
|
+
var answeredAt = new Date('2026-11-16T14:41:00Z');
|
|
50
|
+
// The agent writes markdown. Markdown sets it in ODS parts, so no mark shows as raw text.
|
|
51
|
+
var answer = [
|
|
52
|
+
'**Mia Park** owns the press kit. Here is how it came to her:',
|
|
53
|
+
'',
|
|
54
|
+
'1. Ben Carter handed it to her in #launch on Nov 12, 2026.',
|
|
55
|
+
'2. The [launch plan](https://acme.example/docs/launch-plan) lists her as its owner.',
|
|
56
|
+
'3. It is due Nov 19, 2026.',
|
|
57
|
+
].join('\n');
|
|
58
|
+
var kinds = {
|
|
59
|
+
chat: { label: 'Chat', icon: MessageSquare },
|
|
60
|
+
docs: { label: 'Docs', icon: BookOpen },
|
|
61
|
+
tasks: { label: 'Tasks', icon: ListChecks },
|
|
62
|
+
};
|
|
63
|
+
// Each card links to the thing it read.
|
|
64
|
+
var sources = [
|
|
65
|
+
{ kind: 'chat', title: 'Press kit hand-off', where: 'Acme Marketing · #launch · Nov 12', href: '/chat/launch/m-2210' },
|
|
66
|
+
{ kind: 'docs', title: 'Launch plan', where: 'Acme Marketing', href: '/docs/launch-plan' },
|
|
67
|
+
{ kind: 'tasks', title: 'Write the press kit', where: 'Acme Design · Due Nov 19', href: '/tasks/press-kit' },
|
|
68
|
+
];
|
|
69
|
+
// 'From Chat · Docs · Tasks': each kind once, in the order it first appears.
|
|
70
|
+
var kindsTag = "From ".concat(sources.map(function (s) { return kinds[s.kind].label; }).filter(function (l, i, list) { return list.indexOf(l) === i; }).join(' · '));
|
|
71
|
+
// The places. A real app lets each link go to its page.
|
|
72
|
+
var sidebar = (<Navigation aria-label="Main">
|
|
73
|
+
{[
|
|
74
|
+
['Home', 'House', '/'],
|
|
75
|
+
['Ask', 'MessageCircle', '/ask'],
|
|
76
|
+
['Docs', 'BookOpen', '/docs'],
|
|
77
|
+
].map(function (_a) {
|
|
78
|
+
var label = _a[0], icon = _a[1], href = _a[2];
|
|
79
|
+
return (<MenuItem key={href} size="small" label={label} iconName={icon} href={href} isSelected={href === '/ask'} aria-current={href === '/ask' ? 'page' : undefined} onClick={function (event) { return event.preventDefault(); }}/>);
|
|
80
|
+
})}
|
|
81
|
+
</Navigation>);
|
|
82
|
+
export default function AskPageAnswered() {
|
|
83
|
+
var _a = useState(false), navOpen = _a[0], setNavOpen = _a[1];
|
|
84
|
+
// null means every workspace.
|
|
85
|
+
var _b = useState(null), scope = _b[0], setScope = _b[1];
|
|
86
|
+
var _c = useState(null), anchor = _c[0], setAnchor = _c[1];
|
|
87
|
+
var _d = useState(false), open = _d[0], setOpen = _d[1];
|
|
88
|
+
var _e = useState([]), turns = _e[0], setTurns = _e[1];
|
|
89
|
+
var _f = useState(''), text = _f[0], setText = _f[1];
|
|
90
|
+
var _g = useState(false), saving = _g[0], setSaving = _g[1];
|
|
91
|
+
var _h = useState(false), saved = _h[0], setSaved = _h[1];
|
|
92
|
+
var openButton = useRef(null);
|
|
93
|
+
var timer = useRef();
|
|
94
|
+
var run = useRef();
|
|
95
|
+
var tick = useRef();
|
|
96
|
+
var field = useRef(null);
|
|
97
|
+
var toastIds = useRef([]);
|
|
98
|
+
// Where focus goes after the next render, once the element it goes to is on screen.
|
|
99
|
+
var focusNext = useRef();
|
|
100
|
+
var label = scope !== null && scope !== void 0 ? scope : all;
|
|
101
|
+
// On unmount it stops the request and closes every toast it opened.
|
|
102
|
+
useEffect(function () { return function () {
|
|
103
|
+
clearTimeout(timer.current);
|
|
104
|
+
clearTimeout(run.current);
|
|
105
|
+
clearInterval(tick.current);
|
|
106
|
+
toastIds.current.forEach(function (id) { return dismissToast(id); });
|
|
107
|
+
toastIds.current = [];
|
|
108
|
+
}; }, []);
|
|
109
|
+
useEffect(function () {
|
|
110
|
+
var move = focusNext.current;
|
|
111
|
+
focusNext.current = undefined;
|
|
112
|
+
move === null || move === void 0 ? void 0 : move();
|
|
113
|
+
});
|
|
114
|
+
function choose(next) {
|
|
115
|
+
setScope(next);
|
|
116
|
+
setOpen(false);
|
|
117
|
+
}
|
|
118
|
+
// The answer goes to Docs, away from this page, so a toast says where it went.
|
|
119
|
+
// 'Save to Docs' gives way to a link to the new doc, and focus goes to it.
|
|
120
|
+
function saveToDocs() {
|
|
121
|
+
if (saving || saved)
|
|
122
|
+
return;
|
|
123
|
+
setSaving(true);
|
|
124
|
+
// Stands in for the request to the server.
|
|
125
|
+
timer.current = setTimeout(function () {
|
|
126
|
+
setSaving(false);
|
|
127
|
+
setSaved(true);
|
|
128
|
+
toastIds.current.push(toast({ type: 'success', message: 'Answer saved to Docs.' }));
|
|
129
|
+
focusNext.current = function () { var _a; return (_a = openButton.current) === null || _a === void 0 ? void 0 : _a.focus({ preventScroll: true }); };
|
|
130
|
+
}, 1200);
|
|
131
|
+
}
|
|
132
|
+
var running = turns.some(function (t) { return t.phase === 'running' || t.phase === 'stopping'; });
|
|
133
|
+
// Changes the last turn, the one the agent is working on.
|
|
134
|
+
function setLast(change) {
|
|
135
|
+
setTurns(function (list) { return list.map(function (t, i) { return (i === list.length - 1 ? __assign(__assign({}, t), change) : t); }); });
|
|
136
|
+
}
|
|
137
|
+
function endRun() {
|
|
138
|
+
clearTimeout(run.current);
|
|
139
|
+
clearInterval(tick.current);
|
|
140
|
+
}
|
|
141
|
+
// The question shows at once, and the agent's progress row takes the place of its answer while it works.
|
|
142
|
+
// This run finds nothing in the scope, so its answer says so in one plain sentence and shows no sources.
|
|
143
|
+
function send() {
|
|
144
|
+
if (running)
|
|
145
|
+
return;
|
|
146
|
+
setTurns(function (list) { return __spreadArray(__spreadArray([], list, true), [{ id: "t".concat(list.length + 1), text: text.trim(), scope: scope, phase: 'running', seconds: 0 }], false); });
|
|
147
|
+
setText('');
|
|
148
|
+
tick.current = setInterval(function () { return setTurns(function (list) { return list.map(function (t, i) { return (i === list.length - 1 ? __assign(__assign({}, t), { seconds: t.seconds + 1 }) : t); }); }); }, 1000);
|
|
149
|
+
// Stands in for the agent's run.
|
|
150
|
+
run.current = setTimeout(function () {
|
|
151
|
+
endRun();
|
|
152
|
+
setLast({ phase: 'nothing' });
|
|
153
|
+
}, 3000);
|
|
154
|
+
}
|
|
155
|
+
// Stop asks the server to end the run. The row says it stopped only once the run has ended,
|
|
156
|
+
// then focus goes back to the question box, since Stop is gone.
|
|
157
|
+
function stop() {
|
|
158
|
+
clearTimeout(run.current);
|
|
159
|
+
setLast({ phase: 'stopping' });
|
|
160
|
+
run.current = setTimeout(function () {
|
|
161
|
+
endRun();
|
|
162
|
+
setLast({ phase: 'stopped' });
|
|
163
|
+
focusNext.current = function () { var _a; return (_a = field.current) === null || _a === void 0 ? void 0 : _a.focus({ preventScroll: true }); };
|
|
164
|
+
}, 1200);
|
|
165
|
+
}
|
|
166
|
+
return (<AppShell title="Ask" navOpen={navOpen} onNavOpenChange={setNavOpen} sidebar={sidebar}>
|
|
167
|
+
<Stack gap="large">
|
|
168
|
+
<TitleBar title="Ask" actions={
|
|
169
|
+
// The label is the scope. The chevron says it opens a menu.
|
|
170
|
+
<Button size="small" type="tertiary" state={open ? 'selected' : 'enabled'} label={label} actionIcon="ChevronDown" aria-label={"".concat(label, ", change where ").concat(agentName, " looks")} aria-haspopup="menu" aria-expanded={open} onClickButton={function (e) {
|
|
171
|
+
setAnchor(e.currentTarget);
|
|
172
|
+
setOpen(function (o) { return !o; });
|
|
173
|
+
}}/>}/>
|
|
174
|
+
{/* A real app keeps the conversation when the person leaves, and gives the list that holds the rows role="log". */}
|
|
175
|
+
<Stack gap="small">
|
|
176
|
+
<Message aria-label={question.from} avatar={<UserImage userHandle={question.from} decorative/>} name={question.from} meta={<TimeStamp createdAt={question.at} dateFormat="absolute" data="time"/>}>
|
|
177
|
+
<Paragraph measure="none">{question.text}</Paragraph>
|
|
178
|
+
</Message>
|
|
179
|
+
<Message aria-label={"".concat(agentName, ", agent")} avatar={<UserImage userHandle={agentName} icon={Bot} decorative/>} name={agentName} meta={<>
|
|
180
|
+
<Tag variant="contained" size="small" label="Agent"/>
|
|
181
|
+
<TimeStamp createdAt={answeredAt} dateFormat="absolute" data="time"/>
|
|
182
|
+
<Paragraph size="caption" tone="secondary" measure="none">Model name</Paragraph>
|
|
183
|
+
</>}
|
|
184
|
+
// The sources sit directly under the answer they support.
|
|
185
|
+
footer={<Stack gap="medium">
|
|
186
|
+
<Cluster>
|
|
187
|
+
<Tag variant="contained" size="small" color="success" icon={Plug} label={kindsTag}/>
|
|
188
|
+
</Cluster>
|
|
189
|
+
<Grid columns={2} gap="medium">
|
|
190
|
+
{sources.map(function (s) { return (<SourceCard key={s.href} icon={kinds[s.kind].icon} title={s.title} meta={"".concat(kinds[s.kind].label, " \u00B7 ").concat(s.where)} href={s.href}/>); })}
|
|
191
|
+
</Grid>
|
|
192
|
+
<Cluster>
|
|
193
|
+
{saved ? (<Button ref={openButton} size="small" type="tertiary" state="enabled" label="Open in Docs" decoIcon="FileText" href="/docs/press-kit-owner"/>) : (<Button size="small" type="secondary" state="enabled" label="Save to Docs" decoIcon="BookmarkPlus" loading={saving} onClickButton={saveToDocs}/>)}
|
|
194
|
+
</Cluster>
|
|
195
|
+
</Stack>}>
|
|
196
|
+
<Markdown id="ask-page-answered-answer" text={answer} headingLevel={3}/>
|
|
197
|
+
</Message>
|
|
198
|
+
{turns.map(function (t) {
|
|
199
|
+
var _a;
|
|
200
|
+
var place = (_a = t.scope) !== null && _a !== void 0 ? _a : "all ".concat(workspaces.length, " of your workspaces");
|
|
201
|
+
var working = t.phase === 'running' || t.phase === 'stopping';
|
|
202
|
+
return (<Stack key={t.id} gap="small">
|
|
203
|
+
<Message aria-label={me} avatar={<UserImage userHandle={me} decorative/>} name={me} meta={<TimeStamp createdAt={new Date('2026-11-16T14:45:00Z')} dateFormat="absolute" data="time"/>}>
|
|
204
|
+
<Paragraph measure="none">{t.text}</Paragraph>
|
|
205
|
+
</Message>
|
|
206
|
+
<Message aria-label={"".concat(agentName, ", agent")} avatar={<UserImage userHandle={agentName} icon={Bot} decorative/>} name={agentName} meta={<>
|
|
207
|
+
<Tag variant="contained" size="small" label="Agent"/>
|
|
208
|
+
<TimeStamp createdAt={new Date('2026-11-16T14:45:00Z')} dateFormat="absolute" data="time"/>
|
|
209
|
+
<Paragraph size="caption" tone="secondary" measure="none">Model name</Paragraph>
|
|
210
|
+
</>}
|
|
211
|
+
// The only Stop, on the row for the whole run. It shows loading while the run is stopping.
|
|
212
|
+
footer={working ? (<Cluster>
|
|
213
|
+
<Button size="small" type="secondary" state="enabled" label="Stop" loading={t.phase === 'stopping'} onClickButton={stop}/>
|
|
214
|
+
</Cluster>) : undefined}>
|
|
215
|
+
{working ? (
|
|
216
|
+
// A real app wraps this part in a polite live region, since StepList has none.
|
|
217
|
+
<Stack gap="medium">
|
|
218
|
+
<Paragraph size="caption" tone="secondary" measure="none">{"Working for ".concat(t.seconds, " ").concat(t.seconds === 1 ? 'second' : 'seconds')}</Paragraph>
|
|
219
|
+
<StepList aria-label={"".concat(agentName, "'s steps")} steps={[
|
|
220
|
+
{ label: 'Read your question', status: 'done' },
|
|
221
|
+
{ label: "Looking in the docs, chats and tasks of ".concat(place), status: 'running' },
|
|
222
|
+
]}/>
|
|
223
|
+
</Stack>) : t.phase === 'stopped' ? (<Paragraph measure="none">Stopped. Nothing was changed.</Paragraph>) : (
|
|
224
|
+
// It read nothing it could use, so the answer has no sources section.
|
|
225
|
+
<Paragraph measure="none">{"I found nothing about this in the docs, chats and tasks of ".concat(place, ". Try other words, or change where I look.")}</Paragraph>)}
|
|
226
|
+
</Message>
|
|
227
|
+
</Stack>);
|
|
228
|
+
})}
|
|
229
|
+
</Stack>
|
|
230
|
+
<Stack gap="small">
|
|
231
|
+
{/* Where the agent looks, said above the box it is asked in. */}
|
|
232
|
+
<Paragraph size="body2" tone="secondary" measure="none">
|
|
233
|
+
{scope ? "".concat(agentName, " looks in the docs, chats and tasks of ").concat(scope, ".") : "".concat(agentName, " looks in the docs, chats and tasks of all ").concat(workspaces.length, " of your workspaces.")}
|
|
234
|
+
</Paragraph>
|
|
235
|
+
<Composer ref={field} id="ask-page-answered-question" aria-label={"Ask ".concat(agentName)} placeholder={"Ask ".concat(agentName)} value={text} onChange={setText} onSubmit={send}/>
|
|
236
|
+
</Stack>
|
|
237
|
+
</Stack>
|
|
238
|
+
<Popover open={open} anchorEl={anchor} onClose={function () { return setOpen(false); }} returnFocus>
|
|
239
|
+
<Menu navigable aria-label={"Where ".concat(agentName, " looks")} width={220}>
|
|
240
|
+
<MenuItem size="small" label={all} isSelected={scope === null} role="menuitemradio" onClick={function () { return choose(null); }}/>
|
|
241
|
+
<Line />
|
|
242
|
+
{workspaces.map(function (w) { return (<MenuItem key={w} size="small" label={w} isSelected={scope === w} role="menuitemradio" onClick={function () { return choose(w); }}/>); })}
|
|
243
|
+
</Menu>
|
|
244
|
+
</Popover>
|
|
245
|
+
{/* A real app mounts one Toaster near its root. */}
|
|
246
|
+
<Toaster />
|
|
247
|
+
</AppShell>);
|
|
248
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function AskPageFirstVisit(): import("react").JSX.Element;
|