From 3c6e7b0983dc00aa645220bbba4347772476f1a1 Mon Sep 17 00:00:00 2001 From: Alex Corey Date: Fri, 23 Jul 2021 11:34:03 -0400 Subject: [PATCH 1/2] Improves empty state messages for improve UX --- awx/ui_next/src/components/JobList/JobList.js | 1 + .../src/components/PaginatedTable/ToolbarAddButton.js | 1 - .../src/components/Schedule/ScheduleList/ScheduleList.js | 7 +++++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/awx/ui_next/src/components/JobList/JobList.js b/awx/ui_next/src/components/JobList/JobList.js index 1ce6b97dbc..5720e803b5 100644 --- a/awx/ui_next/src/components/JobList/JobList.js +++ b/awx/ui_next/src/components/JobList/JobList.js @@ -159,6 +159,7 @@ function JobList({ defaultParams, showTypeColumn = false }) { hasContentLoading={isLoading || isDeleteLoading || isCancelLoading} items={jobs} itemCount={count} + emptyContentMessage={t`Please execute Jobs to populate this list.`} pluralizedItemName={t`Jobs`} qsConfig={qsConfig} toolbarSearchColumns={[ diff --git a/awx/ui_next/src/components/PaginatedTable/ToolbarAddButton.js b/awx/ui_next/src/components/PaginatedTable/ToolbarAddButton.js index a4479cc619..27c2ca6fe0 100644 --- a/awx/ui_next/src/components/PaginatedTable/ToolbarAddButton.js +++ b/awx/ui_next/src/components/PaginatedTable/ToolbarAddButton.js @@ -10,7 +10,6 @@ import { useKebabifiedMenu } from 'contexts/Kebabified'; function ToolbarAddButton({ linkTo, onClick, - isDisabled, defaultLabel = t`Add`, showToggleIndicator, diff --git a/awx/ui_next/src/components/Schedule/ScheduleList/ScheduleList.js b/awx/ui_next/src/components/Schedule/ScheduleList/ScheduleList.js index 63edb5a749..97b7e4ec3b 100644 --- a/awx/ui_next/src/components/Schedule/ScheduleList/ScheduleList.js +++ b/awx/ui_next/src/components/Schedule/ScheduleList/ScheduleList.js @@ -147,6 +147,11 @@ function ScheduleList({ } return missingValues && t`This schedule is missing required survey values`; }; + let emptyContentMessage = t`Please add a Schedule to populate this list.`; + + if (location.pathname.startsWith('/schedules')) { + emptyContentMessage = t`Please add a Schedule to populate this list. Schedules can be added to a Template, Project, or Inventory Source.`; + } return ( <> @@ -156,6 +161,8 @@ function ScheduleList({ items={schedules} itemCount={itemCount} qsConfig={QS_CONFIG} + pluralizedItemName={t`Schedules`} + emptyContentMessage={emptyContentMessage} onRowClick={handleSelect} headerRow={ From 50279478c8a8266250a09d8ecaaec05f19c70149 Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Wed, 28 Jul 2021 10:04:58 -0400 Subject: [PATCH 2/2] Update job list message --- awx/ui_next/src/components/JobList/JobList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/ui_next/src/components/JobList/JobList.js b/awx/ui_next/src/components/JobList/JobList.js index 5720e803b5..0547212d0d 100644 --- a/awx/ui_next/src/components/JobList/JobList.js +++ b/awx/ui_next/src/components/JobList/JobList.js @@ -159,7 +159,7 @@ function JobList({ defaultParams, showTypeColumn = false }) { hasContentLoading={isLoading || isDeleteLoading || isCancelLoading} items={jobs} itemCount={count} - emptyContentMessage={t`Please execute Jobs to populate this list.`} + emptyContentMessage={t`Please run a job to populate this list.`} pluralizedItemName={t`Jobs`} qsConfig={qsConfig} toolbarSearchColumns={[