Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 2 additions & 5 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"appName": "eigen",
"version": "9.13.0",
"version": "9.14.0",
"slug": "eigen",
"expo": {
"buildCacheProvider": {
Expand All @@ -14,10 +14,7 @@
}
}
},
"platforms": [
"ios",
"android"
],
"platforms": ["ios", "android"],
"runtimeVersion": "2c6a148974d40bab8d3796d7b69c5f0208b08478",
"owner": "artsy_org",
"extra": {
Expand Down
128 changes: 128 additions & 0 deletions data/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -2688,6 +2688,16 @@ type Artist implements EntityWithFilterArtworksConnectionInterface & Node & Sear
]
): [ArtistInsight!]!

"""
Instagram media for display on an artist page.
"""
instagramMedia(
"""
The number of media items to return.
"""
first: Int
): [ArtistInstagramMedia]

"""
A type-specific ID likely used as a database ID.
"""
Expand Down Expand Up @@ -3023,6 +3033,13 @@ type ArtistInsightsCount {
soloShowCount: Int!
}

type ArtistInstagramMedia {
caption: String
image: Image
internalID: String
permalink: String
}

type ArtistMeta {
description: String!
title: String!
Expand Down Expand Up @@ -18864,9 +18881,42 @@ type FeatureFlag {
variants: [FeatureFlagVariantType]
}

type FeatureFlagConstraint {
caseInsensitive: Boolean
contextName: String
inverted: Boolean
operator: String

"""
The Partners referenced by this constraint's values, resolved when contextName is `partnerId`
"""
partnerConnection(after: String, before: String, first: Int, last: Int): PartnerConnection
value: String
values: [String]
}

type FeatureFlagEnvironments {
enabled: Boolean!
name: String!
strategies: [FeatureFlagStrategy]
}

type FeatureFlagSegment {
constraints: [FeatureFlagConstraint]
description: String
internalID: Int
name: String
}

type FeatureFlagStrategy {
constraints: [FeatureFlagConstraint]
name: String
parameters: JSON

"""
Constraints applied to this strategy via a reusable, named Unleash segment (as opposed to inline constraints)
"""
segments: [FeatureFlagSegment]
}

input FeatureFlagStrategyInput {
Expand Down Expand Up @@ -27022,12 +27072,50 @@ type OfferResponse {
}

type OfferableActivity {
"""
Details of the collectors with eligible offerable activities.
"""
collectors: [OfferableActivityCollector]

"""
Count of collectors with eligible offerable activities.
"""
totalCount: Int
}

"""
A collector with eligible offerable activity on the artwork, and how they engaged with it.
"""
type OfferableActivityCollector {
confirmedBuyerAt(
format: String

"""
A tz database time zone, otherwise falls back to "X-TIMEZONE" header. See http://www.iana.org/time-zones, https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
"""
timezone: String
): String
firstNameLastInitial: String
icon: Image

"""
A globally unique ID.
"""
id: ID!

"""
A type-specific ID likely used as a database ID.
"""
internalID: ID!
isIdentityVerified: Boolean
location: MyLocation

"""
The way this collector engaged with the artwork (e.g. saved it and/or abandoned an order).
"""
sources: [PartnerOfferSourceEnum]
}

type OpeningHoursArray {
schedules: [FormattedDaySchedules]
}
Expand Down Expand Up @@ -30982,6 +31070,26 @@ type Query {
reason: "This is only for use in resolving stitched queries, not for first-class client use!"
)

"""
A connection of artworks matching an uploaded query image, using a pure vector (neural) image search.
"""
artworksByImageConnection(
after: String
before: String
first: Int
last: Int

"""
S3 bucket of the uploaded query image.
"""
s3Bucket: String!

"""
S3 key of the uploaded query image.
"""
s3Key: String!
): ArtworkConnection

"""
Artworks Elastic Search results
"""
Expand Down Expand Up @@ -40639,6 +40747,26 @@ type Viewer {
reason: "This is only for use in resolving stitched queries, not for first-class client use!"
)

"""
A connection of artworks matching an uploaded query image, using a pure vector (neural) image search.
"""
artworksByImageConnection(
after: String
before: String
first: Int
last: Int

"""
S3 bucket of the uploaded query image.
"""
s3Bucket: String!

"""
S3 key of the uploaded query image.
"""
s3Key: String!
): ArtworkConnection

"""
Artworks Elastic Search results
"""
Expand Down
9 changes: 8 additions & 1 deletion src/app/Components/AutosuggestResults/AutosuggestResults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const AutosuggestResultsFlatList: React.FC<{
ListHeaderComponent?: React.ComponentType<any>
numColumns?: number
onResultPress?: OnResultPress
onScrollBeginDrag?: () => void
prependResults?: AutosuggestResult[]
query: string
relay: RelayPaginationProp
Expand All @@ -57,6 +58,7 @@ const AutosuggestResultsFlatList: React.FC<{
ListHeaderComponent = () => <Spacer y={2} />,
numColumns = 1,
onResultPress,
onScrollBeginDrag: onScrollBeginDragProp,
prependResults = [],
query,
relay,
Expand All @@ -79,13 +81,15 @@ const AutosuggestResultsFlatList: React.FC<{
inputRef.current?.blur()
// dismisses the keyboard
KeyboardController.dismiss()
// let consumers react to the scroll (e.g. collapse the image-search footer)
onScrollBeginDragProp?.()

if (!userHasStartedScrolling.current) {
userHasStartedScrolling.current = true
// fetch second page immediately
loadMore()
}
}, [])
}, [onScrollBeginDragProp])
const onEndReached = useCallback(() => {
if (userHasStartedScrolling.current) {
loadMore()
Expand Down Expand Up @@ -344,6 +348,7 @@ export const AutosuggestResults: React.FC<{
ListHeaderComponent?: React.ComponentType<any>
numColumns?: number
onResultPress?: OnResultPress
onScrollBeginDrag?: () => void
prependResults?: any[]
query: string
showOnRetryErrorMessage?: boolean
Expand All @@ -361,6 +366,7 @@ export const AutosuggestResults: React.FC<{
ListHeaderComponent,
numColumns = 1,
onResultPress,
onScrollBeginDrag,
prependResults,
query,
showOnRetryErrorMessage,
Expand Down Expand Up @@ -430,6 +436,7 @@ export const AutosuggestResults: React.FC<{
showResultType={showResultType}
showQuickNavigationButtons={showQuickNavigationButtons}
onResultPress={onResultPress}
onScrollBeginDrag={onScrollBeginDrag}
trackResultPress={trackResultPress}
ListEmptyComponent={ListEmptyComponent}
ListHeaderComponent={ListHeaderComponent}
Expand Down
51 changes: 41 additions & 10 deletions src/app/Components/GlobalSearchInput/GlobalSearchInput.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import { ActionType, OwnerType } from "@artsy/cohesion"
import { Flex, RoundSearchInput, Touchable } from "@artsy/palette-mobile"
import {
Flex,
RoundSearchInput,
SEARCH_INPUT_CONTAINER_HEIGHT,
Touchable,
useColor,
} from "@artsy/palette-mobile"
import { GlobalSearchInputOverlay } from "app/Components/GlobalSearchInput/GlobalSearchInputOverlay"
import { useDismissSearchOverlayOnTabBarPress } from "app/Components/GlobalSearchInput/utils/useDismissSearchOverlayOnTabBarPress"
import CameraIcon from "app/Components/Icons/CameraIcon"
import { ICON_HIT_SLOP } from "app/Components/constants"
import { useDebouncedValue } from "app/utils/hooks/useDebouncedValue"
import { forwardRef, Fragment, useImperativeHandle, useState } from "react"
Expand All @@ -13,6 +20,7 @@ export type GlobalSearchInput = {

export const GlobalSearchInput = forwardRef<GlobalSearchInput, { ownerType: OwnerType }>(
({ ownerType }, ref) => {
const color = useColor()
const [isVisible, setIsVisible] = useState(false)

const debouncedIsVisible = useDebouncedValue({ value: isVisible })
Expand Down Expand Up @@ -48,15 +56,38 @@ export const GlobalSearchInput = forwardRef<GlobalSearchInput, { ownerType: Owne
Touchable and set pointerEvents to none. This will prevent the input from receiving
touch events and make sure they are being handled by the Touchable.
*/}
<Flex pointerEvents="none">
<RoundSearchInput
placeholder="Search Artsy"
accessibilityHint="Search artists, artworks, galleries etc."
accessibilityLabel="Search artists, artworks, galleries etc."
maxLength={55}
numberOfLines={1}
multiline={false}
/>
<Flex>
<Flex pointerEvents="none">
<RoundSearchInput
placeholder="Search Artsy"
accessibilityHint="Search artists, artworks, galleries etc."
accessibilityLabel="Search artists, artworks, galleries etc."
maxLength={55}
numberOfLines={1}
multiline={false}
/>
</Flex>

{/* Camera icon on the right, mirroring RoundSearchInput's left search icon
(same `mono60` color, 24px size and 16px horizontal padding). It's only shown
on the resting search bar — the focused/typing overlay doesn't render it. */}
<Flex
position="absolute"
right={0}
top={0}
height={SEARCH_INPUT_CONTAINER_HEIGHT}
justifyContent="center"
alignItems="center"
px="16px"
pointerEvents="none"
>
<CameraIcon
width={24}
height={24}
fill={color("mono60")}
testID="global-search-camera-icon"
/>
</Flex>
</Flex>
</Touchable>
<GlobalSearchInputOverlay
Expand Down
Loading