Skip to content

Commit 9762fa8

Browse files
author
Daniel Duong
committed
fix(automl/configure, autorag/configure): more alignments with design
1 parent 178c010 commit 9762fa8

2 files changed

Lines changed: 7 additions & 38 deletions

File tree

packages/automl/frontend/src/app/components/configure/AutomlConfigure.tsx

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import {
1919
GridItem,
2020
HelperText,
2121
HelperTextItem,
22-
Label,
2322
NumberInput,
2423
Split,
2524
SplitItem,
@@ -220,17 +219,18 @@ function AutomlConfigure(): React.JSX.Element {
220219
<CardHeader>
221220
<Content component="h3">Documents</Content>
222221
<Content component="p">
223-
Select or add an S3 connection to upload files or browse existing files.
222+
Select or upload documents to train and build machine learning models for tabular
223+
or timeseries data.
224224
</Content>
225225
</CardHeader>
226226
<CardBody>
227-
<Stack>
227+
<Stack hasGutter>
228228
<StackItem>
229229
<ConfigureFormGroup
230230
label="S3 connection"
231231
description="Select the S3 connection that contains your desired documents, or add a new connection."
232232
>
233-
<Split className="pf-v6-u-align-items-flex-end" hasGutter isWrappable>
233+
<Split hasGutter isWrappable>
234234
<SplitItem style={{ width: '10rem' }} isFilled>
235235
{Boolean(namespace) && (
236236
<Controller
@@ -294,21 +294,6 @@ function AutomlConfigure(): React.JSX.Element {
294294
)}
295295
{Boolean(selectedSecret?.uuid) && (
296296
<>
297-
<StackItem className="pf-v6-u-font-size-md pf-v6-u-mb-sm pf-v6-u-mt-md">
298-
Selected connection
299-
</StackItem>
300-
<StackItem>
301-
<Label
302-
onClose={() => {
303-
setSelectedSecret(undefined);
304-
setValue('train_data_secret_name', '', { shouldValidate: true });
305-
}}
306-
closeBtnAriaLabel="Clear selected connection"
307-
>
308-
{selectedSecret?.displayName ?? selectedSecret?.name}
309-
</Label>
310-
</StackItem>
311-
312297
<StackItem className="pf-v6-u-font-size-md pf-v6-u-mb-sm pf-v6-u-mt-md">
313298
Selected files
314299
</StackItem>

packages/autorag/frontend/src/app/components/configure/AutoragConfigure.tsx

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import {
1515
Flex,
1616
Grid,
1717
GridItem,
18-
Label,
1918
List,
2019
ListItem,
2120
Popover,
@@ -31,6 +30,7 @@ import React, { useEffect, useRef, useState } from 'react';
3130
import { Controller, useFormContext, useWatch, Watch } from 'react-hook-form';
3231
import { Navigate, useParams } from 'react-router';
3332
import AutoragConnectionModal from '~/app/components/common/AutoragConnectionModal';
33+
import ConfigureFormGroup from '~/app/components/common/ConfigureFormGroup';
3434
import FileExplorer from '~/app/components/common/FileExplorer/FileExplorer.tsx';
3535
import SecretSelector, { SecretSelection } from '~/app/components/common/SecretSelector';
3636
import { useLlamaStackModelsQuery } from '~/app/hooks/queries';
@@ -40,7 +40,6 @@ import { autoragExperimentsPathname } from '~/app/utilities/routes';
4040
import { getMissingRequiredKeys } from '~/app/utilities/secretValidation';
4141
import AutoragExperimentSettings from './AutoragExperimentSettings';
4242
import AutoragVectorStoreSelector from './AutoragVectorStoreSelector';
43-
import ConfigureFormGroup from '../common/ConfigureFormGroup';
4443

4544
const AUTORAG_REQUIRED_KEYS: { [type: string]: string[] } = { s3: ['aws_s3_bucket'] };
4645

@@ -173,13 +172,13 @@ function AutoragConfigure(): React.JSX.Element {
173172
</Content>
174173
</CardHeader>
175174
<CardBody>
176-
<Stack>
175+
<Stack hasGutter>
177176
<StackItem>
178177
<ConfigureFormGroup
179178
label="S3 connection"
180179
description="Select the S3 connection that contains your desired documents, or add a new connection."
181180
>
182-
<Split className="pf-v6-u-align-items-flex-end" hasGutter isWrappable>
181+
<Split hasGutter isWrappable>
183182
<SplitItem style={{ width: '10rem' }} isFilled>
184183
{Boolean(namespace) && (
185184
<Controller
@@ -234,21 +233,6 @@ function AutoragConfigure(): React.JSX.Element {
234233
</StackItem>
235234
{Boolean(selectedSecret?.uuid) && (
236235
<>
237-
<StackItem className="pf-v6-u-font-size-md pf-v6-u-mb-sm pf-v6-u-mt-md">
238-
Selected connection
239-
</StackItem>
240-
<StackItem>
241-
<Label
242-
onClose={() => {
243-
setSelectedSecret(undefined);
244-
setValue('input_data_secret_name', '', { shouldValidate: true });
245-
}}
246-
closeBtnAriaLabel="Clear selected connection"
247-
>
248-
{selectedSecret?.displayName ?? selectedSecret?.name}
249-
</Label>
250-
</StackItem>
251-
252236
<StackItem className="pf-v6-u-font-size-md pf-v6-u-mb-sm pf-v6-u-mt-md">
253237
Selected files
254238
</StackItem>

0 commit comments

Comments
 (0)