From 14284e928f304e4c33f2fc82973ebc339812f954 Mon Sep 17 00:00:00 2001 From: Ed Olivares <34591886+eudoroolivares2016@users.noreply.github.com> Date: Wed, 4 Dec 2024 11:04:46 -0500 Subject: [PATCH 01/14] EDSC-4322: Fix portal mock test --- .../__tests__/SearchSidebarHeader.test.js | 3 +- .../__tests__/availablePortalsMock.json | 65 +++++++++++++++++++ 2 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 static/src/js/components/SearchSidebar/__tests__/availablePortalsMock.json diff --git a/static/src/js/components/SearchSidebar/__tests__/SearchSidebarHeader.test.js b/static/src/js/components/SearchSidebar/__tests__/SearchSidebarHeader.test.js index ad979bd6f6..3dabd18ee1 100644 --- a/static/src/js/components/SearchSidebar/__tests__/SearchSidebarHeader.test.js +++ b/static/src/js/components/SearchSidebar/__tests__/SearchSidebarHeader.test.js @@ -25,8 +25,7 @@ import SearchSidebarHeader from '../SearchSidebarHeader' import SearchFormContainer from '../../../containers/SearchFormContainer/SearchFormContainer' import PortalLinkContainer from '../../../containers/PortalLinkContainer/PortalLinkContainer' -// eslint-disable-next-line import/no-unresolved -import availablePortals from '../../../../../../portals/availablePortals.json' +import availablePortals from './availablePortalsMock.json' import * as getApplicationConfig from '../../../../../../sharedUtils/config' diff --git a/static/src/js/components/SearchSidebar/__tests__/availablePortalsMock.json b/static/src/js/components/SearchSidebar/__tests__/availablePortalsMock.json new file mode 100644 index 0000000000..fd0f0745b6 --- /dev/null +++ b/static/src/js/components/SearchSidebar/__tests__/availablePortalsMock.json @@ -0,0 +1,65 @@ +{ + "edsc": { + "features": { + "advancedSearch": true, + "authentication": true, + "featureFacets": [ + { } + ] + }, + "footer": { + "attributionText": "NASA Official: Stephen Berrick", + "displayVersion": true, + "primaryLinks": [ ], + "secondaryLinks": [ ] + }, + "pageTitle": "Earthdata Search", + "portalBrowser": false, + "title": { + "primary": "Earthdata Search" + }, + "ui": { + "showNonEosdisCheckbox": true, + "showOnlyGranulesCheckbox": true, + "showTophat": true + }, + "portalId": "edsc" + }, + "idn": { + "moreInfoUrl": "https://ceos.org/ourwork/workinggroups/wgiss/access/international-directory-network/", + "pageTitle": "IDN", + "parentConfig": "edsc", + "portalBrowser": true, + "query": { + "hasGranulesOrCwic": null + }, + "title": { + "primary": "IDN", + "secondary": "CEOS International Directory Network" + }, + "ui": { + "showNonEosdisCheckbox": false, + "showOnlyGranulesCheckbox": false + }, + "portalId": "idn" + }, + "soos": { + "moreInfoUrl": "http://www.soos.aq", + "pageTitle": "Southern Ocean Observing System", + "parentConfig": "edsc", + "portalBrowser": true, + "query": { + "hasGranulesOrCwic": null, + "tagKey": [ ] + }, + "title": { + "primary": "SOOS", + "secondary": "Southern Ocean Observing System" + }, + "ui": { + "showNonEosdisCheckbox": false, + "showOnlyGranulesCheckbox": false + }, + "portalId": "soos" + } +} \ No newline at end of file From 13cdb9d1ba0dcbd20da531bc6ef7d7901b3a1409 Mon Sep 17 00:00:00 2001 From: Ed Olivares <34591886+eudoroolivares2016@users.noreply.github.com> Date: Wed, 4 Dec 2024 11:05:21 -0500 Subject: [PATCH 02/14] EDSC-4322: Fix Customizable Icons styling --- README.md | 2 +- .../CustomizableIcons/CustomizableIcons.jsx | 41 +++++++------ .../CustomizableIcons/CustomizableIcons.scss | 57 +++++++++++++++++++ .../__tests__/CustomizableIcons.test.js | 6 +- .../AccessMethodRadio/AccessMethodRadio.jsx | 26 ++++----- .../GranuleResultsDataLinksButton.scss | 4 +- .../src/js/components/MetaIcon/MetaIcon.scss | 4 +- static/src/js/components/Tour/TourSteps.jsx | 2 +- 8 files changed, 101 insertions(+), 41 deletions(-) create mode 100644 static/src/js/components/CustomizableIcons/CustomizableIcons.scss diff --git a/README.md b/README.md index 361f66f87a..c76951cc93 100644 --- a/README.md +++ b/README.md @@ -147,7 +147,7 @@ The local development environment for the static assets can be started by execut This will run the React application at [http://localhost:8080](http://localhost:8080) -- please see `Serverless Framework` below for enabling the 'server' side functionality. -### Serverless Framework +### Serverless Framework Locally The [serverless framework](https://serverless.com/framework/docs/providers/aws/) offers many plugins which allow for local development utilizing many of the services AWS offers. For the most part we only need API Gateway and Lambda for this application but there are plugins for many more services (a list of known exceptions will be maintained below). diff --git a/static/src/js/components/CustomizableIcons/CustomizableIcons.jsx b/static/src/js/components/CustomizableIcons/CustomizableIcons.jsx index 8a84aacbfd..5d5dc3f745 100644 --- a/static/src/js/components/CustomizableIcons/CustomizableIcons.jsx +++ b/static/src/js/components/CustomizableIcons/CustomizableIcons.jsx @@ -1,5 +1,6 @@ import React from 'react' import PropTypes from 'prop-types' +import classNames from 'classnames' import { Settings, @@ -17,6 +18,8 @@ import { import MetaIcon from '../MetaIcon/MetaIcon' import EDSCIcon from '../EDSCIcon/EDSCIcon' +import './CustomizableIcons.scss' + /** * Renders icons indicating customization options for access methods. * Used by CollectionResultsItem and AccessMethodRadio. @@ -37,10 +40,12 @@ export const CustomizableIcons = ({ hasCombine, forAccessMethodRadio }) => { - let metaIconClasses = 'collection-results-item__meta-icon collection-results-item__meta-icon--customizable' - if (forAccessMethodRadio) { - metaIconClasses += ' meta-icon__accessMethod' - } + const metaIconClasses = classNames([ + 'customizable-icons__meta-icon', + { + 'customizable-icons__meta-icon__accessMethod': forAccessMethodRadio + } + ]) return ( ( @@ -56,14 +61,14 @@ export const CustomizableIcons = ({ id="feature-icon-list-view__customize" icon={Settings} label="Customize" - tooltipClassName="collection-results-item__tooltip text-align-left" + tooltipClassName="customizable-icons__tooltip text-align-left" metadata={ ( <> { hasSpatialSubsetting && ( Supports customization: -