Skip to content

Commit

Permalink
fix: change filter form to say "Show runs" in flat runs view [ET-740] (
Browse files Browse the repository at this point in the history
…#9840)

(cherry picked from commit e3dfb0a)
  • Loading branch information
jesse-amano-hpe authored and determined-ci committed Aug 20, 2024
1 parent 119d544 commit 46a400e
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 2 deletions.
3 changes: 3 additions & 0 deletions webui/react/src/components/FilterForm/TableFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ interface Props {
isMobile?: boolean;
isOpenFilter: boolean;
projectId?: number;
entityCopy?: string;
onIsOpenFilterChange?: (value: boolean) => void;
}

Expand All @@ -27,6 +28,7 @@ const TableFilter = ({
isMobile = false,
isOpenFilter,
projectId,
entityCopy,
onIsOpenFilterChange,
}: Props): JSX.Element => {
const columns: V1ProjectColumn[] = Loadable.getOrElse([], loadableColumns).filter(
Expand Down Expand Up @@ -70,6 +72,7 @@ const TableFilter = ({
onMouseMove={(e) => e.stopPropagation()}>
<FilterForm
columns={columns}
entityCopy={entityCopy}
formStore={formStore}
projectId={projectId}
onHidePopOver={onHidePopOver}
Expand Down
11 changes: 9 additions & 2 deletions webui/react/src/components/FilterForm/components/FilterForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,17 @@ interface Props {
formStore: FilterFormStore;
columns: V1ProjectColumn[];
projectId?: number;
entityCopy?: string;
onHidePopOver: () => void;
}

const FilterForm = ({ formStore, columns, projectId, onHidePopOver }: Props): JSX.Element => {
const FilterForm = ({
formStore,
columns,
projectId,
entityCopy,
onHidePopOver,
}: Props): JSX.Element => {
const scrollBottomRef = useRef<HTMLDivElement>(null);
const loadableData = useObservable(formStore.formset);
const isButtonDisabled = Loadable.match(loadableData, {
Expand All @@ -43,7 +50,7 @@ const FilterForm = ({ formStore, columns, projectId, onHidePopOver }: Props): JS
Loaded: (data) => (
<>
<div className={css.header} data-test="header">
<div>Show experiments…</div>
<div>{entityCopy ?? 'Show experiments…'}</div>
<Toggle
checked={data.showArchived}
label="Show Archived"
Expand Down
1 change: 1 addition & 0 deletions webui/react/src/components/Searches/Searches.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,7 @@ const Searches: React.FC<Props> = ({ project }) => {
bannedFilterColumns={BANNED_FILTER_COLUMNS}
bannedSortColumns={BANNED_SORT_COLUMNS}
columnGroups={[V1LocationType.EXPERIMENT]}
entityCopy="Show searches…"
formStore={formStore}
initialVisibleColumns={columnsIfLoaded}
isOpenFilter={isOpenFilter}
Expand Down
3 changes: 3 additions & 0 deletions webui/react/src/components/TableActionBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ interface Props {
columnGroups: (V1LocationType | V1LocationType[])[];
bannedFilterColumns?: Set<string>;
bannedSortColumns?: Set<string>;
entityCopy?: string;
}

const TableActionBar: React.FC<Props> = ({
Expand Down Expand Up @@ -141,6 +142,7 @@ const TableActionBar: React.FC<Props> = ({
columnGroups,
bannedFilterColumns,
bannedSortColumns,
entityCopy,
}) => {
const permissions = usePermissions();
const [batchAction, setBatchAction] = useState<BatchAction>();
Expand Down Expand Up @@ -382,6 +384,7 @@ const TableActionBar: React.FC<Props> = ({
<Row>
<TableFilter
bannedFilterColumns={bannedFilterColumns}
entityCopy={entityCopy}
formStore={formStore}
isMobile={isMobile}
isOpenFilter={isOpenFilter}
Expand Down
1 change: 1 addition & 0 deletions webui/react/src/pages/F_ExpList/F_ExperimentList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1078,6 +1078,7 @@ const F_ExperimentList: React.FC<Props> = ({ project }) => {
V1LocationType.HYPERPARAMETERS,
]}
compareViewOn={settings.compare}
entityCopy="Show experiments…"
formStore={formStore}
heatmapBtnVisible={heatmapBtnVisible}
heatmapOn={settings.heatmapOn}
Expand Down
1 change: 1 addition & 0 deletions webui/react/src/pages/FlatRuns/FlatRuns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,7 @@ const FlatRuns: React.FC<Props> = ({ projectId, workspaceId, searchId }) => {
<Row>
<TableFilter
bannedFilterColumns={bannedFilterColumns}
entityCopy="Show runs…"
formStore={formStore}
isMobile={isMobile}
isOpenFilter={isOpenFilter}
Expand Down

0 comments on commit 46a400e

Please sign in to comment.