From d659511b827569e269f26360cf327578a2fc55c9 Mon Sep 17 00:00:00 2001 From: Anton Gilgur Date: Mon, 4 Sep 2023 02:33:50 -0400 Subject: [PATCH] fix(ui): merge WF List FTU Panel with New Version Modal - Workflows being hidden behind a first-time user panel was confusing - reported in an issue with a few upvotes - personally, I did not even realize that panel specified a new default, it just seemed like another unnecessary FTU click when my cookies get cleared -- similar to the survey etc - Move the description of the new default instead to the New Version Modal - and specify in **bold** that there is a new default Signed-off-by: Anton Gilgur --- .../modals/new-version/new-version-modal.tsx | 3 + .../workflows-list/workflows-list.tsx | 96 ++++++++----------- 2 files changed, 42 insertions(+), 57 deletions(-) diff --git a/ui/src/app/modals/new-version/new-version-modal.tsx b/ui/src/app/modals/new-version/new-version-modal.tsx index b28b61b2554a..b0ab444bc56e 100644 --- a/ui/src/app/modals/new-version/new-version-modal.tsx +++ b/ui/src/app/modals/new-version/new-version-modal.tsx @@ -47,6 +47,9 @@ export const NewVersionModal = ({version, dismiss}: {version: string; dismiss: ( in the middle of the workflow +
  • + Filter by date and time in the UI. New default: only show the past month's Workflows. +
  • diff --git a/ui/src/app/workflows/components/workflows-list/workflows-list.tsx b/ui/src/app/workflows/components/workflows-list/workflows-list.tsx index 83a4dae3125c..5acc32f8b8ab 100644 --- a/ui/src/app/workflows/components/workflows-list/workflows-list.tsx +++ b/ui/src/app/workflows/components/workflows-list/workflows-list.tsx @@ -10,7 +10,6 @@ import {BasePage} from '../../../shared/components/base-page'; import {CostOptimisationNudge} from '../../../shared/components/cost-optimisation-nudge'; import {ErrorNotice} from '../../../shared/components/error-notice'; import {ExampleManifests} from '../../../shared/components/example-manifests'; -import {FirstTimeUserPanel} from '../../../shared/components/first-time-user-panel'; import {Loading} from '../../../shared/components/loading'; import {PaginationPanel} from '../../../shared/components/pagination-panel'; import {ZeroState} from '../../../shared/components/zero-state'; @@ -179,62 +178,45 @@ export class WorkflowsList extends BasePage, State> { ] } }}> - - <> - this.setState({selectedWorkflows: new Map()})} - loadWorkflows={() => { - this.setState({selectedWorkflows: new Map()}); - this.changeFilters( - this.state.namespace, - this.state.selectedPhases, - this.state.selectedLabels, - this.state.minStartedAt, - this.state.maxStartedAt, - { - limit: this.state.pagination.limit - } - ); - }} - isDisabled={this.state.batchActionDisabled} - /> -

    -
    - -
    - - this.changeFilters(namespace, selectedPhases, selectedLabels, minStartedAt, maxStartedAt, {limit: this.state.pagination.limit}) - } - /> -
    -
    -
    {this.renderWorkflows()}
    + this.setState({selectedWorkflows: new Map()})} + loadWorkflows={() => { + this.setState({selectedWorkflows: new Map()}); + this.changeFilters(this.state.namespace, this.state.selectedPhases, this.state.selectedLabels, this.state.minStartedAt, this.state.maxStartedAt, { + limit: this.state.pagination.limit + }); + }} + isDisabled={this.state.batchActionDisabled} + /> +
    +
    + +
    + + this.changeFilters(namespace, selectedPhases, selectedLabels, minStartedAt, maxStartedAt, {limit: this.state.pagination.limit}) + } + />
    - ctx.navigation.goto('.', {sidePanel: null})}> - {this.sidePanel === 'submit-new-workflow' && ( - ctx.navigation.goto(uiUrl(`workflows/${wf.metadata.namespace}/${wf.metadata.name}`))} - /> - )} - - - +
    +
    {this.renderWorkflows()}
    +
    + ctx.navigation.goto('.', {sidePanel: null})}> + {this.sidePanel === 'submit-new-workflow' && ( + ctx.navigation.goto(uiUrl(`workflows/${wf.metadata.namespace}/${wf.metadata.name}`))} + /> + )} + )} @@ -274,7 +256,7 @@ export class WorkflowsList extends BasePage, State> { this.listWatch = new ListWatch( () => services.workflows.list(namespace, selectedPhases, selectedLabels, pagination).then(x => { - x.items = x.items && x.items.filter(w => this.nullSafeTimeFilter(minStartedAt, maxStartedAt, w.status.startedAt, w.status.phase === NODE_PHASE.PENDING)); + x.items = x.items?.filter(w => this.nullSafeTimeFilter(minStartedAt, maxStartedAt, w.status.startedAt, w.status.phase === NODE_PHASE.PENDING)); return x; }), (resourceVersion: string) => services.workflows.watchFields({namespace, phases: selectedPhases, labels: selectedLabels, resourceVersion}),