Skip to content

Commit

Permalink
feat: including digital art in artwork grid filters (#14964)
Browse files Browse the repository at this point in the history
* adding digital art to medium filters

* test fix

* rearranging
  • Loading branch information
JanaeHijaz authored Dec 11, 2024
1 parent 3fe6c6f commit d94c18a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/Apps/Artwork/Utils/createCollectUrl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
]
Original file line number Diff line number Diff line change
Expand Up @@ -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")
})
Expand Down
5 changes: 4 additions & 1 deletion src/Components/ArtworkFilter/ArtworkFilters/MediumFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ export interface MediumFilterProps {
expanded?: boolean
}

export const MediumFilter: FC<React.PropsWithChildren<MediumFilterProps>> = ({ expanded }) => {
export const MediumFilter: FC<React.PropsWithChildren<MediumFilterProps>> = ({
expanded,
}) => {
const { aggregations, counts, setFilter } = useArtworkFilterContext()
const { additionalGeneIDs = [], medium } = useCurrentlySelectedFilters()

Expand Down Expand Up @@ -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" },
]

0 comments on commit d94c18a

Please sign in to comment.