Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applies bug fixes to UI screens #523

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions clients/ui/frontend/src/app/components/DashboardSearchField.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import * as React from 'react';
import { InputGroup, SearchInput, InputGroupItem } from '@patternfly/react-core';
import { InputGroup, InputGroupItem, TextInput } from '@patternfly/react-core';
import SimpleSelect from '~/app/components/SimpleSelect';
import { asEnumMember } from '~/app/utils';
import FormFieldset from '~/app/pages/modelRegistry/screens/components/FormFieldset';

// List all the possible search fields here
export enum SearchType {
Expand Down Expand Up @@ -59,14 +60,20 @@ const DashboardSearchField: React.FC<DashboardSearchFieldProps> = ({
/>
</InputGroupItem>
<InputGroupItem>
<SearchInput
placeholder={`Find by ${searchType.toLowerCase()}`}
value={searchValue}
onChange={(_, newSearch) => {
onSearchValueChange(newSearch);
}}
onClear={() => onSearchValueChange('')}
style={{ minWidth: '200px' }}
<FormFieldset
className="toolbar-fieldset-wrapper"
component={
<TextInput
value={searchValue}
type="text"
onChange={(_, newSearch) => {
onSearchValueChange(newSearch);
}}
style={{ minWidth: '200px' }}
aria-label="Search"
/>
}
field={`Find by ${searchType.toLowerCase()}`}
/>
</InputGroupItem>
</InputGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import {
SearchInput,
TextInput,
ToolbarContent,
ToolbarFilter,
ToolbarGroup,
Expand All @@ -14,6 +14,7 @@ import SimpleSelect from '~/app/components/SimpleSelect';
import { asEnumMember } from '~/app/utils';
import { filterModelVersions } from '~/app/pages/modelRegistry/screens/utils';
import EmptyModelRegistryState from '~/app/pages/modelRegistry/screens/components/EmptyModelRegistryState';
import FormFieldset from '~/app/pages/modelRegistry/screens/components/FormFieldset';
import ModelVersionsArchiveTable from './ModelVersionsArchiveTable';

type ModelVersionsArchiveListViewProps = {
Expand Down Expand Up @@ -73,15 +74,21 @@ const ModelVersionsArchiveListView: React.FC<ModelVersionsArchiveListViewProps>
/>
</ToolbarFilter>
<ToolbarItem>
<SearchInput
placeholder={`Find by ${searchType.toLowerCase()}`}
value={search}
onChange={(_, searchValue) => {
setSearch(searchValue);
}}
onClear={() => setSearch('')}
style={{ minWidth: '200px' }}
data-testid="model-versions-archive-table-search"
<FormFieldset
className="toolbar-fieldset-wrapper"
component={
<TextInput
value={search}
type="text"
onChange={(_, searchValue) => {
setSearch(searchValue);
}}
style={{ minWidth: '200px' }}
data-testid="model-versions-archive-table-search"
aria-label="Search"
/>
}
field={`Find by ${searchType.toLowerCase()}`}
/>
</ToolbarItem>
</ToolbarGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const ModelVersionsArchiveTable: React.FC<ModelVersionsArchiveTableProps> = ({
data={modelVersions}
columns={mvColumns}
toolbarContent={toolbarContent}
enablePagination
enablePagination="compact"
emptyTableView={<DashboardEmptyTableView onClearFilters={clearFilters} />}
defaultSortColumn={1}
rowRenderer={(mv: ModelVersion) => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import {
SearchInput,
TextInput,
ToolbarContent,
ToolbarFilter,
ToolbarGroup,
Expand All @@ -14,6 +14,7 @@ import { filterRegisteredModels } from '~/app/pages/modelRegistry/screens/utils'
import EmptyModelRegistryState from '~/app/pages/modelRegistry/screens/components/EmptyModelRegistryState';
import SimpleSelect from '~/app/components/SimpleSelect';
import { asEnumMember } from '~/app/utils';
import FormFieldset from '~/app/pages/modelRegistry/screens/components/FormFieldset';
import RegisteredModelsArchiveTable from './RegisteredModelsArchiveTable';

type RegisteredModelsArchiveListViewProps = {
Expand Down Expand Up @@ -78,15 +79,21 @@ const RegisteredModelsArchiveListView: React.FC<RegisteredModelsArchiveListViewP
/>
</ToolbarFilter>
<ToolbarItem>
<SearchInput
placeholder={`Find by ${searchType.toLowerCase()}`}
value={search}
onChange={(_, searchValue) => {
setSearch(searchValue);
}}
onClear={() => setSearch('')}
style={{ minWidth: '200px' }}
data-testid="registered-models-archive-table-search"
<FormFieldset
className="toolbar-fieldset-wrapper"
component={
<TextInput
value={search}
type="text"
onChange={(_, searchValue) => {
setSearch(searchValue);
}}
style={{ minWidth: '200px' }}
data-testid="registered-models-archive-table-search"
aria-label="Search"
/>
}
field={`Find by ${searchType.toLowerCase()}`}
/>
</ToolbarItem>
</ToolbarGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const RegisteredModelsArchiveTable: React.FC<RegisteredModelsArchiveTableProps>
columns={rmColumns}
toolbarContent={toolbarContent}
defaultSortColumn={2}
enablePagination
enablePagination="compact"
emptyTableView={<DashboardEmptyTableView onClearFilters={clearFilters} />}
rowRenderer={(rm) => (
<RegisteredModelTableRow key={rm.name} registeredModel={rm} isArchiveRow refresh={refresh} />
Expand Down
17 changes: 9 additions & 8 deletions clients/ui/frontend/src/style/MUI-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
--pf-v6-c-button--PaddingInlineStart: var(--mui-button--PaddingInlineStart);
--pf-v6-c-button--PaddingInlineEnd: var(--mui-button--PaddingInlineEnd);
--pf-v6-c-button--LineHeight: var(--mui-button--LineHeight);
--pf-v6-c-button--m-plain--BorderRadius: 50%;

text-transform: var(--mui-text-transform);
letter-spacing: 0.02857em;
Expand Down Expand Up @@ -667,8 +668,10 @@
.pf-v6-c-label {
--pf-v6-c-label--BorderRadius: 16px;
--pf-v6-c-label--FontSize: 0.8125rem;
--pf-v6-c-label--PaddingInlineStart: 0;
--pf-v6-c-label--PaddingInlineEnd: 0;
--pf-v6-c-label--PaddingInlineEnd: var(--mui-spacing-8px);
--pf-v6-c-label--PaddingInlineStart: var(--mui-spacing-8px);
--pf-v6-c-label--PaddingBlockStart: 0;
--pf-v6-c-label--PaddingBlockEnd: 0;
height: 24px;
}

Expand All @@ -677,7 +680,6 @@

.pf-v6-c-label__text {
color: var(--mui-palette-common-black);
padding: none;
}
}

Expand All @@ -686,10 +688,8 @@
--pf-v6-c-button__icon--Color: var(--mui-palette-common-white);
}

.pf-v6-c-label__text {
padding-right: var(--mui-spacing-4px);
padding-left: var(--mui-spacing-4px);
color: var(--pf-t--global--text--color--inverse);
.pf-v6-c-label {
--pf-v6-c-label--m-blue--Color: var(--pf-t--global--text--color--inverse);
}

.pf-v6-c-label-group.pf-m-category {
Expand All @@ -705,7 +705,8 @@
}

.pf-v6-c-modal-box {
--pf-v6-c-modal-box--BorderRadius: var(--mui-shape-borderRadius);
--pf-v6-c-modal-box--BorderRadius: 0;
border: 2px solid var(--mui-palette-common-black);
}

.pf-v6-c-page__main-container {
Expand Down