Skip to content

Commit

Permalink
Merge branch 'DR-3361/collection-page-layout' into DR-3363/search-res…
Browse files Browse the repository at this point in the history
…ult-card
  • Loading branch information
7emansell committed Jan 29, 2025
2 parents a770219 + 194b8b4 commit c4bb26e
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 15 deletions.
17 changes: 13 additions & 4 deletions app/src/components/pages/collectionPage/collectionPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const textLink = (href, text) => {
textDecorationLine: "underline",
lineHeight: "150%",
textUnderlinePosition: "from-font",
textDecorationThickness: "1px",
}}
href={href}
>
Expand Down Expand Up @@ -61,16 +62,19 @@ const CollectionPage = ({ slug, data }) => {
>
{slug}
</Heading>
<Filters headingText="Refine your results" />
<Filters headingText="Search this collection" />
</Box>
</Box>
<Box
maxWidth="1280px"
mx="auto"
sx={{ paddingLeft: { base: 0, xl: "s" } }}
sx={{
paddingLeft: { base: "m", xl: "s" },
paddingRight: { base: "m", xl: "s" },
}}
>
<HorizontalRule />
<Flex alignContent="center" gap="xs">
<Flex alignContent="center" alignItems="center" gap="xs">
<Text size="subtitle2" sx={{ margin: 0, fontWeight: 400 }}>
Filters applied:
</Text>
Expand Down Expand Up @@ -121,7 +125,12 @@ const CollectionPage = ({ slug, data }) => {
See more collection data
</Link>
</Flex>
<Flex gap="xxl" sx={{ flexDir: { base: "column", md: "row" } }}>
<Flex
gap="xxl"
sx={{
flexDir: { base: "column", md: "row" },
}}
>
<Box
sx={{
background: "ui.bg.default",
Expand Down
5 changes: 4 additions & 1 deletion app/src/components/pages/searchPage/searchPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ const SearchPage = ({ data }) => {
<Box
maxWidth="1280px"
mx="auto"
sx={{ paddingLeft: { base: 0, xl: "s" } }}
sx={{
paddingLeft: { base: "m", xl: "s" },
paddingRight: { base: "m", xl: "s" },
}}
>
<HorizontalRule />
<Flex alignContent="center" gap="xs">
Expand Down
50 changes: 40 additions & 10 deletions app/src/components/search/filters.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import React, { useState } from "react";
import {
Button,
Checkbox,
CheckboxGroup,
Text,
Flex,
Grid,
Heading,
Icon,
MultiSelect,
Radio,
RadioGroup,
TextInput,
Tooltip,
} from "@nypl/design-system-react-components";

Expand All @@ -19,7 +22,6 @@ const exampleFacetCategories = [
"Publishers",
"Division",
"Type",
"Date Range",
];

const exampleMultiSelect = (name: string) => {
Expand Down Expand Up @@ -71,19 +73,46 @@ const Filters = ({ headingText }) => {
</Grid>
{isExpanded && (
<>
<Heading size="heading4">Show only:</Heading>
<CheckboxGroup
<Heading size="heading6">Date range:</Heading>
<Flex gap="s" alignItems="center" marginBottom="m">
<TextInput
width="100px"
id="dateStart"
labelText="Start year"
placeholder="Start year"
showLabel={false}
/>
<Text sx={{ marginBottom: "0" }}> to </Text>
<TextInput
width="100px"
id="dateStart"
labelText="End year"
showLabel={false}
placeholder="End year"
/>
<Button id="date-filter-btn">Apply dates</Button>
</Flex>
<Heading size="heading6">Show only:</Heading>
<RadioGroup
name="show-only-filters"
id="show-only-filters"
labelText="Show Only"
showLabel={false}
layout="row"
marginBottom="m"
>
<Checkbox id="pd-checkbox" labelText="Public domain" />
<Checkbox id="online-checkbox" labelText="Available online" />
<Checkbox
id="onsite-checkbox"
<Radio
id="pd-checkbox"
labelText="Public domain"
value="pd-radio"
/>
<Radio
id="online-radio"
labelText="Available online"
value="online-radio"
/>
<Radio
id="onsite-radio"
labelText={
<Tooltip content="Somethin about on-site materials...missing copy">
<span>
Expand All @@ -96,8 +125,9 @@ const Filters = ({ headingText }) => {
</span>
</Tooltip>
}
value="onsite-radio"
/>
</CheckboxGroup>
</RadioGroup>
</>
)}
<Button
Expand Down

0 comments on commit c4bb26e

Please sign in to comment.