diff --git a/CHANGELOG.md b/CHANGELOG.md index 61cdd7b4..f6ff1d34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,15 +1,20 @@ # CHANGE LOG -## [Prerelease] +## [0.18.8] + +- Add survey banner to Landing, Collection, Edition, Work, and Search pages ## [0.18.7] + - Fix header when banner is up ## [0.18.6] + - Add submit feedback error handling and new fields - Fix docker file and playwright tests ## [0.18.5] + - Make NYPL footer sticky ## [0.18.4] diff --git a/package-lock.json b/package-lock.json index 9c21abc1..bf850c5c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sfr-bookfinder-front-end", - "version": "0.18.7", + "version": "0.18.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "sfr-bookfinder-front-end", - "version": "0.18.4", + "version": "0.18.8", "dependencies": { "@chakra-ui/react": "2.5.4", "@newrelic/next": "0.10.0", @@ -18,7 +18,7 @@ "extract-loader": "^5.1.0", "file-loader": "^6.2.0", "focus-trap-react": "^10.0.0", - "newrelic": "^12.5.0", + "newrelic": "12.5.0", "next": "^13.5.6", "next-transpile-modules": "^7.0.0", "react": "^18.2.0", diff --git a/package.json b/package.json index a387b13f..3aee8fcc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sfr-bookfinder-front-end", - "version": "0.18.7", + "version": "0.18.8", "private": true, "scripts": { "dev": "next dev", diff --git a/src/components/Collection/Collection.tsx b/src/components/Collection/Collection.tsx index 82a0abdd..a1b919fc 100644 --- a/src/components/Collection/Collection.tsx +++ b/src/components/Collection/Collection.tsx @@ -29,6 +29,7 @@ import Loading from "~/src/components/Loading/Loading"; import DrbHero from "../DrbHero/DrbHero"; import { CollectionItem } from "./CollectionItem"; import DrbBreakout from "../DrbBreakout/DrbBreakout"; +import SurveyBanner from "../SurveyBanner/SurveyBanner"; const Collection: React.FC<{ collectionQuery: CollectionQuery; @@ -139,6 +140,7 @@ const Collection: React.FC<{ const contentTopElement = ( <> + {`Collection - ${title}`} diff --git a/src/components/EditionDetail/Edition.tsx b/src/components/EditionDetail/Edition.tsx index 441880e7..62e77e08 100644 --- a/src/components/EditionDetail/Edition.tsx +++ b/src/components/EditionDetail/Edition.tsx @@ -26,6 +26,7 @@ import { Instance } from "~/src/types/DataModel"; import { PLACEHOLDER_LINK } from "~/src/constants/collection"; import DrbBreakout from "../DrbBreakout/DrbBreakout"; import AuthorsList from "../AuthorsList/AuthorsList"; +import SurveyBanner from "../SurveyBanner/SurveyBanner"; const Edition: React.FC<{ editionResult: EditionResult; backUrl?: string }> = ( props @@ -81,6 +82,7 @@ const Edition: React.FC<{ editionResult: EditionResult; backUrl?: string }> = ( const contentTopElement = ( <> + {edition && ( = ({ collections, @@ -28,7 +29,7 @@ const LandingPage: React.FC<{ collections?: Opds2Feed }> = ({ Find millions of digital books for research from multiple sources world-wide--all free to read, download, and keep. No library card required. This is an early beta test, so we want your feedback!{" "} - Read more about the project. + Read more about the project. @@ -87,6 +88,7 @@ const LandingPage: React.FC<{ collections?: Opds2Feed }> = ({ const contentPrimaryElement = ( + Recently Added Collections diff --git a/src/components/Search/Search.tsx b/src/components/Search/Search.tsx index 6770f8ef..e48d9248 100644 --- a/src/components/Search/Search.tsx +++ b/src/components/Search/Search.tsx @@ -33,6 +33,7 @@ import TotalWorks from "../TotalWorks/TotalWorks"; import filterFields from "~/src/constants/filters"; import { findFiltersForField } from "~/src/util/SearchQueryUtils"; import DrbBreakout from "../DrbBreakout/DrbBreakout"; +import SurveyBanner from "../SurveyBanner/SurveyBanner"; const SearchResults: React.FC<{ searchQuery: SearchQuery; @@ -263,6 +264,7 @@ const SearchResults: React.FC<{ )} + diff --git a/src/components/SurveyBanner/SurveyBanner.tsx b/src/components/SurveyBanner/SurveyBanner.tsx new file mode 100644 index 00000000..0f82c89a --- /dev/null +++ b/src/components/SurveyBanner/SurveyBanner.tsx @@ -0,0 +1,25 @@ +import React from "react"; +import { Banner, Text } from "@nypl/design-system-react-components"; +import Link from "../Link/Link"; + +const SurveyBanner: React.FC = () => { + return ( + + + Do you use Digital Research Books at the Library? Help us learn + about your experiences by{" "} + + taking a short survey. + + + + } + marginBottom="l" + /> + ); +}; + +export default SurveyBanner; diff --git a/src/components/Work/Work.tsx b/src/components/Work/Work.tsx index b4a1e737..eb250416 100644 --- a/src/components/Work/Work.tsx +++ b/src/components/Work/Work.tsx @@ -25,6 +25,7 @@ import { MAX_TITLE_LENGTH } from "~/src/constants/editioncard"; import { PLACEHOLDER_LINK } from "~/src/constants/collection"; import DrbBreakout from "../DrbBreakout/DrbBreakout"; import AuthorsList from "../AuthorsList/AuthorsList"; +import SurveyBanner from "../SurveyBanner/SurveyBanner"; const WorkDetail: React.FC<{ workResult: WorkResult; backUrl?: string }> = ( props @@ -77,6 +78,7 @@ const WorkDetail: React.FC<{ workResult: WorkResult; backUrl?: string }> = ( const contentTopElement = ( <> + {work.title}