diff --git a/.github/workflows/deploy-to-production.yml b/.github/workflows/deploy-to-production.yml index b3278972b..f91123579 100644 --- a/.github/workflows/deploy-to-production.yml +++ b/.github/workflows/deploy-to-production.yml @@ -17,6 +17,7 @@ jobs: GATSBY_CPU_COUNT: 2 GATSBY_MAPBOX_TOKEN: ${{ secrets.GATSBY_MAPBOX_TOKEN }} GA_MEASUREMENT_ID: ${{ secrets.GA_MEASUREMENT_ID }} + GATSBY_ADMG_API: ${{ secrets.GATSBY_ADMG_API }} steps: - name: Cancel Previous Runs diff --git a/.github/workflows/deploy-to-staging.yml b/.github/workflows/deploy-to-staging.yml index e6fd9b1e4..dcc036c4d 100644 --- a/.github/workflows/deploy-to-staging.yml +++ b/.github/workflows/deploy-to-staging.yml @@ -22,6 +22,7 @@ jobs: GATSBY_CPU_COUNT: 2 GATSBY_MAPBOX_TOKEN: ${{ secrets.GATSBY_MAPBOX_TOKEN }} GA_MEASUREMENT_ID: ${{ secrets.GA_MEASUREMENT_ID }} + GATSBY_ADMG_API: ${{ secrets.GATSBY_ADMG_API }} steps: - name: Cancel Previous Runs diff --git a/gatsby-config.js b/gatsby-config.js index 3aff76a3c..1c2d8e8c5 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -90,8 +90,8 @@ module.exports = { "child-src": "'self' blob:", "connect-src": process.env.NODE_ENV === "development" - ? "'self' https://www.google-analytics.com https://*.tiles.mapbox.com https://api.mapbox.com https://events.mapbox.com http://localhost:* ws://localhost:*" - : "'self' https://www.google-analytics.com https://*.tiles.mapbox.com https://api.mapbox.com https://events.mapbox.com", + ? "'self' https://admg.nasa-impact.net https://www.google-analytics.com https://*.tiles.mapbox.com https://api.mapbox.com https://events.mapbox.com http://localhost:* ws://localhost:*" + : "'self' https://admg.nasa-impact.net https://www.google-analytics.com https://*.tiles.mapbox.com https://api.mapbox.com https://events.mapbox.com https://admgstaging.nasa-impact.net/api/unpublished_drafts", }, }, }, diff --git a/package.json b/package.json index 69818d241..8f3cf39db 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "@reach/combobox": "^0.18.0", "@reach/disclosure": "^0.17.0", "@reach/listbox": "^0.17.0", + "@reach/tooltip": "^0.18.0", "@reach/visually-hidden": "^0.17.0", "@turf/area": "^6.5.0", "@turf/bbox": "^6.5.0", @@ -35,11 +36,11 @@ "gatsby-plugin-image": "^2.8.1", "gatsby-plugin-manifest": "^4.8.1", "gatsby-plugin-offline": "^5.8.1", + "gatsby-plugin-postcss": "5.10.0", "gatsby-plugin-react-helmet": "^5.8.0", "gatsby-plugin-sharp": "^4.8.1", "gatsby-plugin-styled-components": "^5.8.0", "gatsby-plugin-typography": "^4.8.0", - "gatsby-plugin-postcss": "5.10.0", "gatsby-source-filesystem": "^4.8.1", "gatsby-transformer-json": "^4.8.0", "gatsby-transformer-sharp": "^4.8.0", @@ -78,9 +79,9 @@ "eslint": "^8.10.0", "eslint-config-prettier": "^8.4.0", "eslint-config-react-app": "^7.0.0", - "eslint-plugin-playwright": "0.12.0", "eslint-plugin-inclusive-language": "^2.2.0", "eslint-plugin-jest": "^26.1.1", + "eslint-plugin-playwright": "0.12.0", "eslint-plugin-prettier": "^4.0.0", "eslint-plugin-react": "^7.29.2", "eslint-plugin-react-hooks": "^4.3.0", @@ -89,10 +90,10 @@ "identity-obj-proxy": "^3.0.0", "jest": "^27.5.1", "jest-styled-components": "^7.0.8", + "postcss": "8.4.23", "prettier": "^2.5.1", "react-test-renderer": "^17.0.1", - "start-server-and-test": "^1.14.0", - "postcss": "8.4.23" + "start-server-and-test": "^1.14.0" }, "license": "MIT", "scripts": { @@ -127,4 +128,4 @@ "overrides": { "playwright": "1.31.2" } -} \ No newline at end of file +} diff --git a/playwright/e2e/campaign.spec.ts b/playwright/e2e/campaign.spec.ts index 5b7e0823e..2e95158fc 100644 --- a/playwright/e2e/campaign.spec.ts +++ b/playwright/e2e/campaign.spec.ts @@ -1,58 +1,63 @@ -const { test, expect } = require('@playwright/test'); +const { test, expect } = require("@playwright/test") import config from "../playwright.config" const baseUrl = config.use?.baseURL -test.describe('Campaign', () => { - let page; - - test.beforeAll(async ({ browser }) => { - page = await browser.newPage(); - await page.goto(baseUrl + '/campaign/OLYMPEX'); - }); - - test('provides information on the campaign', async () => { - - await expect(page.locator('[data-cy=campaign-hero] h1')).toBeVisible(); - await expect(page.locator('[data-cy=campaign-hero-header]')).toHaveCount(1); - - const statsItems = await page.locator('[data-cy=campaign-hero] [data-cy=stats] dd'); - await expect(statsItems).toHaveCount(3); - await expect(statsItems.nth(0)).toContainText('Deployment'); - await expect(statsItems.nth(1)).toContainText('Collection Periods'); - await expect(statsItems.nth(2)).toContainText('Data Products'); - - const statsValues = await page.locator('[data-cy=campaign-hero] [data-cy=stats] dt'); - await expect(statsValues).toHaveCount(3); - await expect(statsValues.nth(0)).toContainText('1'); - await expect(statsValues.nth(1)).toContainText('713'); - await expect(statsValues.nth(2)).toBeVisible(); - - await expect(page.locator('[data-cy=mapboxgl-map]')).toBeVisible(); - - const inpageNavItems = await page.locator('[data-cy=inpage-nav] a'); - await expect(inpageNavItems).toHaveCount(7); - await expect(inpageNavItems.nth(0)).toBeVisible(); - await expect(inpageNavItems.nth(1)).toContainText('Overview'); - await expect(inpageNavItems.nth(2)).toContainText('Focus'); - await expect(inpageNavItems.nth(3)).toContainText('Platforms & Instruments'); - await expect(inpageNavItems.nth(4)).toContainText('Timeline'); - await expect(inpageNavItems.nth(5)).toContainText('Data'); - await expect(inpageNavItems.nth(6)).toContainText('Program Info'); - - const sectionIds = ['program-info', 'platform', 'overview', 'timeline', 'focus']; - - for (const id of sectionIds) { - await page.locator(`[data-cy=${id}-inpage-link]`).click(); - await expect(page.url()).toContain(id); - - // TODO: figure out how to properly test the inpage scroll - await expect(page.locator(`[data-cy=${id}-section] h2`)).toBeVisible(); - } - - - - }); - - // ... additional test may need to be added to cover any changes made to this format page, such as search capability - -}); +test.describe("Campaign", () => { + let page + + test.beforeAll(async ({ browser }) => { + page = await browser.newPage() + await page.goto(baseUrl + "/campaign/OLYMPEX") + }) + + test("provides information on the campaign", async () => { + await expect(page.locator("[data-cy=campaign-hero] h1")).toBeVisible() + await expect(page.locator("[data-cy=campaign-hero-header]")).toHaveCount(1) + + const statsItems = await page.locator( + "[data-cy=campaign-hero] [data-cy=stats] dd" + ) + await expect(statsItems).toHaveCount(3) + await expect(statsItems.nth(0)).toContainText("Deployment") + await expect(statsItems.nth(1)).toContainText("Platforms") + await expect(statsItems.nth(2)).toContainText("Data Products") + + const statsValues = await page.locator( + "[data-cy=campaign-hero] [data-cy=stats] dt" + ) + await expect(statsValues).toHaveCount(3) + await expect(statsValues.nth(0)).toContainText("1") + await expect(statsValues.nth(1)).toContainText("8") + await expect(statsValues.nth(2)).toBeVisible() + + await expect(page.locator("[data-cy=mapboxgl-map]")).toBeVisible() + + const inpageNavItems = await page.locator("[data-cy=inpage-nav] a") + await expect(inpageNavItems).toHaveCount(7) + await expect(inpageNavItems.nth(0)).toBeVisible() + await expect(inpageNavItems.nth(1)).toContainText("Overview") + await expect(inpageNavItems.nth(2)).toContainText("Focus") + await expect(inpageNavItems.nth(3)).toContainText("Platforms & Instruments") + await expect(inpageNavItems.nth(4)).toContainText("Timeline") + await expect(inpageNavItems.nth(5)).toContainText("Data") + await expect(inpageNavItems.nth(6)).toContainText("Program Info") + + const sectionIds = [ + "program-info", + "platform", + "overview", + "timeline", + "focus", + ] + + for (const id of sectionIds) { + await page.locator(`[data-cy=${id}-inpage-link]`).click() + await expect(page.url()).toContain(id) + + // TODO: figure out how to properly test the inpage scroll + await expect(page.locator(`[data-cy=${id}-section] h2`)).toBeVisible() + } + }) + + // ... additional test may need to be added to cover any changes made to this format page, such as search capability +}) diff --git a/playwright/e2e/contact.spec.ts b/playwright/e2e/contact.spec.ts index 2ec0fffb2..c2a59e00f 100644 --- a/playwright/e2e/contact.spec.ts +++ b/playwright/e2e/contact.spec.ts @@ -1,35 +1,33 @@ -const { chromium } = require("@playwright/test"); -const { test, expect } = require('@playwright/test'); +const { chromium } = require("@playwright/test") +const { test, expect } = require("@playwright/test") import config from "../playwright.config" const baseUrl = config.use?.baseURL test.describe("Contact", () => { - - let browser, page; - - test.beforeAll(async ({ browser }) => { - - page = await browser.newPage(); - await page.goto(baseUrl); - }); - - test.afterAll(async (browser) => { - browser = await chromium.launch(); - await browser.close(); - }); - - test.beforeEach(async (browser) => { - browser = await chromium.launch(); - page = await browser.newPage(); - await page.goto(baseUrl + "/contact"); - }); - - test.afterEach(async () => { - await page.close(); - }); - - test("renders correctly", async () => { - await page.waitForSelector("main h1:text('feedback')"); - await page.waitForSelector("main p:text('NASA inventory')"); - }); -}); + let browser, page + + test.beforeAll(async ({ browser }) => { + page = await browser.newPage() + await page.goto(baseUrl) + }) + + test.afterAll(async browser => { + browser = await chromium.launch() + await browser.close() + }) + + test.beforeEach(async browser => { + browser = await chromium.launch() + page = await browser.newPage() + await page.goto(baseUrl + "/contact") + }) + + test.afterEach(async () => { + await page.close() + }) + + test("renders correctly", async () => { + await page.waitForSelector("main h1:text('feedback')") + await page.waitForSelector("main p:text('NASA CASEI inventory')") + }) +}) diff --git a/playwright/e2e/platform.spec.ts b/playwright/e2e/platform.spec.ts index bb0047c48..9b1c3c19a 100644 --- a/playwright/e2e/platform.spec.ts +++ b/playwright/e2e/platform.spec.ts @@ -1,112 +1,125 @@ -const { test, expect } = require('@playwright/test'); -import config from "../playwright.config"; -const baseUrl = config.use?.baseURL; +const { test, expect } = require("@playwright/test") +import config from "../playwright.config" +const baseUrl = config.use?.baseURL test.describe("Platform", () => { - - let page; - - test.beforeAll(async ({ browser }) => { - page = await browser.newPage(); - await page.goto(baseUrl); - }); - - test.beforeEach(async ({ page }) => { - await page.goto(`${baseUrl}/platform/DC-8`); - }); - - test("explains the platform", async ({ page }) => { - await page.waitForSelector("[data-cy=platform-hero]"); - const platformHero = await page.$("[data-cy=platform-hero]"); - - // Check platform name - const platformName = await platformHero.$eval("h1", el => el.textContent); - expect(platformName).toContain("Douglas DC-8"); - - // Check platform image - const platformImage = await platformHero.$("img"); - expect(platformImage).toBeTruthy(); - expect(await platformImage.isVisible()).toBeTruthy(); - - // Check platform stats - const statsList = await platformHero.$("[data-cy=stats]"); - const statsItems = await statsList.$$("dd"); - expect(statsItems.length).toBe(2); - expect(await statsItems[0].textContent()).toContain("Campaigns"); - expect(await statsItems[1].textContent()).toContain("Collection Periods"); - - // Check inpage nav - const inpageNav = await page.$("[data-cy=inpage-nav]"); - const inpageNavLinks = await inpageNav.$$("a"); - expect(inpageNavLinks.length).toBe(4); - expect(await inpageNavLinks[0].isVisible()).toBeTruthy(); - expect(await inpageNavLinks[1].textContent()).toContain("Overview"); - expect(await inpageNavLinks[2].textContent()).toContain( - "Related Campaigns & Instruments" - ); - expect(await inpageNavLinks[3].textContent()).toContain("Data"); - - // Check overview section - const overviewSection = await page.$("[data-cy=overview-section]"); - expect(await overviewSection.isVisible()).toBeTruthy(); - expect(await overviewSection.$eval("h2", el => el.textContent)).toContain( - "Overview" - ); - expect(await overviewSection.$eval("h3", el => el.textContent)).toContain( - "Overview" - ); - const linkList = await overviewSection.$("[data-cy=link-list]"); - const linkListItems = await linkList.$$("li"); - expect(linkListItems.length).toBeGreaterThanOrEqual(0); - expect(await overviewSection.$("p")).toBeTruthy(); - - // Check data section - const dataSection = await page.$("[data-cy=data-section]"); - expect(await dataSection.isVisible()).toBeTruthy(); - expect(await dataSection.$eval("h2", el => el.textContent)).toContain( - "Data Products" - ); - const dataProducts = await dataSection.$$("[data-cy=data-product]"); // returns a list of elementHandles - - expect(await dataProducts).toHaveLength(dataProducts.length); - - const doiLabel = dataProducts[0].$("[data-cy=doi-label]"); - const doiLink = dataProducts[0].$("[data-cy=doi-link]"); - expect(doiLabel).toBeTruthy(); - expect(doiLink).toBeTruthy(); - const campaignsLabel = await dataProducts[0].$( - "[data-cy=doi-campaign-label]" - ); - const instrumentsLabel = await dataProducts[0].$( - "[data-cy=doi-instrument-label]" - ); - expect(campaignsLabel).toBeTruthy(); - expect(await campaignsLabel.textContent()).toContain("Campaigns"); - expect(instrumentsLabel).toBeTruthy(); - expect(await instrumentsLabel.textContent()).toContain("Instruments"); - - await page.waitForSelector("[data-cy=campaigns-instruments-section] h2", { visible: true }); - expect(await page.$eval("[data-cy=campaigns-instruments-section] h2", el => el.textContent)).toContain("Related Campaigns & Instruments"); - - await page.waitForSelector("[data-cy=campaign-carousel] .slider"); - await page.waitForSelector("[data-cy=campaigns-card]"); - await page.click("[data-cy=campaigns-card]:first-child"); - await page.waitForURL(/campaign/); - await page.goBack(); - - await page.waitForSelector("[data-cy=campaign-carousel] .slider-control-centerright > button"); - - await page.waitForSelector("[data-cy=instrument-accordion]", { visible: true }); - await page.click("[data-cy=instrument-accordion] [data-cy=accordion-button]:first-child"); - await page.waitForSelector("[data-cy=instrument-accordion-content] [data-cy=instrument-accordion-image-description]"); - await page.waitForSelector("[data-cy=accordion-measurements-label]"); - await page.waitForSelector("[data-cy=accordion-link]"); - await Promise.all([ - page.waitForNavigation(), - page.click("[data-cy=accordion-link]:first-child") - ]); - expect(page.url()).toContain("instrument"); - await page.goBack(); - }); -}); - + let page + + test.beforeAll(async ({ browser }) => { + page = await browser.newPage() + await page.goto(baseUrl) + }) + + test.beforeEach(async ({ page }) => { + await page.goto(`${baseUrl}/platform/DC-8`) + }) + + test("explains the platform", async ({ page }) => { + await page.waitForSelector("[data-cy=platform-hero]") + const platformHero = await page.$("[data-cy=platform-hero]") + + // Check platform name + const platformName = await platformHero.$eval("h1", el => el.textContent) + expect(platformName).toContain("Douglas DC-8") + + // Check platform image + const platformImage = await platformHero.$("img") + expect(platformImage).toBeTruthy() + expect(await platformImage.isVisible()).toBeTruthy() + + // Check platform stats + const statsList = await platformHero.$("[data-cy=stats]") + const statsItems = await statsList.$$("dd") + expect(statsItems.length).toBe(2) + expect(await statsItems[0].textContent()).toContain("Campaigns") + expect(await statsItems[1].textContent()).toContain("Data Products") + + // Check inpage nav + const inpageNav = await page.$("[data-cy=inpage-nav]") + const inpageNavLinks = await inpageNav.$$("a") + expect(inpageNavLinks.length).toBe(4) + expect(await inpageNavLinks[0].isVisible()).toBeTruthy() + expect(await inpageNavLinks[1].textContent()).toContain("Overview") + expect(await inpageNavLinks[2].textContent()).toContain( + "Related Campaigns & Instruments" + ) + expect(await inpageNavLinks[3].textContent()).toContain("Data") + + // Check overview section + const overviewSection = await page.$("[data-cy=overview-section]") + expect(await overviewSection.isVisible()).toBeTruthy() + expect(await overviewSection.$eval("h2", el => el.textContent)).toContain( + "Overview" + ) + expect(await overviewSection.$eval("h3", el => el.textContent)).toContain( + "Overview" + ) + const linkList = await overviewSection.$("[data-cy=link-list]") + const linkListItems = await linkList.$$("li") + expect(linkListItems.length).toBeGreaterThanOrEqual(0) + expect(await overviewSection.$("p")).toBeTruthy() + + // Check data section + const dataSection = await page.$("[data-cy=data-section]") + expect(await dataSection.isVisible()).toBeTruthy() + expect(await dataSection.$eval("h2", el => el.textContent)).toContain( + "Data Products" + ) + const dataProducts = await dataSection.$$("[data-cy=data-product]") // returns a list of elementHandles + + expect(await dataProducts).toHaveLength(dataProducts.length) + + const doiLabel = dataProducts[0].$("[data-cy=doi-label]") + const doiLink = dataProducts[0].$("[data-cy=doi-link]") + expect(doiLabel).toBeTruthy() + expect(doiLink).toBeTruthy() + const campaignsLabel = await dataProducts[0].$( + "[data-cy=doi-campaign-label]" + ) + const instrumentsLabel = await dataProducts[0].$( + "[data-cy=doi-instrument-label]" + ) + expect(campaignsLabel).toBeTruthy() + expect(await campaignsLabel.textContent()).toContain("Campaigns") + expect(instrumentsLabel).toBeTruthy() + expect(await instrumentsLabel.textContent()).toContain("Instruments") + + await page.waitForSelector("[data-cy=campaigns-instruments-section] h2", { + visible: true, + }) + expect( + await page.$eval( + "[data-cy=campaigns-instruments-section] h2", + el => el.textContent + ) + ).toContain("Related Campaigns & Instruments") + + await page.waitForSelector("[data-cy=campaign-carousel] .slider") + await page.waitForSelector("[data-cy=campaigns-card]") + await page.click("[data-cy=campaigns-card]:first-child") + await page.waitForURL(/campaign/) + await page.goBack() + + await page.waitForSelector( + "[data-cy=campaign-carousel] .slider-control-centerright > button" + ) + + await page.waitForSelector("[data-cy=instrument-accordion]", { + visible: true, + }) + await page.click( + "[data-cy=instrument-accordion] [data-cy=accordion-button]:first-child" + ) + await page.waitForSelector( + "[data-cy=instrument-accordion-content] [data-cy=instrument-accordion-image-description]" + ) + await page.waitForSelector("[data-cy=accordion-measurements-label]") + await page.waitForSelector("[data-cy=accordion-link]") + await Promise.all([ + page.waitForNavigation(), + page.click("[data-cy=accordion-link]:first-child"), + ]) + expect(page.url()).toContain("instrument") + await page.goBack() + }) +}) diff --git a/src/components/__tests__/__snapshots__/data-section.test.js.snap b/src/components/__tests__/__snapshots__/data-section.test.js.snap index c650d32af..2d16a6dd7 100644 --- a/src/components/__tests__/__snapshots__/data-section.test.js.snap +++ b/src/components/__tests__/__snapshots__/data-section.test.js.snap @@ -32,8 +32,10 @@ exports[`Data Section matches snapshot 1`] = ` by specific campaigns - or + , platforms + , or + formats .
Filter data products from this {category} by specific{" "} - {filter1} or {filter2}. + {filter1}, {filter2}, or {filter3}.
- {doi.platforms.map((item, idx) => {
- if (idx < linkLimit) {
- const spacer =
- idx < Math.min(doi.platforms.length, linkLimit) - 1
- ? ", "
- : ""
- return (
-
-
- {item.shortname + spacer}
-
-
- )
- }
- })}
+ {doi.platforms.length ? (
+ doi.platforms.map((item, idx) => {
+ if (idx < linkLimit) {
+ const spacer =
+ idx < Math.min(doi.platforms.length, linkLimit) - 1
+ ? ", "
+ : ""
+ return (
+
+
+ {item.shortname + spacer}
+
+
+ )
+ }
+ })
+ ) : (
+ |
- {doi.instruments.map((item, idx) => {
- if (idx < linkLimit) {
- const spacer =
- idx < Math.min(doi.instruments.length, linkLimit) - 1
- ? ", "
- : ""
- return (
-
-
- {item.shortname + spacer}
-
-
- )
- }
- })}
+ {doi.instruments.length ? (
+ doi.instruments.map((item, idx) => {
+ if (idx < linkLimit) {
+ const spacer =
+ idx <
+ Math.min(doi.instruments.length, linkLimit) - 1
+ ? ", "
+ : ""
+ return (
+
+
+ {item.shortname + spacer}
+
+
+ )
+ }
+ })
+ ) : (
+ - {shortname} is a comprehensive inventory containing information - about all airborne and field campaigns as well as aircrafts, - instruments, and data products. + {`CASEI is a comprehensive inventory of holistic contextual + information for NASA's Earth Science airborne and field campaigns, + including details on instruments, aircraft and other platforms, and + access to data products.`} diff --git a/src/components/layout/section.js b/src/components/layout/section.js index 411d6c1d2..b24a7078e 100644 --- a/src/components/layout/section.js +++ b/src/components/layout/section.js @@ -59,7 +59,8 @@ export const SectionContent = styled.div` withBackground ? colors[mode].background : null}; max-width: 100%; min-height: ${({ minHeight }) => (minHeight ? minHeight : null)}; - padding: ${({ withPadding }) => (withPadding ? `5rem` : null)}; + padding: ${({ withPadding, slimPadding }) => + slimPadding ? `2rem 3rem` : withPadding ? `5rem` : null}; > *, h3 { diff --git a/src/components/map/geojson-source.js b/src/components/map/geojson-source.js index 45bd72e89..97df94175 100644 --- a/src/components/map/geojson-source.js +++ b/src/components/map/geojson-source.js @@ -2,7 +2,13 @@ import React, { useEffect, useState } from "react" import PropTypes from "prop-types" // GeoJsonSource component -export default function GeoJsonSource({ geojson, id, map, children }) { +export default function GeoJsonSource({ + geojson, + id, + map, + children, + isDrawing, +}) { const [source, setSource] = useState(null) // Effect to handle component unmounting @@ -10,7 +16,9 @@ export default function GeoJsonSource({ geojson, id, map, children }) { // Clean up function to remove source from map when the component is unmounted return () => { // TODO Error: Source "explore-source" cannot be removed while layer "explore-hover-layer" is using it. - map.removeSource(`${id}-source`) + if (isDrawing) { + map.removeSource(`${id}-source`) + } } }, []) @@ -57,4 +65,5 @@ GeoJsonSource.propTypes = { PropTypes.element, PropTypes.arrayOf(PropTypes.element), ]), + isDrawing: PropTypes.bool, } diff --git a/src/components/map/hover-layer.js b/src/components/map/hover-layer.js index 77b412a0e..4024a753e 100644 --- a/src/components/map/hover-layer.js +++ b/src/components/map/hover-layer.js @@ -54,7 +54,7 @@ export default function HoverLayer({ id, map, sourceId, isDrawing }) { id: `${id}-hover-layer`, type: "fill", source: sourceId, - layout: {}, + layout: { visibility: isDrawing ? "visible" : "none" }, // control visibility here}, paint: { "fill-color": colors[POSITIVE].linkText, "fill-opacity": [ diff --git a/src/components/no-results-message.js b/src/components/no-results-message.js index 73bcb63ea..5ce47612b 100644 --- a/src/components/no-results-message.js +++ b/src/components/no-results-message.js @@ -1,4 +1,7 @@ +import { Link } from "gatsby" import React from "react" +import { colors } from "../theme" +import { NEGATIVE } from "../utils/constants" export const NoResultsMessage = () => ( (
`}
>
No results found in the CASEI metadata inventory—yet!-- We are constantly adding curated metadata to the inventory, so please - check back soon! - + + We are constantly adding curated metadata to the inventory, so please + check back soon! + +Search Tips
|