diff --git a/CHANGELOG.md b/CHANGELOG.md index 61cdd7b4..30ca6df8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,14 +2,19 @@ ## [Prerelease] +- 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/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}