From 0d895ac8955a3b68a1137166e8db18c843a955d3 Mon Sep 17 00:00:00 2001 From: achmelo <37397715+achmelo@users.noreply.github.com> Date: Mon, 4 Mar 2024 12:24:09 +0100 Subject: [PATCH] fix: zowe logo and trademark info (#3338) * fix(ui): UI Changes for Share Requested UI Changes for share Signed-off-by: Andrea Tabone Signed-off-by: achmelo * fix(ui): UI Changes for Share Fix mock errors Signed-off-by: Andrea Tabone Signed-off-by: achmelo * fix(ui): UI Changes for Share fix(ui): UI Changes for Share Fixup new homepage image layout, cleanup comments Signed-off-by: Andrea Tabone Signed-off-by: achmelo * fix(ui): UI Changes for Share Fix review comments Signed-off-by: Andrej Chmelo Signed-off-by: achmelo * lint Signed-off-by: achmelo --------- Signed-off-by: Andrea Tabone Signed-off-by: achmelo Signed-off-by: Andrej Chmelo Co-authored-by: Mike Simpson --- .../assets/images/zowe-horizontal-color.png | Bin 0 -> 8186 bytes .../src/components/Dashboard/_dashboard.scss | 30 +--------- .../src/components/DetailPage/DetailPage.jsx | 52 +++++++++++++++++- .../components/DetailPage/_detailPage.scss | 4 ++ .../src/components/Footer/_footer.scss | 7 +++ .../src/components/Header/_header.scss | 39 +++++++++++++ .../ServicesNavigationBar.jsx | 4 +- .../frontend/src/utils/utilFunctions.js | 16 ++++++ .../frontend/src/utils/utilFunctions.test.js | 18 +++++- 9 files changed, 137 insertions(+), 33 deletions(-) create mode 100644 api-catalog-ui/frontend/src/assets/images/zowe-horizontal-color.png diff --git a/api-catalog-ui/frontend/src/assets/images/zowe-horizontal-color.png b/api-catalog-ui/frontend/src/assets/images/zowe-horizontal-color.png new file mode 100644 index 0000000000000000000000000000000000000000..f0f501946e34b6c06bd428ae06ffc851599395e8 GIT binary patch literal 8186 zcmV)zX2$U?}%o`e7b2}Chrdv0+VTo_OhP?6PLpZaj#prXJuprVdC4(d3r0d(Mr z+XB&R@L23ojUcOQ`Nx# zA&ecnOhy=Cv;rjjUqE(Fdt@yf^@Fj~j{~fS`XY=lT8MLB@Us>TM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TT!vo%7 z%=uP_&p~q|mU~gCddQtZbx0G%dj1Fn429r^>#=HFQ2wM=*J%4*zRu1RF6_Z=&E<7A z*xaE9-;p!wSane2VsXPcFqkgJ<|)hE!t(zKqRV!6{v+AQw~1KgfXgvd()VmcM2y0^ zsYL;olen+HDyls}N9yY%uKm+zIVbxTfg*R}C#1jx6)U1f1N|!}@i$0+hoW79-0=ZV zk~)bt`D2KDYmc)2){;MHswQsUXXA3zhvG{jPcdVUk~8Xcv^6Y=$LU;a&{p8wcQ4hr z62USWV1G;w$s6f9Cc4KH+-pi74d}6%(%&bq@#2siXekkEaKI)eaW}2I0495$&vJH) znB%+K%VWy16J6sE!FNe-Y@RCqa%iM`;WEzdqe?_XY3C-ngcTtsqubwAp9Dx1bZy>E7 z5M@aoIsPV$zdqAqUOtR4(8hoMCPEruGKf*TSC=lmNV;+X$1!f1-K_BT2GW|s7pn6{Lkn7|h^h<~3J?M(f1?n_XkWLLWw3no7t{D!N50@*On+9F0}viaPi^T zG*!fVx50F@Fv9T0*$u)XvcIVHjf0FK*x+he?4Q`Tzg`07*qoM6N<$f-c$u2LJ#7 literal 0 HcmV?d00001 diff --git a/api-catalog-ui/frontend/src/components/Dashboard/_dashboard.scss b/api-catalog-ui/frontend/src/components/Dashboard/_dashboard.scss index 519fcf9a20..b321b1d936 100644 --- a/api-catalog-ui/frontend/src/components/Dashboard/_dashboard.scss +++ b/api-catalog-ui/frontend/src/components/Dashboard/_dashboard.scss @@ -187,7 +187,7 @@ body { }//end homepage/dashboard .homepage-content { - max-width: 1086px; + max-width: 1250px; padding-bottom: var( --spaceHuge ); max-height: calc(100vh - #{var( --headerHeight )}); scrollbar-width: none; @@ -331,8 +331,7 @@ body { } &.homepage-header-images { width: 100%; - padding-left: 175px; - margin-top: 20px; + padding-left: 80px; .homepage-main-img { width: 501px; @@ -340,31 +339,6 @@ body { .homepage-header-img { position: absolute; } - .homepage-security-img { - height: 45px; - left: 290px; - bottom: 45px; - } - .homepage-payment-img { - height: 67px; - left: 118px; - top: 105px; - } - .homepage-mainframe-img { - height: 89px; - left: var( --spaceSmall ); - top: -10px; - } - .homepage-enterprise-img { - height: 45px; - left: 295px; - top: 55px; - } - .homepage-storage-img { - height: 67px; - left: 264px; - top: -42px; - } } } diff --git a/api-catalog-ui/frontend/src/components/DetailPage/DetailPage.jsx b/api-catalog-ui/frontend/src/components/DetailPage/DetailPage.jsx index cc43489569..01bf10cd64 100644 --- a/api-catalog-ui/frontend/src/components/DetailPage/DetailPage.jsx +++ b/api-catalog-ui/frontend/src/components/DetailPage/DetailPage.jsx @@ -20,7 +20,14 @@ import PageNotFound from '../PageNotFound/PageNotFound'; import BigShield from '../ErrorBoundary/BigShield/BigShield'; import ServicesNavigationBarContainer from '../ServicesNavigationBar/ServicesNavigationBarContainer'; import Shield from '../ErrorBoundary/Shield/Shield'; -import countAdditionalContents, { customUIStyle, isAPIPortal, closeMobileMenu } from '../../utils/utilFunctions'; +import zoweImage from '../../assets/images/zowe-horizontal-color.png'; + +import countAdditionalContents, { + customUIStyle, + isAPIPortal, + closeMobileMenu, + findAndFormatZowe, +} from '../../utils/utilFunctions'; const loadFeedbackButton = () => { if (isAPIPortal()) { @@ -133,6 +140,7 @@ export default class DetailPage extends Component { ) { customUIStyle(tiles[0].customStyleConfig); } + return (
{apiPortalEnabled && } @@ -186,7 +194,7 @@ export default class DetailPage extends Component {
{tiles !== undefined && tiles.length === 1 && (

- {tiles[0].title} + {findAndFormatZowe(tiles[0].title)}

)}
@@ -200,6 +208,46 @@ export default class DetailPage extends Component {
)} + {/* Extra Zowe information */} + {apiPortalEnabled && tiles[0].title.toLowerCase().indexOf('zowe') >= 0 && ( +
+
+ Zowe +
+ +
+ + Zowe + + ® is a project of the  + + Open Mainframe Project + +  Zowe, the Zowe logo and the Open Mainframe Project are trademarks of  + + The Linux Foundation. + +  Broadcom is a Platinum member of Open Mainframe Project and a leading + contributor of several projects. +
+
+
+ )} {apiPortalEnabled && !onlySwaggerPresent && (
diff --git a/api-catalog-ui/frontend/src/components/DetailPage/_detailPage.scss b/api-catalog-ui/frontend/src/components/DetailPage/_detailPage.scss index 82f9ed7b93..a7429df2a6 100644 --- a/api-catalog-ui/frontend/src/components/DetailPage/_detailPage.scss +++ b/api-catalog-ui/frontend/src/components/DetailPage/_detailPage.scss @@ -199,4 +199,8 @@ body .detail-content { padding-left: 10px; font-size: 13px; } + + .externalLink { + color: var(--control00) !important; + } } diff --git a/api-catalog-ui/frontend/src/components/Footer/_footer.scss b/api-catalog-ui/frontend/src/components/Footer/_footer.scss index ab13d06850..c51ebc4a77 100644 --- a/api-catalog-ui/frontend/src/components/Footer/_footer.scss +++ b/api-catalog-ui/frontend/src/components/Footer/_footer.scss @@ -31,6 +31,13 @@ body { } } } + + .footerZoweLinks { + color: var( --text-secondary) !important; + u { + text-decoration-color: #3B4151; + } + } } h6#footer-message { color: #53565A; diff --git a/api-catalog-ui/frontend/src/components/Header/_header.scss b/api-catalog-ui/frontend/src/components/Header/_header.scss index 3608e6cdb7..bbaba2897c 100644 --- a/api-catalog-ui/frontend/src/components/Header/_header.scss +++ b/api-catalog-ui/frontend/src/components/Header/_header.scss @@ -34,6 +34,39 @@ body { display: flex; flex-direction: row; } + + .app-icon-container { + position: relative; + display: inline-block; + } + + .app-icon-container .tooltiptext { + visibility: hidden; + width: 250px; + background-color: black; + color: #fff; + text-align: center; + border-radius: 6px; + padding: 5px 0; + position: absolute; + z-index: 1; + top: -5px; + left: 110%; + } + + .app-icon-container .tooltiptext::after { + content: ""; + position: absolute; + top: 50%; + right: 100%; + margin-top: -5px; + border-width: 5px; + border-style: solid; + border-color: transparent black transparent transparent; + } + .app-icon-container:hover .tooltiptext { + visibility: visible; + } .app-icon-container img { height: 26px; } @@ -90,6 +123,12 @@ body { margin-left: var( --spaceSmall); } } + .registered { + font-size: 70%; + position: relative; + bottom: 5px; + + } }//end header .dashboard-mobile-menu { diff --git a/api-catalog-ui/frontend/src/components/ServicesNavigationBar/ServicesNavigationBar.jsx b/api-catalog-ui/frontend/src/components/ServicesNavigationBar/ServicesNavigationBar.jsx index 9d44d12aba..c2f64a4896 100644 --- a/api-catalog-ui/frontend/src/components/ServicesNavigationBar/ServicesNavigationBar.jsx +++ b/api-catalog-ui/frontend/src/components/ServicesNavigationBar/ServicesNavigationBar.jsx @@ -14,7 +14,7 @@ import { Link as RouterLink } from 'react-router-dom'; import PropTypes from 'prop-types'; import Shield from '../ErrorBoundary/Shield/Shield'; import SearchCriteria from '../Search/SearchCriteria'; -import { closeMobileMenu, isAPIPortal } from '../../utils/utilFunctions'; +import { closeMobileMenu, isAPIPortal, findAndFormatZowe } from '../../utils/utilFunctions'; import MenuCloseImage from '../../assets/images/xmark.svg'; import { ReactComponent as BackArrowImage } from '../../assets/images/angles-left.svg'; import { sortServices } from '../../selectors/selectors'; @@ -87,7 +87,7 @@ export default class ServicesNavigationBar extends Component { } const TruncatedTabLabel = withStyles(this.styles)(({ classes, label }) => ( -
{label}
+
{findAndFormatZowe(label)}
)); return ( diff --git a/api-catalog-ui/frontend/src/utils/utilFunctions.js b/api-catalog-ui/frontend/src/utils/utilFunctions.js index 4547c4dd70..9a33b2404f 100644 --- a/api-catalog-ui/frontend/src/utils/utilFunctions.js +++ b/api-catalog-ui/frontend/src/utils/utilFunctions.js @@ -195,3 +195,19 @@ export const customUIStyle = async (uiConfig) => { }; export const isAPIPortal = () => process.env.REACT_APP_API_PORTAL === 'true'; + +export const findAndFormatZowe = (title) => { + if (isAPIPortal()) { + const zoweIndex = title.toLowerCase().indexOf('zowe'); + if (zoweIndex >= 0) { + const before = title.substring(0, zoweIndex); + const after = title.substring(zoweIndex + 5); + return ( + + {before}Zowe® {after} + + ); + } + } + return title; +}; diff --git a/api-catalog-ui/frontend/src/utils/utilFunctions.test.js b/api-catalog-ui/frontend/src/utils/utilFunctions.test.js index 398bfe7a41..53804d0ae5 100644 --- a/api-catalog-ui/frontend/src/utils/utilFunctions.test.js +++ b/api-catalog-ui/frontend/src/utils/utilFunctions.test.js @@ -7,7 +7,14 @@ * * Copyright Contributors to the Zowe Project. */ -import countAdditionalContents, { closeMobileMenu, customUIStyle, isValidUrl, openMobileMenu } from './utilFunctions'; +import * as enzyme from 'enzyme'; +import countAdditionalContents, { + closeMobileMenu, + customUIStyle, + findAndFormatZowe, + isValidUrl, + openMobileMenu, +} from './utilFunctions'; describe('>>> Util Functions tests', () => { function mockFetch() { @@ -246,4 +253,13 @@ describe('>>> Util Functions tests', () => { it('should return true when URL is valid', async () => { expect(isValidUrl('https://localhost.com/hello')).toBe(true); }); + + it('should not format title without zowe in it', async () => { + expect(findAndFormatZowe('String without key')).toEqual('String without key'); + }); + it('should format title with "zowe" in it', async () => { + process.env.REACT_APP_API_PORTAL = true; + const wrapper = enzyme.shallow(findAndFormatZowe('Zowe API Catalog')); + expect(wrapper.text()).toContain('®'); + }); });