From 3d7f3366f721851bdc9fdcb8da58ffd2c100c4d3 Mon Sep 17 00:00:00 2001 From: Andrew Dewar Date: Mon, 16 Dec 2024 15:01:28 -0700 Subject: [PATCH 1/3] Fixes 5203: Remove template patch banner --- .../SnapshotListModal/SnapshotListModal.tsx | 4 +- .../TemplatesTable/TemplatesTable.tsx | 41 +------------------ src/components/Header/Header.tsx | 17 ++++---- 3 files changed, 12 insertions(+), 50 deletions(-) diff --git a/src/Pages/Repositories/ContentListTable/components/SnapshotListModal/SnapshotListModal.tsx b/src/Pages/Repositories/ContentListTable/components/SnapshotListModal/SnapshotListModal.tsx index dccca0f8..5e5a1b45 100644 --- a/src/Pages/Repositories/ContentListTable/components/SnapshotListModal/SnapshotListModal.tsx +++ b/src/Pages/Repositories/ContentListTable/components/SnapshotListModal/SnapshotListModal.tsx @@ -268,7 +268,7 @@ const SnapshotListModal = () => { {!checkedSnapshots.size || !rbac?.repoWrite ? 'Remove selected snapshots' : checkedSnapshots.size == count - ? 'Can\'t remove all snapshots' + ? "Can't remove all snapshots" : `Remove ${checkedSnapshots.size} snapshots`} @@ -398,7 +398,7 @@ const SnapshotListModal = () => { { const [polling, setPolling] = useState(false); const [pollCount, setPollCount] = useState(0); - const basePath = rootPath.slice(1).replace('content', ''); - const storedBannerDismissal = !!sessionStorage.getItem('bannerDismissal'); - const [dismissed, setDismissed] = useState(storedBannerDismissal); - - const onDismissBanner = () => { - sessionStorage.setItem('bannerDismissal', 'true'); - setDismissed(true); - }; - const defaultValues: TemplateFilterData = { arch: '', version: '', @@ -234,29 +218,6 @@ const TemplatesTable = () => { ouiaId='templates_description' paragraph='View all content templates within your organization.' /> - - - } - > -

- Note:{' '} - {' '} - might not properly indicate which template is assigned to a system or which updates - are installable. -

-
-
-
diff --git a/src/components/Header/Header.tsx b/src/components/Header/Header.tsx index 5889b198..48fe2efe 100644 --- a/src/components/Header/Header.tsx +++ b/src/components/Header/Header.tsx @@ -38,14 +38,15 @@ export default function Header({ title, ouiaId, paragraph }: Props) { return ( - - {title} - - - } className={classes.remove100percent} /> + + {title} + + + } + className={classes.remove100percent} + /> {paragraph} From 150c5beba7de7923f61750f3c951bcaf8b9ef465 Mon Sep 17 00:00:00 2001 From: Andrew Dewar Date: Thu, 19 Dec 2024 13:47:42 -0700 Subject: [PATCH 2/3] Fix lint --- .../components/SnapshotListModal/SnapshotListModal.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Pages/Repositories/ContentListTable/components/SnapshotListModal/SnapshotListModal.tsx b/src/Pages/Repositories/ContentListTable/components/SnapshotListModal/SnapshotListModal.tsx index 5e5a1b45..89e4e364 100644 --- a/src/Pages/Repositories/ContentListTable/components/SnapshotListModal/SnapshotListModal.tsx +++ b/src/Pages/Repositories/ContentListTable/components/SnapshotListModal/SnapshotListModal.tsx @@ -268,7 +268,7 @@ const SnapshotListModal = () => { {!checkedSnapshots.size || !rbac?.repoWrite ? 'Remove selected snapshots' : checkedSnapshots.size == count - ? "Can't remove all snapshots" + ? `Can't remove all snapshots` : `Remove ${checkedSnapshots.size} snapshots`}
@@ -398,7 +398,7 @@ const SnapshotListModal = () => { Date: Fri, 20 Dec 2024 11:00:53 -0700 Subject: [PATCH 3/3] Add prettier rule to auto-fix singleQuote issues --- eslint.config.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index c6be107a..949d41b5 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -76,7 +76,7 @@ export default [ 'react/react-in-jsx-scope': 'off', camelcase: 'off', 'spaced-comment': 'error', - quotes: ['warn', 'single'], + 'prettier/prettier': ['warn', { singleQuote: true }], 'no-duplicate-imports': 'error', 'unused-imports/no-unused-imports': 'error', 'unused-imports/no-unused-vars': ['warn'],