Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: prepare for 8.59.0 release [do not merge] #11303

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
3295892
fix: safe area insets on add custom artist (#11300)
MounirDhahri Dec 18, 2024
3cb853a
fix: explore artists link on home tab (#11299)
MounirDhahri Dec 18, 2024
ff69180
fix(APPLAUSE-6695174): screen is blocked after complete profile promp…
iskounen Dec 18, 2024
ce49105
fix: input clearing on selecting next field (#11298)
brainbicycle Dec 18, 2024
7e2cfe2
fix(APPLAUSE-6694868): forgot password link does not work in link acc…
iskounen Dec 17, 2024
4de268f
fix: broken image layouts (#11286)
brainbicycle Dec 16, 2024
3db8f3a
fix: invalidate deeplink timeout in new nav #trivial (#11287)
brainbicycle Dec 16, 2024
f90f11a
chore: fix duplicate back button on discover artists (#11301)
MounirDhahri Dec 18, 2024
4cd0789
fix: navigate to the add artist step when starting submission (#11284)
dariakoko Dec 18, 2024
6b24a8a
fix: artwork quiz link back button (#11304)
MounirDhahri Dec 18, 2024
4bf23dc
fix: hide bottom tabs on live auction webview (#11302)
MounirDhahri Dec 18, 2024
465b008
fix: update credit card form validation (#11306)
MrSltun Dec 18, 2024
1d1f97e
fix: restore image fallbacks (#11307)
brainbicycle Dec 18, 2024
b04e407
fix(APPLAUSE-6697021): auth2 back button double tap crash (#11309)
iskounen Dec 18, 2024
02cbb28
chore: fix broken test
MounirDhahri Dec 19, 2024
703f49c
build(deps): bump fastlane deps (#11313)
gkartalis Dec 19, 2024
ad23f07
fix: galleries for you fallback height (#11314)
brainbicycle Dec 19, 2024
3901ea8
fix: gallery placeholder height in case of no image (#11312)
gkartalis Dec 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.1006.0)
aws-sdk-core (3.212.0)
aws-partitions (1.1025.0)
aws-sdk-core (3.214.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.95.0)
aws-sdk-kms (1.96.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.170.1)
aws-sdk-s3 (1.176.1)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
Expand Down Expand Up @@ -119,8 +119,8 @@ GEM
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-multipart (1.1.0)
multipart-post (~> 2.0)
faraday-net_http (1.0.2)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
Expand All @@ -129,7 +129,7 @@ GEM
faraday_middleware (1.2.1)
faraday (~> 1.0)
fastimage (2.3.1)
fastlane (2.225.0)
fastlane (2.226.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
Expand Down Expand Up @@ -169,7 +169,7 @@ GEM
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty (~> 0.4.0)
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
fastlane-plugin-appcenter (2.1.2)
fastlane-plugin-bundletool (1.0.12)
Expand Down Expand Up @@ -226,13 +226,13 @@ GEM
signet (>= 0.16, < 2.a)
highline (2.0.3)
http-2 (0.11.0)
http-cookie (1.0.7)
http-cookie (1.0.8)
domain_name (~> 0.5)
httpclient (2.8.3)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
jmespath (1.6.2)
json (2.8.2)
json (2.9.1)
jwt (2.9.3)
base64
lowdown (1.0.0)
Expand Down Expand Up @@ -260,8 +260,8 @@ GEM
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.3.9)
rouge (2.0.7)
rexml (3.4.0)
rouge (3.28.0)
ruby-macho (2.5.1)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
Expand Down Expand Up @@ -301,8 +301,8 @@ GEM
colored2 (~> 3.1)
nanaimo (~> 0.4.0)
rexml (>= 3.3.6, < 4.0)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty (0.4.0)
rouge (~> 3.28.0)
xcpretty-travis-formatter (1.0.1)
xcpretty (~> 0.2, >= 0.0.7)

Expand Down
4 changes: 2 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2703,7 +2703,7 @@ SPEC CHECKSUMS:
GTMAppAuth: 99fb010047ba3973b7026e45393f51f27ab965ae
GTMSessionFetcher: 0e876eea9782ec6462e91ab872711c357322c94f
hermes-engine: ea92f60f37dba025e293cbe4b4a548fd26b610a0
Interstellar: ab67502af03105f92100a043e178d188a1a437c9
Interstellar: cd0c3290e249b5f156113a4c6c9c09dd0f418aaa
INTUAnimationEngine: 3a7d63738cd51af573d16848a771feedea7cc9f2
iOSSnapshotTestCase: a670511f9ee3829c2b9c23e6e68f315fd7b6790f
ISO8601DateFormatter: 8311a2d4e265b269b2fed7ab4db685dcb0a7ccb2
Expand All @@ -2729,7 +2729,7 @@ SPEC CHECKSUMS:
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
Pulley: edc993fb57f7eb20541c8453d0fce10559f21dac
Quick: ce1276c7c27ba2da3cb2fd0cde053c3648b3b22d
RCT-Folly: 4464f4d875961fce86008d45f4ecf6cef6de0740
RCT-Folly: 34124ae2e667a0e5f0ea378db071d27548124321
RCTDeprecation: 726d24248aeab6d7180dac71a936bbca6a994ed1
RCTRequired: a94e7febda6db0345d207e854323c37e3a31d93b
RCTTypeSafety: 28e24a6e44f5cbf912c66dde6ab7e07d1059a205
Expand Down
19 changes: 9 additions & 10 deletions src/app/Components/Artist/ArtistShows/ArtistShow.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ActionType, ContextModule, OwnerType, TappedShowGroup } from "@artsy/cohesion"
import { Image, Touchable } from "@artsy/palette-mobile"
import { Touchable } from "@artsy/palette-mobile"
import { ArtistShow_show$data, ArtistShow_show$key } from "__generated__/ArtistShow_show.graphql"
import { ImageWithFallback } from "app/Components/ImageWithFallback/ImageWithFallback"
import { navigate } from "app/system/navigation/navigate"
import { useFeatureFlag } from "app/utils/hooks/useFeatureFlag"
import { hrefForPartialShow } from "app/utils/router"
Expand Down Expand Up @@ -41,15 +42,13 @@ export const ArtistShow: React.FC<Props> = ({ styles, show, index, imageDimensio
<Touchable onPress={handleTap} haptic>
<View style={[styles?.container]}>
<View style={[styles?.imageMargin]}>
{!!imageURL && (
<Image
src={imageURL}
width={imageDimensions.width}
height={imageDimensions.height}
blurhash={showBlurhash ? image?.blurhash : undefined}
style={[{ overflow: "hidden", borderRadius: 2, flex: 0 }]}
/>
)}
<ImageWithFallback
src={imageURL}
width={imageDimensions.width}
height={imageDimensions.height}
blurhash={showBlurhash ? image?.blurhash : undefined}
style={[{ overflow: "hidden", borderRadius: 2, flex: 0 }]}
/>
</View>
{/* this wrapper required to make numberOfLines work when parent is a row */}
<View style={{ flex: 1 }}>
Expand Down
4 changes: 3 additions & 1 deletion src/app/Components/ArtsyWebView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,9 @@ export const ArtsyWebView = forwardRef<
// to a different vanityURL that we can handle inapp, such as Fair & Partner.
if (
result.type === "match" &&
["ReactWebView", "ModalWebView", "VanityURLEntity"].includes(result.module)
["ReactWebView", "ModalWebView", "VanityURLEntity", "LiveAuctionWebView"].includes(
result.module
)
) {
if (innerRef.current) {
innerRef.current.shareTitleUrl = targetURL
Expand Down
30 changes: 28 additions & 2 deletions src/app/Components/Bidding/Screens/CreditCardForm.tests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ describe("CreditCardForm", () => {
await waitFor(() => expect(addButton.props.accessibilityState.disabled).toEqual(true))
})

it("is enabled while the form is valid", () => {
it("is enabled while the form is valid", async () => {
const onSubmitMock = jest.fn()

;(createToken as jest.Mock).mockReturnValueOnce(stripeToken)
Expand All @@ -187,7 +187,33 @@ describe("CreditCardForm", () => {

const addButton = screen.getByTestId("credit-card-form-button")

expect(addButton.props.accessibilityState.disabled).toEqual(false)
await waitFor(() => expect(addButton.props.accessibilityState.disabled).toEqual(false))
})

it("is disabled when the form is invalid", async () => {
renderWithWrappers(
<CreditCardForm
onSubmit={onSubmitMock}
navigator={{ pop: () => null } as any}
billingAddress={{
fullName: "mockName",
addressLine1: "mockAddress1",
addressLine2: "mockAddress2",
city: "mockCity",
state: "mockState",
postalCode: "mockPostalCode",
phoneNumber: "mockPhone",
country: { shortName: "US", longName: "United States" },
}}
/>
)

const creditCardField = screen.getByTestId("credit-card-field")
fireEvent.changeText(creditCardField, "4242") // incomplete number

const addButton = screen.getByTestId("credit-card-form-button")

await waitFor(() => expect(addButton.props.accessibilityState.disabled).toEqual(true))
})

it("shows an error when stripe's API returns an error", async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import * as Yup from "yup"

export const creditCardFormValidationSchema = Yup.object().shape({
creditCard: Yup.object().shape({
valid: Yup.boolean().required("Credit card is required"),
valid: Yup.boolean()
.oneOf([true], "Credit card is required")
.required("Credit card is required"),
}),
fullName: Yup.string().required("Name is required"),
addressLine1: Yup.string().required("Address is required"),
Expand Down
23 changes: 23 additions & 0 deletions src/app/Components/ImageWithFallback/ImageWithFallback.tests.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { ImageWithFallback } from "app/Components/ImageWithFallback/ImageWithFallback"
import { renderWithWrappers } from "app/utils/tests/renderWithWrappers"

describe("ImageWithFallback", () => {
it("renders without error", () => {
renderWithWrappers(<ImageWithFallback width={100} height={100} />)
})

it("renders the image when a url is passed", async () => {
const view = renderWithWrappers(
<ImageWithFallback src="https://example.com/image.jpg" width={100} height={100} />
)
const image = await view.findByTestId("image")
expect(image).toBeTruthy()
})

it("renders the fallback when a url is not passed", async () => {
const view = renderWithWrappers(<ImageWithFallback width={100} height={100} />)

const fallbackImage = await view.findByTestId("fallback-image")
expect(fallbackImage).toBeTruthy()
})
})
29 changes: 29 additions & 0 deletions src/app/Components/ImageWithFallback/ImageWithFallback.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { Box, Image, ImageProps } from "@artsy/palette-mobile"

// Extend ImageProps but make `src` optional, require height and width
type ImageWithFallbackProps = Omit<ImageProps, "src"> & {
src?: string | null
height: number
width: number
}

export const ImageWithFallback: React.FC<ImageWithFallbackProps> = ({
src,
width,
height,
...props
}) => {
if (!src) {
return (
<Box
testID="fallback-image"
width={width}
height={height ?? 250}
backgroundColor="black10"
borderRadius="md"
/>
)
}

return <Image testID="image" {...props} src={src} width={width} height={height} />
}
5 changes: 3 additions & 2 deletions src/app/Components/Lists/SavedItemRow.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Spacer, Flex, useColor, Text, Touchable, Image } from "@artsy/palette-mobile"
import { Spacer, Flex, useColor, Text, Touchable } from "@artsy/palette-mobile"
import { ImageWithFallback } from "app/Components/ImageWithFallback/ImageWithFallback"
import { navigate } from "app/system/navigation/navigate"

interface SavedItemRowProps {
Expand Down Expand Up @@ -36,7 +37,7 @@ export const SavedItemRow: React.FC<SavedItemRowProps> = ({
borderRadius={square_image ? 2 : size / 2}
overflow="hidden"
>
{!!imageURL && <Image src={imageURL} width={size} height={size} />}
<ImageWithFallback src={imageURL} width={size} height={size} />
</Flex>
<Spacer x={2} />
<Text variant="sm" weight="medium">
Expand Down
13 changes: 3 additions & 10 deletions src/app/Components/ShowCard.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
import {
Spacer,
Flex,
Text,
Touchable,
SkeletonBox,
SkeletonText,
Image,
} from "@artsy/palette-mobile"
import { Spacer, Flex, Text, Touchable, SkeletonBox, SkeletonText } from "@artsy/palette-mobile"
import { toTitleCase } from "@artsy/to-title-case"
import { ShowCard_show$data } from "__generated__/ShowCard_show.graphql"
import { ImageWithFallback } from "app/Components/ImageWithFallback/ImageWithFallback"
import { navigate } from "app/system/navigation/navigate"
import { compact } from "lodash"
import { GestureResponderEvent, ViewProps } from "react-native"
Expand Down Expand Up @@ -47,7 +40,7 @@ export const ShowCard: React.FC<ShowCardProps> = ({ show, onPress }) => {
<Flex width={WIDTH}>
<Touchable haptic onPress={onTap}>
<Flex width={WIDTH} overflow="hidden">
{!!imageURL && <Image src={imageURL} width={WIDTH} height={HEIGHT} />}
<ImageWithFallback src={imageURL} width={WIDTH} height={HEIGHT} />
<Spacer y={1} />
<Text numberOfLines={2} ellipsizeMode="tail" variant="sm-display" mb={0.5}>
{show.name}
Expand Down
9 changes: 5 additions & 4 deletions src/app/Components/ThreeUpImageLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Box, Image } from "@artsy/palette-mobile"
import { Box } from "@artsy/palette-mobile"
import { ImageWithFallback } from "app/Components/ImageWithFallback/ImageWithFallback"
import styled from "styled-components/native"

interface ThreeUpImageLayoutProps {
Expand All @@ -16,22 +17,22 @@ export const ThreeUpImageLayout: React.FC<ThreeUpImageLayoutProps> = ({ imageURL

return (
<ArtworkImageContainer>
<Image
<ImageWithFallback
testID="image-1"
width={LARGE_IMAGE_SIZE}
height={LARGE_IMAGE_SIZE}
src={artworkImageURLs[0]}
/>
<Division />
<Box>
<Image
<ImageWithFallback
testID="image-2"
width={SMALL_IMAGE_SIZE}
height={SMALL_IMAGE_SIZE}
src={artworkImageURLs[1]}
/>
<Division horizontal />
<Image
<ImageWithFallback
testID="image-3"
width={SMALL_IMAGE_SIZE}
height={SMALL_IMAGE_SIZE}
Expand Down
4 changes: 4 additions & 0 deletions src/app/Navigation/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ export const Navigation = () => {
)
}

if (currentRoute && Platform.OS === "ios") {
LegacyNativeModules.ARTDeeplinkTimeoutModule.invalidateDeeplinkTimeout()
}

addBreadcrumb({
message: `navigated to ${currentRoute?.name}`,
category: "navigation",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ArtQuizResultsEmptyTabsQuery } from "__generated__/ArtQuizResultsEmptyT
import { ArtQuizResultsTabsHeader } from "app/Scenes/ArtQuiz/ArtQuizResults/ArtQuizResultsTabs/ArtQuizResultsTabsHeader"
import { ArtQuizTrendingArtists } from "app/Scenes/ArtQuiz/ArtQuizResults/ArtQuizResultsTabs/ArtQuizTrendingArtists"
import { ArtQuizTrendingCollections } from "app/Scenes/ArtQuiz/ArtQuizResults/ArtQuizResultsTabs/ArtQuizTrendingCollections"
import { navigate } from "app/system/navigation/navigate"
import { popToRoot } from "app/system/navigation/navigate"

import { graphql, useLazyLoadQuery } from "react-relay"

Expand All @@ -19,7 +19,7 @@ export const ArtQuizResultsEmptyTabs = () => {
title="Explore Your Quiz Results"
lazy
headerProps={{
onBack: () => navigate("/"),
onBack: () => popToRoot(),
}}
BelowTitleHeaderComponent={() => (
<Flex mb={1}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ArtQuizExploreArtists } from "app/Scenes/ArtQuiz/ArtQuizResults/ArtQuiz
import { ArtQuizExploreArtworks } from "app/Scenes/ArtQuiz/ArtQuizResults/ArtQuizResultsTabs/ArtQuizExploreArtworks"
import { ArtQuizLikedArtworks } from "app/Scenes/ArtQuiz/ArtQuizResults/ArtQuizResultsTabs/ArtQuizLikedArtworks"
import { ArtQuizResultsTabsHeader } from "app/Scenes/ArtQuiz/ArtQuizResults/ArtQuizResultsTabs/ArtQuizResultsTabsHeader"
import { navigate } from "app/system/navigation/navigate"
import { popToRoot } from "app/system/navigation/navigate"
import React, { useState } from "react"
import { graphql, useFragment } from "react-relay"

Expand All @@ -26,7 +26,7 @@ export const ArtQuizResultsTabs = ({ me }: { me: ArtQuizResultsQuery$data["me"]
title={title}
lazy
headerProps={{
onBack: () => navigate("/"),
onBack: () => popToRoot(),
}}
onTabChange={({ tabName }) => {
setActiveTab(tabName as TabName)
Expand Down
Loading
Loading