From da18bc0993edb4ef1fc1133b00b1e7182fb8774f Mon Sep 17 00:00:00 2001 From: Andrew Azores Date: Mon, 29 Jul 2024 14:23:40 -0400 Subject: [PATCH] fix(masthead): correct styling of masthead icons and quickstart menu item (#1309) --- src/app/AppLayout/AppLayout.tsx | 29 ++++++++++++++--------- src/app/Settings/Config/FeatureLevels.tsx | 6 ++--- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/src/app/AppLayout/AppLayout.tsx b/src/app/AppLayout/AppLayout.tsx index e166a0fdb..8dab6d7fe 100644 --- a/src/app/AppLayout/AppLayout.tsx +++ b/src/app/AppLayout/AppLayout.tsx @@ -73,7 +73,6 @@ import { BellIcon, CaretDownIcon, CogIcon, - EllipsisVIcon, ExternalLinkAltIcon, PlusCircleIcon, QuestionCircleIcon, @@ -297,13 +296,12 @@ export const AppLayout: React.FC = ({ children }) => { const UserInfoToggle = React.useCallback( (toggleRef: React.Ref) => ( - + {username || ( )} - ), [username, handleUserInfoToggle], @@ -333,8 +331,8 @@ export const AppLayout: React.FC = ({ children }) => { const helpItems = React.useMemo(() => { return [ - - {t('AppLayout.APP_LAUNCHER.QUICKSTARTS')} + }> + {t('AppLayout.APP_LAUNCHER.QUICKSTARTS')} , {t('AppLayout.APP_LAUNCHER.DOCUMENTATION')} @@ -398,7 +396,9 @@ export const AppLayout: React.FC = ({ children }) => { onClick={handleNotificationCenterToggle} aria-label="Notifications" > - + + + @@ -409,7 +409,7 @@ export const AppLayout: React.FC = ({ children }) => { data-quickstart-id="settings-link" component={(props) => } > - + @@ -421,14 +421,18 @@ export const AppLayout: React.FC = ({ children }) => { toggle={(toggleRef: React.Ref) => ( } + variant="plain" className="application-launcher" onClick={() => handleHelpToggle()} > - + + + )} isOpen={showHelpDropdown} + onOpenChange={(v) => setShowHelpDropdown(v)} + onOpenChangeKeys={['Escape']} popperProps={{ position: 'right', }} @@ -439,10 +443,11 @@ export const AppLayout: React.FC = ({ children }) => { setShowUserInfoDropdown(false)} toggle={UserInfoToggle} isOpen={showUserInfoDropdown} + onOpenChange={(v) => setShowUserInfoDropdown(v)} + onOpenChangeKeys={['Escape']} popperProps={{ position: 'right', }} @@ -483,7 +488,9 @@ export const AppLayout: React.FC = ({ children }) => { data-quickstart-id="nav-toggle-btn" data-tour-id="nav-toggle-btn" > - + + + diff --git a/src/app/Settings/Config/FeatureLevels.tsx b/src/app/Settings/Config/FeatureLevels.tsx index b24c53df4..66c38c626 100644 --- a/src/app/Settings/Config/FeatureLevels.tsx +++ b/src/app/Settings/Config/FeatureLevels.tsx @@ -71,10 +71,10 @@ const Component = () => { .filter((v) => typeof v === 'string') .map((v): { key: string; value: number } => ({ key: String(v), value: FeatureLevel[v] })) .filter((v) => { - if (!process.env.CRYOSTAT_AUTHORITY) { - return v.value !== FeatureLevel.DEVELOPMENT; + if ((process.env.NODE_ENV ?? '').toLowerCase() === 'development') { + return true; } - return true; + return v.value !== FeatureLevel.DEVELOPMENT; }) .map((level) => (