From d94c18a293166ead61017042fc9a8363fb5e4031 Mon Sep 17 00:00:00 2001 From: Janae Hijaz Edwards Date: Wed, 11 Dec 2024 14:14:31 -0500 Subject: [PATCH] feat: including digital art in artwork grid filters (#14964) * adding digital art to medium filters * test fix * rearranging --- src/Apps/Artwork/Utils/createCollectUrl.tsx | 1 + .../MyCollection/Routes/EditArtwork/Utils/categoryOptions.ts | 3 ++- .../Components/Filters/__tests__/Medium.jest.enzyme.tsx | 2 +- src/Components/ArtworkFilter/ArtworkFilters/MediumFilter.tsx | 5 ++++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Apps/Artwork/Utils/createCollectUrl.tsx b/src/Apps/Artwork/Utils/createCollectUrl.tsx index 6e0f5882872..7bf6cc62fbe 100644 --- a/src/Apps/Artwork/Utils/createCollectUrl.tsx +++ b/src/Apps/Artwork/Utils/createCollectUrl.tsx @@ -48,6 +48,7 @@ const filterCategories = { Architecture: "architecture", "Books and Portfolios": "books-and-portfolios", "Design/Decorative Art": "design", + "Digital Art": "digital-art", "Drawing, Collage or other Work on Paper": "work-on-paper", "Fashion Design and Wearable Art": "fashion-design-and-wearable-art", Installation: "installation", diff --git a/src/Apps/MyCollection/Routes/EditArtwork/Utils/categoryOptions.ts b/src/Apps/MyCollection/Routes/EditArtwork/Utils/categoryOptions.ts index 66c25017556..40719fc71da 100644 --- a/src/Apps/MyCollection/Routes/EditArtwork/Utils/categoryOptions.ts +++ b/src/Apps/MyCollection/Routes/EditArtwork/Utils/categoryOptions.ts @@ -22,8 +22,9 @@ export const categoryOptions = [ { text: "Textile Arts", value: "Textile Arts" }, { text: "Posters", value: "Posters" }, { text: "Books and Portfolios", value: "Books and Portfolios" }, - { text: "Other", value: "Other" }, { text: "Ephemera or Merchandise", value: "Ephemera or Merchandise" }, { text: "Reproduction", value: "Reproduction" }, { text: "NFT", value: "NFT" }, + { text: "Digital Art", value: "Digital Art" }, + { text: "Other", value: "Other" }, ] diff --git a/src/Components/Alert/Components/Filters/__tests__/Medium.jest.enzyme.tsx b/src/Components/Alert/Components/Filters/__tests__/Medium.jest.enzyme.tsx index a2175dd6dca..b3a51f07166 100644 --- a/src/Components/Alert/Components/Filters/__tests__/Medium.jest.enzyme.tsx +++ b/src/Components/Alert/Components/Filters/__tests__/Medium.jest.enzyme.tsx @@ -27,7 +27,7 @@ describe("MediumFilter", () => { it("displays all mediums", () => { const wrapper = getWrapper() - expect(wrapper.find("Checkbox").length).toBe(14) + expect(wrapper.find("Checkbox").length).toBe(15) expect(wrapper.html()).toContain("Painting") }) diff --git a/src/Components/ArtworkFilter/ArtworkFilters/MediumFilter.tsx b/src/Components/ArtworkFilter/ArtworkFilters/MediumFilter.tsx index f7b7aec41ac..b756d8988aa 100644 --- a/src/Components/ArtworkFilter/ArtworkFilters/MediumFilter.tsx +++ b/src/Components/ArtworkFilter/ArtworkFilters/MediumFilter.tsx @@ -15,7 +15,9 @@ export interface MediumFilterProps { expanded?: boolean } -export const MediumFilter: FC> = ({ expanded }) => { +export const MediumFilter: FC> = ({ + expanded, +}) => { const { aggregations, counts, setFilter } = useArtworkFilterContext() const { additionalGeneIDs = [], medium } = useCurrentlySelectedFilters() @@ -91,4 +93,5 @@ export const MEDIUM_OPTIONS = [ { value: "performance-art", name: "Performance Art" }, { value: "reproduction", name: "Reproduction" }, { value: "ephemera-or-merchandise", name: "Ephemera or Merchandise" }, + { value: "digital-art", name: "Digital Art" }, ]