Skip to content

Commit cb846cc

Browse files
style(Test data): Remove redundant UI hints
1 parent cb5a775 commit cb846cc

5 files changed

Lines changed: 73 additions & 74 deletions

File tree

src/components/StaticAssetsFilter.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Switch, Text, Tooltip } from '@radix-ui/themes'
1+
import { Switch, Text } from '@radix-ui/themes'
22

33
import { Label } from '@/components/Label'
44

@@ -17,9 +17,7 @@ export function StaticAssetsFilter({
1717

1818
return (
1919
<Label>
20-
<Tooltip content="Static assets are excluded from your test by default.">
21-
<Text size="2">Show static assets ({staticAssetCount})</Text>
22-
</Tooltip>
20+
<Text size="2">Show static assets ({staticAssetCount})</Text>
2321
<Switch
2422
onCheckedChange={setIncludeStaticAssets}
2523
checked={includeStaticAssets}

src/views/Generator/Allowlist/AllowlistDialog.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
ScrollArea,
1212
TextField,
1313
Text,
14-
Tooltip,
1514
Card,
1615
Inset,
1716
} from '@radix-ui/themes'
@@ -144,9 +143,7 @@ export function AllowlistDialog({
144143
checked={includeStaticAssets}
145144
disabled={staticAssetCount === 0}
146145
/>
147-
<Tooltip content="Static assets are excluded from your test by default.">
148-
<Text size="2">Include static assets ({staticAssetCount})</Text>
149-
</Tooltip>
146+
<Text size="2">Include static assets ({staticAssetCount})</Text>
150147
</Label>
151148
</Flex>
152149
</>

src/views/Generator/RecordingSelector.tsx

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -62,28 +62,23 @@ export function RecordingSelector({ compact = false }: { compact?: boolean }) {
6262
</Text>
6363
)}
6464
<Select.Root value={recordingPath} onValueChange={handleOpen}>
65-
<Tooltip content="Switch between different recordings.">
66-
<Select.Trigger
67-
id="recording-selector"
68-
placeholder="Select recording"
69-
css={css`
70-
width: ${compact ? 'auto' : '300px'};
71-
@media (max-width: 1060px) {
72-
width: 125px;
73-
}
74-
`}
75-
>
76-
<Flex as="span" align="center" gap="1">
77-
{isRecordingMissing && (
78-
<ExclamationTriangleIcon
79-
color="orange"
80-
css={{ minWidth: 16 }}
81-
/>
82-
)}
83-
{getFileNameWithoutExtension(recordingPath)}
84-
</Flex>
85-
</Select.Trigger>
86-
</Tooltip>
65+
<Select.Trigger
66+
id="recording-selector"
67+
placeholder="Select recording"
68+
css={css`
69+
width: ${compact ? 'auto' : '300px'};
70+
@media (max-width: 1060px) {
71+
width: 125px;
72+
}
73+
`}
74+
>
75+
<Flex as="span" align="center" gap="1">
76+
{isRecordingMissing && (
77+
<ExclamationTriangleIcon color="orange" css={{ minWidth: 16 }} />
78+
)}
79+
{getFileNameWithoutExtension(recordingPath)}
80+
</Flex>
81+
</Select.Trigger>
8782
<Select.Content position="popper">
8883
{isRecordingMissing && (
8984
<Select.Item value={recordingPath} disabled>

src/views/Generator/TestData/DataFiles.tsx

Lines changed: 32 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import {
1616
DropdownMenu,
1717
Flex,
1818
IconButton,
19-
Text,
2019
Tooltip,
2120
} from '@radix-ui/themes'
2221

@@ -29,43 +28,38 @@ export function DataFiles() {
2928
}
3029

3130
return (
32-
<>
33-
<Text size="2" as="p" mb="2">
34-
Configure data files and use them in you test rules.
35-
</Text>
36-
<Table.Root size="1" variant="surface">
37-
<Table.Header>
38-
<Table.Row>
39-
<Table.ColumnHeaderCell>Data file</Table.ColumnHeaderCell>
40-
<Table.ColumnHeaderCell>
41-
<Flex align="center" gap="1">
42-
Access method
43-
<Tooltip content="Defines how the items are accessed during the test">
44-
<InfoCircledIcon />
45-
</Tooltip>
46-
</Flex>
47-
</Table.ColumnHeaderCell>
48-
<Table.ColumnHeaderCell width="0"></Table.ColumnHeaderCell>
49-
</Table.Row>
50-
</Table.Header>
51-
52-
<Table.Body>
53-
{selectedFiles.map((file) => (
54-
<DataFileRow
55-
key={file.name}
56-
file={file}
57-
onRemove={() => handleRemove(file.name)}
58-
/>
59-
))}
60-
61-
<Table.Row>
62-
<Table.RowHeaderCell colSpan={3} justify="center">
63-
<AddDataFileDropdown />
64-
</Table.RowHeaderCell>
65-
</Table.Row>
66-
</Table.Body>
67-
</Table.Root>
68-
</>
31+
<Table.Root size="1" variant="surface">
32+
<Table.Header>
33+
<Table.Row>
34+
<Table.ColumnHeaderCell>Data file</Table.ColumnHeaderCell>
35+
<Table.ColumnHeaderCell>
36+
<Flex align="center" gap="1">
37+
Access method
38+
<Tooltip content="Defines how the items are accessed during the test">
39+
<InfoCircledIcon />
40+
</Tooltip>
41+
</Flex>
42+
</Table.ColumnHeaderCell>
43+
<Table.ColumnHeaderCell width="0"></Table.ColumnHeaderCell>
44+
</Table.Row>
45+
</Table.Header>
46+
47+
<Table.Body>
48+
{selectedFiles.map((file) => (
49+
<DataFileRow
50+
key={file.name}
51+
file={file}
52+
onRemove={() => handleRemove(file.name)}
53+
/>
54+
))}
55+
56+
<Table.Row>
57+
<Table.RowHeaderCell colSpan={3} justify="center">
58+
<AddDataFileDropdown />
59+
</Table.RowHeaderCell>
60+
</Table.Row>
61+
</Table.Body>
62+
</Table.Root>
6963
)
7064
}
7165

src/views/Generator/TestData/VariablesEditor.tsx

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useCallback, useEffect } from 'react'
2-
import { TrashIcon } from '@radix-ui/react-icons'
3-
import { Button, IconButton, TextField, Text, Tooltip } from '@radix-ui/themes'
2+
import { InfoCircledIcon, TrashIcon } from '@radix-ui/react-icons'
3+
import { Button, IconButton, TextField, Tooltip, Flex } from '@radix-ui/themes'
44
import { useGeneratorStore } from '@/store/generator'
55
import {
66
useForm,
@@ -58,13 +58,28 @@ export function VariablesEditor() {
5858

5959
return (
6060
<form onSubmit={handleSubmit(onSubmit)}>
61-
<Text size="2" as="p" mb="2">
62-
Define variables and use them in your test rules.
63-
</Text>
6461
<Table.Root size="1" variant="surface">
6562
<Table.Header>
6663
<Table.Row>
67-
<Table.ColumnHeaderCell width="30%">Name</Table.ColumnHeaderCell>
64+
<Table.ColumnHeaderCell width="30%">
65+
<Flex align="center" gap="1">
66+
Name
67+
<Tooltip
68+
content={
69+
<>
70+
Variables are key-value pairs in the <code>VARS</code>{' '}
71+
object. <br /> Use variables in custom code snippets by
72+
referencing them by their names:{' '}
73+
<code>
74+
VARS[{'"'}variable_0{'"'}]
75+
</code>
76+
</>
77+
}
78+
>
79+
<InfoCircledIcon />
80+
</Tooltip>
81+
</Flex>
82+
</Table.ColumnHeaderCell>
6883
<Table.ColumnHeaderCell>Value (string)</Table.ColumnHeaderCell>
6984
<Table.ColumnHeaderCell width="0"></Table.ColumnHeaderCell>
7085
</Table.Row>

0 commit comments

Comments
 (0)