From a0e77fabe8114e2a5357f21d8fb98e223c300faf Mon Sep 17 00:00:00 2001 From: David Vail Date: Mon, 24 Feb 2025 12:06:37 -0500 Subject: [PATCH 01/25] Update from PF5 -> PF6 --- ui/package.json | 6 +- ui/src/components/AppHeaderLayout.tsx | 27 +++++++-- ui/src/components/Countdown.tsx | 12 ++-- ui/src/components/Modal.tsx | 5 +- ui/src/components/RHACSLogo.tsx | 3 +- .../components/forms/FileUploadFormField.tsx | 2 +- ui/src/components/forms/TextFormField.tsx | 2 +- ui/src/containers/AppHeader/AppHeader.tsx | 10 ++-- .../containers/AppHeader/ProductLogoTile.tsx | 18 +----- ui/src/containers/AppHeader/UserInfo.tsx | 2 +- ui/src/infra.css | 2 +- ui/yarn.lock | 58 +++++++++---------- 12 files changed, 73 insertions(+), 74 deletions(-) diff --git a/ui/package.json b/ui/package.json index a9c41dc57..5ad031b1d 100644 --- a/ui/package.json +++ b/ui/package.json @@ -22,9 +22,9 @@ "gen:src": "./scripts/generate-client.sh" }, "dependencies": { - "@patternfly/patternfly": "^5.4.2", - "@patternfly/react-core": "^5.4.8", - "@patternfly/react-icons": "^5.4.2", + "@patternfly/patternfly": "^6.1.1", + "@patternfly/react-core": "^6.0.0", + "@patternfly/react-icons": "^6.0.0", "axios": "^0.21.4", "formik": "^2.4.2", "history": "^5.0.1", diff --git a/ui/src/components/AppHeaderLayout.tsx b/ui/src/components/AppHeaderLayout.tsx index 588dc7415..520ccc59d 100644 --- a/ui/src/components/AppHeaderLayout.tsx +++ b/ui/src/components/AppHeaderLayout.tsx @@ -2,10 +2,13 @@ import React, { ReactElement, ReactNode } from 'react'; import { Masthead, MastheadMain, + MastheadLogo, MastheadBrand, MastheadContent, ToolbarItem, + Flex, } from '@patternfly/react-core'; +import Version from 'containers/AppHeader/Version'; type Props = { logo: ReactNode; @@ -17,14 +20,26 @@ export default function AppHeaderLayout({ logo, main, ending }: Props): ReactEle return ( - - {logo} + + + {logo} + - - {main} - -
{ending}
+ + + Infra + + + + + {main} +
{ending}
+
); diff --git a/ui/src/components/Countdown.tsx b/ui/src/components/Countdown.tsx index c1f955b7e..3c3aa8def 100644 --- a/ui/src/components/Countdown.tsx +++ b/ui/src/components/Countdown.tsx @@ -31,26 +31,22 @@ function ModifiableTimeUnit({ {notation} - - + /> ); diff --git a/ui/src/components/Modal.tsx b/ui/src/components/Modal.tsx index a24050fbc..4253da3b2 100644 --- a/ui/src/components/Modal.tsx +++ b/ui/src/components/Modal.tsx @@ -1,5 +1,8 @@ import React, { ReactElement, ReactNode } from 'react'; -import { Modal, ModalVariant } from '@patternfly/react-core'; +import { + Modal, + ModalVariant +} from '@patternfly/react-core/deprecated'; type Props = { isOpen: boolean; diff --git a/ui/src/components/RHACSLogo.tsx b/ui/src/components/RHACSLogo.tsx index 69135c89c..765ec4f0a 100644 --- a/ui/src/components/RHACSLogo.tsx +++ b/ui/src/components/RHACSLogo.tsx @@ -3,8 +3,7 @@ import React, { forwardRef } from 'react'; const RHACSLogo = forwardRef((_, ref) => ( - Infra - - - - + + + ); } diff --git a/ui/src/containers/AppHeader/UserInfo.tsx b/ui/src/containers/AppHeader/UserInfo.tsx index 5c480ab37..43761e1da 100644 --- a/ui/src/containers/AppHeader/UserInfo.tsx +++ b/ui/src/containers/AppHeader/UserInfo.tsx @@ -13,7 +13,7 @@ export default function UserInfo(): ReactElement { alt={user?.Name || 'anonymous'} src={user.Picture} size="md" - border="dark" + isBordered className="flex justify-center items-center mr-2" /> ) : ( diff --git a/ui/src/infra.css b/ui/src/infra.css index 4e69c336f..e4c402f78 100644 --- a/ui/src/infra.css +++ b/ui/src/infra.css @@ -29,7 +29,7 @@ } .rhacs-logo-text { - fill: #ffffff; + fill: #000000; } /* LinkCard */ diff --git a/ui/yarn.lock b/ui/yarn.lock index a7ba7e1ad..0fc968911 100644 --- a/ui/yarn.lock +++ b/ui/yarn.lock @@ -1757,37 +1757,37 @@ dependencies: mkdirp "^1.0.4" -"@patternfly/patternfly@^5.4.2": - version "5.4.2" - resolved "https://registry.yarnpkg.com/@patternfly/patternfly/-/patternfly-5.4.2.tgz#4a87d6a5fb2ffd526b4b9597b651f13ecf8ddd4f" - integrity sha512-+BaokNR8/AmTYMESxby9UtQXPGACg449BXQd0KejAvW/uGxlgO6mY1X1205DeBEHoK3e/vXkYXjvZPpv/tcxSA== - -"@patternfly/react-core@^5.4.8": - version "5.4.14" - resolved "https://registry.yarnpkg.com/@patternfly/react-core/-/react-core-5.4.14.tgz#d41d28c81884f6a45dc3c364dc5ae2c933c72e89" - integrity sha512-oXVMzLs9Pa+xmdc39L2u05zbXfY3mWuOFi4GDv44GPdDexZUFy5W69+Nv5P8cwfMim55Nf5kKYpcqmatD2bBXw== - dependencies: - "@patternfly/react-icons" "^5.4.2" - "@patternfly/react-styles" "^5.4.1" - "@patternfly/react-tokens" "^5.4.1" +"@patternfly/patternfly@^6.1.1": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@patternfly/patternfly/-/patternfly-6.1.0.tgz#bd2374bf293b1c2abdde071700b3d9532ec2dfe6" + integrity sha512-w+QazL8NHKkg5j01eotblsswKxQQSYB0CN3yBXQL9ScpHdp/fK8M6TqWbKZNRpf+NqhMxcH/om8eR0N/fDCJqw== + +"@patternfly/react-core@^6.0.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@patternfly/react-core/-/react-core-6.1.0.tgz#58d35b523c019a33f03b652b065d11cf60921734" + integrity sha512-zj0lJPZxQanXKD8ae2kYnweT0kpp1CzpHYAkaBjTrw2k6ZMfr/UPlp0/ugCjWEokBqh79RUADLkKJJPce/yoSQ== + dependencies: + "@patternfly/react-icons" "^6.1.0" + "@patternfly/react-styles" "^6.1.0" + "@patternfly/react-tokens" "^6.1.0" focus-trap "7.6.2" - react-dropzone "^14.2.3" - tslib "^2.7.0" + react-dropzone "^14.3.5" + tslib "^2.8.1" -"@patternfly/react-icons@^5.4.2": - version "5.4.2" - resolved "https://registry.yarnpkg.com/@patternfly/react-icons/-/react-icons-5.4.2.tgz#8937a7167a0b3abdc3c179524f456b4cbd8f0c39" - integrity sha512-CMQ5oHYzW6TPVTs2jpNJmP2vGCAKR/YeTPwHGO9dLkAUej1IcIxtCCWK2Fdo2UJsnBjuZihasyw2b6ehvbUm9Q== +"@patternfly/react-icons@^6.0.0", "@patternfly/react-icons@^6.1.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@patternfly/react-icons/-/react-icons-6.1.0.tgz#4f982f2b8dc0b9366acca1170fcd52fa8c16b85f" + integrity sha512-V1w/j19YmOgvh72IRRf1p07k+u4M5+9P+o/IxunlF0fWzLDX4Hf+utBI11A8cRfUzpQN7eLw/vZIS3BLM8Ge3Q== -"@patternfly/react-styles@^5.4.1": - version "5.4.1" - resolved "https://registry.yarnpkg.com/@patternfly/react-styles/-/react-styles-5.4.1.tgz#c101419917bcf309dfa7469820cd7320dd0c5120" - integrity sha512-XA8PXksD8uiA3RTwxdUwJXOCf+V6sVd+2HKapWAdRLvtSV+Sdk7NgCvalb4IAQncsddLopjPQD8gAHA298+N8w== +"@patternfly/react-styles@^6.1.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@patternfly/react-styles/-/react-styles-6.1.0.tgz#e8aa12c6b1417ba1a739ea435bc02f7f8d516132" + integrity sha512-JQ3zIl5SFiSB0YWVYibcUwgZdsp6Wn8hkfZ7KhtCjHFccSDdJexPOXVV1O9f2h4PfxTlY3YntZ81ZsguBx/Q7A== -"@patternfly/react-tokens@^5.4.1": - version "5.4.1" - resolved "https://registry.yarnpkg.com/@patternfly/react-tokens/-/react-tokens-5.4.1.tgz#03104c5b73ef438076141f897a53d16507d8a115" - integrity sha512-eygdHE7Krta1mijAv/E8RHiKIgysD0eeNTo8EXUYC8/M4e5K6sqpr2p6rQBF8QiRMN8FnbXvZT3K2OQ28pYt9Q== +"@patternfly/react-tokens@^6.1.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@patternfly/react-tokens/-/react-tokens-6.1.0.tgz#c2a64e68568bde81e56f4b5a8f9ac3ad8cd06e8a" + integrity sha512-t1UcHbOa4txczTR5UlnG4XcAAdnDSfSlCaOddw/HTqRF59pn2ks2JUu9sfnFRZ8SiAAxKRiYdX5bT7Mf4R24+w== "@pmmmwh/react-refresh-webpack-plugin@0.4.2": version "0.4.2" @@ -10533,7 +10533,7 @@ react-dom@^17.0.1: object-assign "^4.1.1" scheduler "^0.20.1" -react-dropzone@^14.2.3: +react-dropzone@^14.3.5: version "14.3.8" resolved "https://registry.yarnpkg.com/react-dropzone/-/react-dropzone-14.3.8.tgz#a7eab118f8a452fe3f8b162d64454e81ba830582" integrity sha512-sBgODnq+lcA4P296DY4wacOZz3JFpD99fp+hb//iBO2HHnyeZU3FwWyXJ6salNpqQdsZrgMrotuko/BdJMV8Ug== @@ -12384,7 +12384,7 @@ tslib@^2.0.0, tslib@^2.1.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.0.tgz#b295854684dbda164e181d259a22cd779dcd7bc3" integrity sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA== -tslib@^2.7.0: +tslib@^2.7.0, tslib@^2.8.1: version "2.8.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== From a1ab339bb799af024c672946a48f817c207cafbb Mon Sep 17 00:00:00 2001 From: David Vail Date: Mon, 24 Feb 2025 13:39:36 -0500 Subject: [PATCH 02/25] Tweaks for basic UX cleanup --- ui/src/components/Countdown.tsx | 20 ++++++++------ ui/src/components/FullPageError.tsx | 6 ++--- ui/src/components/FullPageSpinner.tsx | 4 +-- .../components/forms/FileUploadFormField.tsx | 2 +- ui/src/components/forms/TextFormField.tsx | 2 +- ui/src/containers/App.tsx | 9 +++++-- .../ClusterInfoPage/DeleteClusterModal.tsx | 6 ++--- .../DownloadArtifactsModal.tsx | 2 +- .../ClusterInfoPage/MutableLifespan.tsx | 2 +- ui/src/containers/HomePage/HomePage.tsx | 2 +- .../LaunchClusterPage/ClusterForm.tsx | 3 ++- ui/src/infra.css | 26 +++---------------- 12 files changed, 38 insertions(+), 46 deletions(-) diff --git a/ui/src/components/Countdown.tsx b/ui/src/components/Countdown.tsx index 3c3aa8def..e9552d086 100644 --- a/ui/src/components/Countdown.tsx +++ b/ui/src/components/Countdown.tsx @@ -25,28 +25,32 @@ function ModifiableTimeUnit({ onChange = (): void => {}, }: ModifiableTimeUnitProps): ReactElement { return ( - + {`${value}`.padStart(2, '0')} {notation} - -