Skip to content

Commit

Permalink
chore: remove SWA related code (#11523)
Browse files Browse the repository at this point in the history
  • Loading branch information
MounirDhahri authored Feb 10, 2025
1 parent aa8491e commit 7e0b856
Show file tree
Hide file tree
Showing 174 changed files with 129 additions and 9,873 deletions.
6 changes: 3 additions & 3 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -412,14 +412,14 @@
"filename": "src/app/Scenes/MyCollection/Screens/ArtworkForm/MyCollectionArtworkForm.tests.tsx",
"hashed_secret": "67d1be5993e49fbaba0bbd38492c33a2bc007ef7",
"is_verified": false,
"line_number": 626
"line_number": 621
},
{
"type": "Base64 High Entropy String",
"filename": "src/app/Scenes/MyCollection/Screens/ArtworkForm/MyCollectionArtworkForm.tests.tsx",
"hashed_secret": "6414700358f2ae5762917a164e2e30df8783fc4e",
"is_verified": false,
"line_number": 712
"line_number": 707
}
],
"src/app/Scenes/MyCollection/Screens/Insights/SelectArtist.tests.tsx": [
Expand Down Expand Up @@ -1150,5 +1150,5 @@
}
]
},
"generated_at": "2025-01-28T13:31:59Z"
"generated_at": "2025-02-10T11:24:13Z"
}
1 change: 0 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@
<data android:pathPrefix="/collection" />
<data android:pathPrefix="/collections" />
<data android:pathPrefix="/conditions-of-sale" />
<data android:pathPrefix="/consign" />
<data android:pathPrefix="/conversation" />
<data android:pathPrefix="/fair" />
<data android:pathPrefix="/fairs" />
Expand Down
Binary file removed images/SellWithArtsyHeader.webp
Binary file not shown.
Binary file removed images/sell.webp
Binary file not shown.
Binary file removed images/[email protected]
Binary file not shown.
Binary file removed images/[email protected]
Binary file not shown.
Binary file removed images/submit_artwork_complete_submission.webp
Binary file not shown.
Binary file removed images/[email protected]
Binary file not shown.
Binary file removed images/[email protected]
Binary file not shown.
Binary file removed images/submit_artwork_tell_us_about_your_work.webp
Binary file not shown.
Binary file removed images/[email protected]
Binary file not shown.
Binary file removed images/[email protected]
Binary file not shown.
Binary file removed images/submit_artwork_upload_artwork_image.webp
Binary file not shown.
Binary file removed images/[email protected]
Binary file not shown.
Binary file removed images/[email protected]
Binary file not shown.
Binary file removed images/swa-faq-image.webp
Binary file not shown.
Binary file removed images/[email protected]
Binary file not shown.
Binary file removed images/[email protected]
Binary file not shown.
Binary file removed images/swa-landing-page-header.webp
Binary file not shown.
Binary file removed images/[email protected]
Binary file not shown.
Binary file removed images/[email protected]
Binary file not shown.
Binary file removed images/test-webp.webp
Binary file not shown.
Binary file removed images/[email protected]
Binary file not shown.
Binary file removed images/[email protected]
Binary file not shown.
Binary file removed images/ways-we-sell-auction.webp
Binary file not shown.
Binary file removed images/[email protected]
Binary file not shown.
Binary file removed images/[email protected]
Binary file not shown.
Binary file removed images/ways-we-sell-online-storefront.webp
Binary file not shown.
Binary file removed images/[email protected]
Binary file not shown.
Binary file removed images/[email protected]
Binary file not shown.
Binary file removed images/ways-we-sell-private-sales.webp
Binary file not shown.
Binary file removed images/[email protected]
Binary file not shown.
Binary file removed images/[email protected]
Binary file not shown.
4 changes: 2 additions & 2 deletions src/app/Components/ArtistAutosuggest/ArtistAutosuggest.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Box, Input } from "@artsy/palette-mobile"
import SearchIcon from "app/Components/Icons/SearchIcon"
import { ArtworkFormValues } from "app/Scenes/MyCollection/State/MyCollectionArtworkModel"
import { SearchContext, useSearchProviderValues } from "app/Scenes/Search/SearchContext"
import { ArtworkDetailsFormModel } from "app/Scenes/SellWithArtsy/SubmitArtwork/ArtworkDetails/validation"
import { AnimateHeight } from "app/utils/animations/AnimateHeight"
import { useFormikContext } from "formik"
import React, { useEffect, useState } from "react"
Expand All @@ -23,7 +23,7 @@ export const ArtistAutosuggest: React.FC<ArtistAutosuggestProps> = ({
setFieldValue,
errors,
validateField,
} = useFormikContext<ArtworkDetailsFormModel>()
} = useFormikContext<ArtworkFormValues>()
const searchProviderValues = useSearchProviderValues(artist)

const [isArtistSelected, setIsArtistSelected] = useState(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -530,9 +530,6 @@ export const InfiniteScrollMyCollectionArtworksGridContainer = createFragmentCon
blurhash
}
artistNames
consignmentSubmission {
state
}
medium
artist {
targetSupply {
Expand Down
24 changes: 12 additions & 12 deletions src/app/Components/PhotoRow/PhotoRow.tests.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { fireEvent } from "@testing-library/react-native"
import { Photo } from "app/Scenes/SellWithArtsy/SubmitArtwork/UploadPhotos/validation"
import { fireEvent, screen } from "@testing-library/react-native"
import { Photo } from "app/Components/PhotoRow/utils/validation"
import { getMockRelayEnvironment } from "app/system/relay/defaultEnvironment"
import { renderWithWrappers } from "app/utils/tests/renderWithWrappers"
import { RelayEnvironmentProvider } from "react-relay"
Expand All @@ -19,23 +19,23 @@ describe("PhotoRow", () => {
beforeEach(() => mockEnvironment.mockClear())

it("renders photo as a thumbnail", () => {
const { getByTestId } = renderWithWrappers(<TestRenderer />)
expect(getByTestId("Submission_Image")).toBeTruthy()
renderWithWrappers(<TestRenderer />)
expect(screen.getByTestId("Submission_Image")).toBeTruthy()
})

it("renders photo size", () => {
const { getByText } = renderWithWrappers(<TestRenderer />)
expect(getByText("3.3 MB")).toBeTruthy()
renderWithWrappers(<TestRenderer />)
expect(screen.getByText("3.3 MB")).toBeTruthy()
})

it("renders Delete button", () => {
const { getByTestId } = renderWithWrappers(<TestRenderer />)
expect(getByTestId("Submission_Delete_Photo_Button")).toBeTruthy()
renderWithWrappers(<TestRenderer />)
expect(screen.getByTestId("Submission_Delete_Photo_Button")).toBeTruthy()
})

it("fires handlePhotoDelete with correct photo when Delete button pressed", () => {
const { getByTestId } = renderWithWrappers(<TestRenderer />)
const DeleteButton = getByTestId("Submission_Delete_Photo_Button")
renderWithWrappers(<TestRenderer />)
const DeleteButton = screen.getByTestId("Submission_Delete_Photo_Button")

fireEvent.press(DeleteButton)

Expand All @@ -54,8 +54,8 @@ describe("PhotoRow", () => {
beforeEach(() => mockEnvironment.mockClear())

it("renders correct error message", () => {
const { getByText } = renderWithWrappers(<TestRenderer />)
expect(getByText("some error")).toBeTruthy()
renderWithWrappers(<TestRenderer />)
expect(screen.getByText("some error")).toBeTruthy()
})
})
})
Expand Down
2 changes: 1 addition & 1 deletion src/app/Components/PhotoRow/PhotoRow.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Spacer, Flex, ProgressBar, Text, Button } from "@artsy/palette-mobile"
import { Photo } from "app/Scenes/SellWithArtsy/SubmitArtwork/UploadPhotos/validation"
import { Photo } from "app/Components/PhotoRow/utils/validation"
import { PlaceholderBox, ProvidePlaceholderContext } from "app/utils/placeholders"
import { Image } from "react-native"

Expand Down
17 changes: 0 additions & 17 deletions src/app/Navigation/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ import {
MyCollectionScreenQuery,
} from "app/Scenes/MyCollection/MyCollection"
import { AddMyCollectionArtist } from "app/Scenes/MyCollection/Screens/Artist/AddMyCollectionArtist"
import { RequestForPriceEstimateConfirmationScreen } from "app/Scenes/MyCollection/Screens/Artwork/Components/ArtworkInsights/RequestForPriceEstimate/RequestForPriceEstimateConfirmationScreen"
import { RequestForPriceEstimateScreen } from "app/Scenes/MyCollection/Screens/Artwork/Components/ArtworkInsights/RequestForPriceEstimate/RequestForPriceEstimateScreen"
import {
MyCollectionArtworkScreen,
MyCollectionArtworkScreenQuery,
Expand Down Expand Up @@ -941,21 +939,6 @@ export const artsyDotNetRoutes = defineRoutes([
},
queries: [MyCollectionArtworkScreenQuery],
},
{
path: "/my-collection/artwork/:artworkID/price-estimate",
name: "RequestForPriceEstimateScreen",
Component: RequestForPriceEstimateScreen,
},
{
path: "/my-collection/artwork/:artworkID/price-estimate/success",
name: "RequestForPriceEstimateConfirmationScreen",
Component: RequestForPriceEstimateConfirmationScreen,
options: {
screenOptions: {
headerShown: false,
},
},
},
{
path: "/my-collection/artworks/:artworkID/edit",
name: "MyCollectionArtworkEdit",
Expand Down
3 changes: 0 additions & 3 deletions src/app/Scenes/Artwork/Artwork.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -749,9 +749,6 @@ export const ArtworkContainer = createRefetchContainer(
}
}
}
artists(shallow: true) {
isConsignable
}
isEligibleForArtsyGuarantee
}
`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ describe("ArtworkExtraLinks", () => {
artists: [
{
name: "Santa",
isConsignable: true,
},
],
}
Expand All @@ -51,7 +50,6 @@ describe("ArtworkExtraLinks", () => {
artists: [
{
name: "Santa",
isConsignable: true,
},
],
}
Expand Down Expand Up @@ -81,7 +79,6 @@ describe("ArtworkExtraLinks", () => {
artists: [
{
name: "Santa",
isConsignable: false,
},
],
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export const ArtworkExtraLinksFragmentContainer = createFragmentContainer(Artwor
}
}
artists {
isConsignable
name
}
artist {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Spacer, GraphIcon, Text, ArtworkIcon, Flex, Join, IconProps } from "@artsy/palette-mobile"
import { SellWithEaseIcon } from "app/Components/Icons/HomeFeedOnboarding/SellWithEaseIcon"
import { ArtworkIcon, Flex, GraphIcon, IconProps, Join, Spacer, Text } from "@artsy/palette-mobile"
import { ModalCarouselContainer } from "./ModalCarouselContainer"
import { ModalCarouselScreenWrapper } from "./ModalCarouselScreenWrapper"

Expand Down Expand Up @@ -52,16 +51,6 @@ const HowItWorksScreenNew = () => {
text="Get free insights into the markets and careers of the artists in your collection."
icon={GraphIcon}
/>
<Slide
title="Request a Price Estimate"
text="On eligible works, request an estimate from our specialists."
icon={SellWithEaseIcon}
/>
<Slide
title="Sell with Ease"
text="Inquire about sales options directly from My Collection for eligible artworks."
icon={SellWithEaseIcon}
/>
</Join>
</Flex>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export interface MyCollectionImageViewProps {
imageHeight?: number
aspectRatio?: number
artworkSlug: string
artworkSubmissionId?: string | null
useRawURL?: boolean
internalID?: string | null
versions?: string[]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
import { AddIcon, CloseIcon, Flex, Spacer, Touchable, useSpace, Pill } from "@artsy/palette-mobile"
import { AddIcon, CloseIcon, Flex, Pill, Spacer, Touchable, useSpace } from "@artsy/palette-mobile"
import AsyncStorage from "@react-native-async-storage/async-storage"
import { MyCollectionArtworkFilters } from "app/Scenes/MyCollection/Components/MyCollectionArtworkFiltersStickyTab"
import { MyCollectionArtworksKeywordStore } from "app/Scenes/MyCollection/Components/MyCollectionArtworksKeywordStore"
import { HAS_SEEN_MY_COLLECTION_NEW_WORKS_BANNER } from "app/Scenes/MyCollection/MyCollection"
import { MyCollectionArtworkUploadMessages } from "app/Scenes/MyCollection/Screens/ArtworkForm/MyCollectionArtworkUploadMessages"
import {
PurchasedArtworkAddedMessage,
SubmittedArtworkAddedMessage,
} from "app/Scenes/MyCollection/Screens/Insights/MyCollectionMessages"
import { PurchasedArtworkAddedMessage } from "app/Scenes/MyCollection/Screens/Insights/MyCollectionMessages"
import {
CollectedTab,
MyCollectionTabsStore,
} from "app/Scenes/MyCollection/State/MyCollectionTabsStore"
import { Tab } from "app/Scenes/MyProfile/MyProfileHeaderMyCollectionAndSavedWorks"
import { navigate } from "app/system/navigation/navigate"
import { useMeasure } from "app/utils/hooks/useMeasure"
import { setVisualClueAsSeen, useVisualClue } from "app/utils/hooks/useVisualClue"
import { debounce } from "lodash"
import { MotiView } from "moti"
import { useMemo, useRef } from "react"
Expand All @@ -40,9 +36,6 @@ export const MyCollectionStickyHeader: React.FC<MyCollectionStickyHeaderProps> =
showModal,
showNewWorksMessage,
}) => {
const { showVisualClue } = useVisualClue()

const showSubmissionMessage = showVisualClue("ArtworkSubmissionMessage")
const selectedTab = MyCollectionTabsStore.useStoreState((state) => state.selectedTab)

const showArtworkFilters = useMemo(() => {
Expand All @@ -51,11 +44,7 @@ export const MyCollectionStickyHeader: React.FC<MyCollectionStickyHeaderProps> =

return (
<Flex px={2} backgroundColor="white100">
<Messages
showNewWorksMessage={showNewWorksMessage}
showSubmissionMessage={showSubmissionMessage}
hasMarketSignals={hasMarketSignals}
/>
<Messages showNewWorksMessage={showNewWorksMessage} hasMarketSignals={hasMarketSignals} />

<MainStickyHeader hasArtworks={hasArtworks} />

Expand Down Expand Up @@ -260,9 +249,8 @@ const AnimatedPill: React.FC<{
const Messages: React.FC<{
hasMarketSignals: boolean
showNewWorksMessage: boolean
showSubmissionMessage: boolean
}> = ({ hasMarketSignals, showNewWorksMessage, showSubmissionMessage }) => {
if (!hasMarketSignals && !showNewWorksMessage && !showSubmissionMessage) {
}> = ({ hasMarketSignals, showNewWorksMessage }) => {
if (!hasMarketSignals && !showNewWorksMessage) {
return null
}

Expand All @@ -273,11 +261,6 @@ const Messages: React.FC<{
onClose={() => AsyncStorage.setItem(HAS_SEEN_MY_COLLECTION_NEW_WORKS_BANNER, "true")}
/>
)}
{!!showSubmissionMessage && (
<SubmittedArtworkAddedMessage
onClose={() => setVisualClueAsSeen("ArtworkSubmissionMessage")}
/>
)}
<MyCollectionArtworkUploadMessages
sourceTab={Tab.collection}
hasMarketSignals={hasMarketSignals}
Expand Down
3 changes: 0 additions & 3 deletions src/app/Scenes/MyCollection/MyCollection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,6 @@ export const MyCollectionContainer = createPaginationContainer(
_marketPriceInsights: marketPriceInsights {
demandRank
}
consignmentSubmission {
displayText
}
}
}
...InfiniteScrollArtworksGrid_myCollectionConnection @arguments(skipArtworkGridItem: true)
Expand Down
3 changes: 0 additions & 3 deletions src/app/Scenes/MyCollection/MyCollectionArtworks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,6 @@ export const MyCollectionFilterPropsFragment = graphql`
pricePaid {
minor
}
consignmentSubmission {
displayText
}
sizeBucket
width
height
Expand Down
Loading

0 comments on commit 7e0b856

Please sign in to comment.