From cf2272edb8dfdbc71af4a59f0f2be91a15a17294 Mon Sep 17 00:00:00 2001 From: Mounir Dhahri Date: Thu, 23 Jan 2025 15:35:07 +0100 Subject: [PATCH 1/3] feat: add show only framed works filter --- .../Components/ArtistArtworkFilters.tsx | 6 + .../Components/CollectionArtworksFilter.tsx | 6 + .../SearchResultsArtworksFilters.tsx | 7 ++ src/Components/Alert/AlertProvider.tsx | 3 +- .../ArtworkFilter/ArtworkFilterContext.tsx | 33 ++++-- .../ArtworkFilter/ArtworkFilterTypes.ts | 1 + .../ArtworkFilters/FramedFilter.tsx | 44 +++++++ .../__tests__/FramedFilter.jest.tsx | 108 ++++++++++++++++++ .../ArtworkFilter/ArtworkFilters/index.tsx | 6 + .../ArtworkFilter/Utils/allowedFilters.ts | 2 + .../Utils/__tests__/extractPills.jest.ts | 18 +++ .../SavedSearchAlert/Utils/extractPills.ts | 8 ++ src/Components/SavedSearchAlert/constants.ts | 1 + src/Components/SavedSearchAlert/types.ts | 23 ++-- 14 files changed, 243 insertions(+), 23 deletions(-) create mode 100644 src/Components/ArtworkFilter/ArtworkFilters/FramedFilter.tsx create mode 100644 src/Components/ArtworkFilter/ArtworkFilters/__tests__/FramedFilter.jest.tsx diff --git a/src/Apps/Artist/Routes/WorksForSale/Components/ArtistArtworkFilters.tsx b/src/Apps/Artist/Routes/WorksForSale/Components/ArtistArtworkFilters.tsx index dde0517eca7..6bbdf0f5c00 100644 --- a/src/Apps/Artist/Routes/WorksForSale/Components/ArtistArtworkFilters.tsx +++ b/src/Apps/Artist/Routes/WorksForSale/Components/ArtistArtworkFilters.tsx @@ -6,6 +6,7 @@ import { ArtworkLocationFilter } from "Components/ArtworkFilter/ArtworkFilters/A import { AttributionClassFilter } from "Components/ArtworkFilter/ArtworkFilters/AttributionClassFilter" import { AvailabilityFilter } from "Components/ArtworkFilter/ArtworkFilters/AvailabilityFilter" import { ColorFilter } from "Components/ArtworkFilter/ArtworkFilters/ColorFilter" +import { FramedFilter } from "Components/ArtworkFilter/ArtworkFilters/FramedFilter" import { KeywordFilter } from "Components/ArtworkFilter/ArtworkFilters/KeywordFilter" import { MaterialsFilter } from "Components/ArtworkFilter/ArtworkFilters/MaterialsFilter" import { MediumFilter } from "Components/ArtworkFilter/ArtworkFilters/MediumFilter" @@ -14,6 +15,7 @@ import { PriceRangeFilter } from "Components/ArtworkFilter/ArtworkFilters/PriceR import { SizeFilter } from "Components/ArtworkFilter/ArtworkFilters/SizeFilter" import { TimePeriodFilter } from "Components/ArtworkFilter/ArtworkFilters/TimePeriodFilter" import { WaysToBuyFilter } from "Components/ArtworkFilter/ArtworkFilters/WaysToBuyFilter" +import { useFeatureFlag } from "System/Hooks/useFeatureFlag" import { useSystemContext } from "System/Hooks/useSystemContext" type ArtistArtworkFiltersProps = {} @@ -21,6 +23,9 @@ type ArtistArtworkFiltersProps = {} export const ArtistArtworkFilters: React.FC< React.PropsWithChildren > = props => { + const enableShowOnlyFramedArtworksFilter = useFeatureFlag( + "onyx_only_framed_artworks_filter", + ) const { user } = useSystemContext() return ( @@ -40,6 +45,7 @@ export const ArtistArtworkFilters: React.FC< + {enableShowOnlyFramedArtworksFilter && } ) } diff --git a/src/Apps/Collect/Routes/Collection/Components/CollectionArtworksFilter.tsx b/src/Apps/Collect/Routes/Collection/Components/CollectionArtworksFilter.tsx index 2aed6f9a405..cbc0b43bda4 100644 --- a/src/Apps/Collect/Routes/Collection/Components/CollectionArtworksFilter.tsx +++ b/src/Apps/Collect/Routes/Collection/Components/CollectionArtworksFilter.tsx @@ -11,6 +11,7 @@ import { ArtworkLocationFilter } from "Components/ArtworkFilter/ArtworkFilters/A import { AttributionClassFilter } from "Components/ArtworkFilter/ArtworkFilters/AttributionClassFilter" import { AvailabilityFilter } from "Components/ArtworkFilter/ArtworkFilters/AvailabilityFilter" import { ColorFilter } from "Components/ArtworkFilter/ArtworkFilters/ColorFilter" +import { FramedFilter } from "Components/ArtworkFilter/ArtworkFilters/FramedFilter" import { MaterialsFilter } from "Components/ArtworkFilter/ArtworkFilters/MaterialsFilter" import { MediumFilter } from "Components/ArtworkFilter/ArtworkFilters/MediumFilter" import { PartnersFilter } from "Components/ArtworkFilter/ArtworkFilters/PartnersFilter" @@ -19,6 +20,7 @@ import { SizeFilter } from "Components/ArtworkFilter/ArtworkFilters/SizeFilter" import { TimePeriodFilter } from "Components/ArtworkFilter/ArtworkFilters/TimePeriodFilter" import { WaysToBuyFilter } from "Components/ArtworkFilter/ArtworkFilters/WaysToBuyFilter" import { updateUrl } from "Components/ArtworkFilter/Utils/urlBuilder" +import { useFeatureFlag } from "System/Hooks/useFeatureFlag" import { useRouter } from "System/Hooks/useRouter" import { useSystemContext } from "System/Hooks/useSystemContext" import { __internal__useMatchMedia } from "Utils/Hooks/useMatchMedia" @@ -41,6 +43,9 @@ interface CollectionArtworksFilterProps { export const CollectionArtworksFilter: React.FC< React.PropsWithChildren > = props => { + const enableShowOnlyFramedArtworksFilter = useFeatureFlag( + "onyx_only_framed_artworks_filter", + ) const { relay, collection, aggregations, counts } = props const { slug, query } = collection const isArtistCollection = query?.artistIDs?.length === 1 @@ -64,6 +69,7 @@ export const CollectionArtworksFilter: React.FC< + {enableShowOnlyFramedArtworksFilter && } ) diff --git a/src/Apps/Search/Components/SearchResultsArtworksFilters.tsx b/src/Apps/Search/Components/SearchResultsArtworksFilters.tsx index 394801e773b..71f9b5d8a63 100644 --- a/src/Apps/Search/Components/SearchResultsArtworksFilters.tsx +++ b/src/Apps/Search/Components/SearchResultsArtworksFilters.tsx @@ -5,6 +5,7 @@ import { ArtworkLocationFilter } from "Components/ArtworkFilter/ArtworkFilters/A import { AttributionClassFilter } from "Components/ArtworkFilter/ArtworkFilters/AttributionClassFilter" import { AvailabilityFilter } from "Components/ArtworkFilter/ArtworkFilters/AvailabilityFilter" import { ColorFilter } from "Components/ArtworkFilter/ArtworkFilters/ColorFilter" +import { FramedFilter } from "Components/ArtworkFilter/ArtworkFilters/FramedFilter" import { MaterialsFilter } from "Components/ArtworkFilter/ArtworkFilters/MaterialsFilter" import { MediumFilter } from "Components/ArtworkFilter/ArtworkFilters/MediumFilter" import { PartnersFilter } from "Components/ArtworkFilter/ArtworkFilters/PartnersFilter" @@ -12,8 +13,13 @@ import { PriceRangeFilter } from "Components/ArtworkFilter/ArtworkFilters/PriceR import { SizeFilter } from "Components/ArtworkFilter/ArtworkFilters/SizeFilter" import { TimePeriodFilter } from "Components/ArtworkFilter/ArtworkFilters/TimePeriodFilter" import { WaysToBuyFilter } from "Components/ArtworkFilter/ArtworkFilters/WaysToBuyFilter" +import { useFeatureFlag } from "System/Hooks/useFeatureFlag" export const SearchResultsArtworksFilters = () => { + const enableShowOnlyFramedArtworksFilter = useFeatureFlag( + "onyx_only_framed_artworks_filter", + ) + return ( }> @@ -29,6 +35,7 @@ export const SearchResultsArtworksFilters = () => { + {enableShowOnlyFramedArtworksFilter && } ) } diff --git a/src/Components/Alert/AlertProvider.tsx b/src/Components/Alert/AlertProvider.tsx index 08157bd7d6c..ab38e0ba474 100644 --- a/src/Components/Alert/AlertProvider.tsx +++ b/src/Components/Alert/AlertProvider.tsx @@ -94,11 +94,12 @@ export const AlertProvider: FC> = ({ if (isEditMode || isAlertArtworksView) return const criteria = getAllowedSearchCriteria(initialCriteria ?? {}) - // `forSale` is allowed as a filter criterion, + // `forSale` and `framed` are allowed as a filter criterion, // but NOT as an alert criterion, so we remove it. // (Alerts, by definition, stipulate forSale=true // when they are created in Gravity.) delete criteria.forSale + delete criteria.framed dispatch({ type: "SET_CRITERIA", payload: criteria }) }, [initialCriteria, isEditMode, isAlertArtworksView]) diff --git a/src/Components/ArtworkFilter/ArtworkFilterContext.tsx b/src/Components/ArtworkFilter/ArtworkFilterContext.tsx index a006fa17c3a..4e681dc39bb 100644 --- a/src/Components/ArtworkFilter/ArtworkFilterContext.tsx +++ b/src/Components/ArtworkFilter/ArtworkFilterContext.tsx @@ -15,24 +15,24 @@ import { rangeToTuple } from "./Utils/rangeToTuple" * Initial filter state */ export const initialArtworkFilterState: ArtworkFilters = { - majorPeriods: [], - page: 1, - sizes: [], - sort: "-decayed_merch", + additionalGeneIDs: [], artistIDs: [], + artistNationalities: [], artistSeriesIDs: [], attributionClass: [], - keyword: undefined, - partnerIDs: [], - additionalGeneIDs: [], colors: [], + height: "*-*", + keyword: undefined, locationCities: [], - artistNationalities: [], + majorPeriods: [], materialsTerms: [], - height: "*-*", - width: "*-*", - priceRange: "*-*", metric: DEFAULT_METRIC, + page: 1, + partnerIDs: [], + priceRange: "*-*", + sizes: [], + sort: "-decayed_merch", + width: "*-*", } /** @@ -47,6 +47,7 @@ export enum FilterParamName { attributionClass = "attributionClass", colors = "colors", forSale = "forSale", + framed = "framed", height = "height", keyword = "keyword", locationCities = "locationCities", @@ -138,6 +139,7 @@ export enum SelectedFiltersCountsLabels { attributionClass = "attributionClass", colors = "colors", forSale = "forSale", + framed = "framed", locationCities = "locationCities", materialsTerms = "materialsTerms", medium = "medium", @@ -483,6 +485,7 @@ const artworkFilterReducer = ( "acquireable", "atAuction", "forSale", + "framed", "includeArtworksByFollowedArtists", "inquireableOnly", "offerable", @@ -533,6 +536,7 @@ const artworkFilterReducer = ( "atAuction", "color", "forSale", + "framed", "includeArtworksByFollowedArtists", "inquireableOnly", "offerable", @@ -648,6 +652,13 @@ export const getSelectedFiltersCounts = ( break } + case paramName === FilterParamName.framed: { + if (paramValue) { + counts[paramName] = 1 + } + break + } + default: { counts[paramName] = 1 } diff --git a/src/Components/ArtworkFilter/ArtworkFilterTypes.ts b/src/Components/ArtworkFilter/ArtworkFilterTypes.ts index 336969cd0c1..4e7675de260 100644 --- a/src/Components/ArtworkFilter/ArtworkFilterTypes.ts +++ b/src/Components/ArtworkFilter/ArtworkFilterTypes.ts @@ -26,6 +26,7 @@ export interface ArtworkFilters extends MultiSelectArtworkFilters { atAuction?: boolean color?: string forSale?: boolean + framed?: boolean height?: string includeArtworksByFollowedArtists?: boolean inquireableOnly?: boolean diff --git a/src/Components/ArtworkFilter/ArtworkFilters/FramedFilter.tsx b/src/Components/ArtworkFilter/ArtworkFilters/FramedFilter.tsx new file mode 100644 index 00000000000..b2c8ef8c5d3 --- /dev/null +++ b/src/Components/ArtworkFilter/ArtworkFilters/FramedFilter.tsx @@ -0,0 +1,44 @@ +import { Checkbox } from "@artsy/palette" +import { + SelectedFiltersCountsLabels, + useArtworkFilterContext, + useCurrentlySelectedFilters, +} from "Components/ArtworkFilter/ArtworkFilterContext" +import { FilterExpandable } from "Components/ArtworkFilter/ArtworkFilters/FilterExpandable" +import { useFilterLabelCountByKey } from "Components/ArtworkFilter/Utils/useFilterLabelCountByKey" + +interface FramedFilterProps { + expanded?: boolean +} + +export const FramedFilter: React.FC = ({ expanded }) => { + const { unsetFilter, setFilter } = useArtworkFilterContext() + const currentSelectedFilters = useCurrentlySelectedFilters() + + const filtersCount = useFilterLabelCountByKey( + SelectedFiltersCountsLabels.framed, + ) + const label = `Framed${filtersCount}` + + const isSelected = currentSelectedFilters?.framed + + const handleOnSelect = (selected: boolean) => { + if (selected) { + setFilter("framed", true) + } else { + unsetFilter("framed") + } + } + + return ( + + + Only framed works + + + ) +} diff --git a/src/Components/ArtworkFilter/ArtworkFilters/__tests__/FramedFilter.jest.tsx b/src/Components/ArtworkFilter/ArtworkFilters/__tests__/FramedFilter.jest.tsx new file mode 100644 index 00000000000..a072bdb92b6 --- /dev/null +++ b/src/Components/ArtworkFilter/ArtworkFilters/__tests__/FramedFilter.jest.tsx @@ -0,0 +1,108 @@ +import { screen } from "@testing-library/react" +import userEvent from "@testing-library/user-event" +import { useArtworkFilterContext } from "Components/ArtworkFilter/ArtworkFilterContext" +import { FramedFilter } from "Components/ArtworkFilter/ArtworkFilters/FramedFilter" +import { + createArtworkFilterTestRenderer, + currentArtworkFilterContext, +} from "Components/ArtworkFilter/ArtworkFilters/__tests__/Utils" +import { __internal__useMatchMedia } from "Utils/Hooks/useMatchMedia" +import { useEffect } from "react" + +jest.mock("Utils/Hooks/useMatchMedia") + +const render = createArtworkFilterTestRenderer() + +describe(FramedFilter, () => { + it("renders a toggle", () => { + render() + expect(screen.getByText("Only framed works")).toBeInTheDocument() + }) + + it("updates context on filter change", () => { + render() + expect(currentArtworkFilterContext().filters?.framed).toBeFalsy() + + userEvent.click(screen.getAllByRole("checkbox")[0]) + expect(currentArtworkFilterContext().filters?.framed).toBeTruthy() + + userEvent.click(screen.getAllByRole("checkbox")[0]) + expect(currentArtworkFilterContext().filters?.framed).toBeNull() + }) + + it("clears local input state after Clear All", () => { + render() + userEvent.click(screen.getAllByRole("checkbox")[0]) + expect(currentArtworkFilterContext().filters?.framed).toBeTruthy() + + userEvent.click(screen.getByText("Clear all")) + + expect(currentArtworkFilterContext().filters?.framed).toBeUndefined() + }) + + describe("mobile-specific behavior", () => { + beforeEach(() => { + // Simulate the media query that checks for xs size and returns true + ;(__internal__useMatchMedia as jest.Mock).mockImplementation(() => true) + + /* + * A test component that simulates the usage of + * the FramedFilter inside ArtworkFilterMobileOverlay + */ + const MobileVersionOfFramedFilter = () => { + const filterContext = useArtworkFilterContext() + + // biome-ignore lint/correctness/useExhaustiveDependencies: + useEffect(() => { + // on mount, initialize the staged filters + filterContext.setShouldStageFilterChanges?.(true) + if (filterContext.filters) { + filterContext.setStagedFilters?.(filterContext.filters) + } + }, []) + + return + } + render() + }) + + afterEach(() => { + jest.clearAllMocks() + }) + + it("stages the filter change instead of applying", () => { + expect(currentArtworkFilterContext().filters?.framed).toBeFalsy() + + userEvent.click(screen.getAllByRole("checkbox")[0]) + + expect(currentArtworkFilterContext().filters?.framed).toBeFalsy() + expect(currentArtworkFilterContext().stagedFilters?.framed).toBeTruthy() + }) + + it("displays a filter count inline", () => { + expect(screen.getByText("Framed")).toBeInTheDocument() + expect(screen.queryByText("Framed • 1")).not.toBeInTheDocument() + + userEvent.click(screen.getAllByRole("checkbox")[0]) + + expect(screen.getByText("Framed • 1")).toBeInTheDocument() + }) + }) + + describe("the `expanded` prop", () => { + it("hides the filter controls when not set", () => { + render() + expect(screen.queryAllByRole("checkbox").length).toBe(0) + }) + + it("hides the filter controls when `false`", () => { + render() + expect(screen.queryAllByRole("checkbox").length).toBe(0) + }) + + it("shows the filter controls when `true`", () => { + render() + expect(screen.queryAllByRole("checkbox").length).not.toBe(0) + }) + }) +}) diff --git a/src/Components/ArtworkFilter/ArtworkFilters/index.tsx b/src/Components/ArtworkFilter/ArtworkFilters/index.tsx index 4f825bd9d24..d61ac5a237d 100644 --- a/src/Components/ArtworkFilter/ArtworkFilters/index.tsx +++ b/src/Components/ArtworkFilter/ArtworkFilters/index.tsx @@ -1,6 +1,8 @@ import { Join, Spacer } from "@artsy/palette" import { AvailabilityFilter } from "Components/ArtworkFilter/ArtworkFilters/AvailabilityFilter" +import { FramedFilter } from "Components/ArtworkFilter/ArtworkFilters/FramedFilter" import { KeywordFilter } from "Components/ArtworkFilter/ArtworkFilters/KeywordFilter" +import { useFeatureFlag } from "System/Hooks/useFeatureFlag" import type * as React from "react" import { ArtistNationalityFilter } from "./ArtistNationalityFilter" import { ArtistsFilter } from "./ArtistsFilter" @@ -23,6 +25,9 @@ interface ArtworkFiltersProps { export const ArtworkFilters: React.FC< React.PropsWithChildren > = props => { + const enableShowOnlyFramedArtworksFilter = useFeatureFlag( + "onyx_only_framed_artworks_filter", + ) const { user } = props return ( @@ -41,6 +46,7 @@ export const ArtworkFilters: React.FC< + {enableShowOnlyFramedArtworksFilter && } ) } diff --git a/src/Components/ArtworkFilter/Utils/allowedFilters.ts b/src/Components/ArtworkFilter/Utils/allowedFilters.ts index 74eb2879db0..1da1111a15e 100644 --- a/src/Components/ArtworkFilter/Utils/allowedFilters.ts +++ b/src/Components/ArtworkFilter/Utils/allowedFilters.ts @@ -31,6 +31,7 @@ const BOOLEAN_INPUT_ARGS = [ "acquireable", "atAuction", "forSale", + "framed", "includeArtworksByFollowedArtists", "includeMediumFilterInAggregation", "inquireableOnly", @@ -64,6 +65,7 @@ const SUPPORTED_INPUT_ARGS = [ "extraAggregationGeneIDs", "first", "forSale", + "framed", "geneID", "geneIDs", "height", diff --git a/src/Components/SavedSearchAlert/Utils/__tests__/extractPills.jest.ts b/src/Components/SavedSearchAlert/Utils/__tests__/extractPills.jest.ts index 30d7067d7c1..9d2fbf13f5c 100644 --- a/src/Components/SavedSearchAlert/Utils/__tests__/extractPills.jest.ts +++ b/src/Components/SavedSearchAlert/Utils/__tests__/extractPills.jest.ts @@ -176,6 +176,24 @@ describe("extractPillsFromDefaultCriteria", () => { }, ]) }) + + it("should support framed", () => { + const result = extractPillsFromDefaultCriteria({ + framed: { + displayValue: "Framed", + value: true, + }, + }) + + expect(result).toEqual([ + { + isDefault: true, + displayValue: "Framed", + value: "true", + field: "framed", + }, + ]) + }) }) describe("excludeDefaultCriteria", () => { diff --git a/src/Components/SavedSearchAlert/Utils/extractPills.ts b/src/Components/SavedSearchAlert/Utils/extractPills.ts index 7fbff14f4a0..e0bdf129c92 100644 --- a/src/Components/SavedSearchAlert/Utils/extractPills.ts +++ b/src/Components/SavedSearchAlert/Utils/extractPills.ts @@ -195,6 +195,14 @@ export const extractPillsFromCriteria = ({ } break } + case "framed": { + result = { + field: paramName, + value: paramValue, + displayValue: "Framed", + } + break + } default: { result = null } diff --git a/src/Components/SavedSearchAlert/constants.ts b/src/Components/SavedSearchAlert/constants.ts index a40b1094065..7885e218b5f 100644 --- a/src/Components/SavedSearchAlert/constants.ts +++ b/src/Components/SavedSearchAlert/constants.ts @@ -32,6 +32,7 @@ export const allowedSearchCriteriaKeys = [ "attributionClass", "colors", "forSale", + "framed", "height", "includeArtworksByFollowedArtists", "inquireableOnly", diff --git a/src/Components/SavedSearchAlert/types.ts b/src/Components/SavedSearchAlert/types.ts index c6e6e9d75d7..36489995589 100644 --- a/src/Components/SavedSearchAlert/types.ts +++ b/src/Components/SavedSearchAlert/types.ts @@ -1,26 +1,27 @@ import type { PageOwnerType } from "@artsy/cohesion" export interface SearchCriteriaAttributes { + acquireable?: boolean | null + additionalGeneIDs?: string[] | null artistID?: string | null artistIDs?: string[] - locationCities?: string[] | null - colors?: string[] | null - partnerIDs?: string[] | null - additionalGeneIDs?: string[] | null - attributionClass?: string[] | null artistSeriesIDs?: string[] | null - majorPeriods?: string[] | null - acquireable?: boolean | null atAuction?: boolean | null - inquireableOnly?: boolean | null - offerable?: boolean | null + attributionClass?: string[] | null + colors?: string[] | null dimensionRange?: string | null + forSale?: boolean | null + framed?: boolean | null height?: string | null - width?: string | null + inquireableOnly?: boolean | null + locationCities?: string[] | null + majorPeriods?: string[] | null materialsTerms?: string[] | null + offerable?: boolean | null + partnerIDs?: string[] | null priceRange?: string | null sizes?: string[] | null - forSale?: boolean | null + width?: string | null } export type SearchCriteriaAttributeKeys = keyof SearchCriteriaAttributes From 4b6aed31f101d98ecbff3f31bf005188e52a3d5d Mon Sep 17 00:00:00 2001 From: Mounir Dhahri Date: Thu, 23 Jan 2025 16:03:18 +0100 Subject: [PATCH 2/3] fix: broken tests --- .../ArtworkFilter/Utils/__tests__/urlFragmentFromState.jest.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/ArtworkFilter/Utils/__tests__/urlFragmentFromState.jest.tsx b/src/Components/ArtworkFilter/Utils/__tests__/urlFragmentFromState.jest.tsx index a5ea9efe1e8..bd6737a1312 100644 --- a/src/Components/ArtworkFilter/Utils/__tests__/urlFragmentFromState.jest.tsx +++ b/src/Components/ArtworkFilter/Utils/__tests__/urlFragmentFromState.jest.tsx @@ -12,7 +12,7 @@ describe("urlFragmentFromState", () => { } expect(urlFragmentFromState(artworkFilterState)).toEqual( - "height=300-400&width=500-600&priceRange=100-200", + "height=300-400&priceRange=100-200&width=500-600", ) }) }) From 3279a59c3b1db8788677aaf2857fef69cfe5260d Mon Sep 17 00:00:00 2001 From: Mounir Dhahri Date: Mon, 27 Jan 2025 16:05:43 +0100 Subject: [PATCH 3/3] chore: address review comment --- src/Components/Alert/AlertProvider.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Components/Alert/AlertProvider.tsx b/src/Components/Alert/AlertProvider.tsx index ab38e0ba474..b5fbed62132 100644 --- a/src/Components/Alert/AlertProvider.tsx +++ b/src/Components/Alert/AlertProvider.tsx @@ -99,7 +99,6 @@ export const AlertProvider: FC> = ({ // (Alerts, by definition, stipulate forSale=true // when they are created in Gravity.) delete criteria.forSale - delete criteria.framed dispatch({ type: "SET_CRITERIA", payload: criteria }) }, [initialCriteria, isEditMode, isAlertArtworksView])