diff --git a/src/app/Components/HeaderArtworksFilter/HeaderArtworksFilter.tsx b/src/app/Components/HeaderArtworksFilter/HeaderArtworksFilter.tsx index 7d77e4659c3..a9d4ea87278 100644 --- a/src/app/Components/HeaderArtworksFilter/HeaderArtworksFilter.tsx +++ b/src/app/Components/HeaderArtworksFilter/HeaderArtworksFilter.tsx @@ -12,10 +12,11 @@ import { Animated, Dimensions, LayoutChangeEvent, PixelRatio } from "react-nativ import { isTablet } from "react-native-device-info" export interface FilterProps { - total: number animationValue?: Animated.Value - onPress: () => void + disableYAxisAnimation?: boolean hideArtworksCount?: boolean + onPress: () => void + total: number } interface SeparatorWithSmoothOpacityProps { @@ -62,6 +63,7 @@ export const SeparatorWithSmoothOpacity: React.FC = ({ animationValue, + disableYAxisAnimation, hideArtworksCount, onPress, total, @@ -114,19 +116,22 @@ export const HeaderArtworksFilter: React.FC = ({ return ( _onLayout(e)} testID="HeaderArtworksFilter"> - {!!animationValue && } + {!!animationValue && !disableYAxisAnimation && ( + + )} {!!total && ( 0 ? [0, filterPageY - ANIM_START, filterPageY] : [0, 0, 0], - outputRange: filterPageY > 0 ? [0, 0, TRANSLATE_Y_VALUE] : [0, 0, 0], - extrapolate: "clamp", - }) ?? 0, + translateY: !disableYAxisAnimation + ? animationValue?.interpolate({ + inputRange: + filterPageY > 0 ? [0, filterPageY - ANIM_START, filterPageY] : [0, 0, 0], + outputRange: filterPageY > 0 ? [0, 0, TRANSLATE_Y_VALUE] : [0, 0, 0], + extrapolate: "clamp", + }) ?? 0 + : 0, }, ], }} diff --git a/src/app/Components/HeaderArtworksFilter/HeaderArtworksFilterWithTotalArtworks.tsx b/src/app/Components/HeaderArtworksFilter/HeaderArtworksFilterWithTotalArtworks.tsx index b52ec9bff00..b5163ceaf53 100644 --- a/src/app/Components/HeaderArtworksFilter/HeaderArtworksFilterWithTotalArtworks.tsx +++ b/src/app/Components/HeaderArtworksFilter/HeaderArtworksFilterWithTotalArtworks.tsx @@ -3,6 +3,7 @@ import { HeaderArtworksFilter } from "app/Components/HeaderArtworksFilter/Header import { Animated } from "react-native" interface HeaderArtworksFilterWithTotalArtworksProps { + disableYAxisAnimation?: boolean animationValue?: Animated.Value onPress: () => void hideArtworksCount?: boolean diff --git a/src/app/Scenes/Show/Components/ShowArtworks.tsx b/src/app/Scenes/Show/Components/ShowArtworks.tsx index 166c668df19..6bac0a66ddf 100644 --- a/src/app/Scenes/Show/Components/ShowArtworks.tsx +++ b/src/app/Scenes/Show/Components/ShowArtworks.tsx @@ -121,17 +121,7 @@ export const ShowArtworksPaginationContainer = createPaginationContainer( showArtworks: filterArtworksConnection( first: $count after: $cursor - aggregations: [ - ARTIST - ARTIST_NATIONALITY - COLOR - DIMENSION_RANGE - FOLLOWED_ARTISTS - MAJOR_PERIOD - MATERIALS_TERMS - MEDIUM - PRICE_RANGE - ] + aggregations: [MEDIUM, TOTAL, MAJOR_PERIOD, ARTIST_NATIONALITY, MATERIALS_TERMS, ARTIST] input: $input ) @connection(key: "Show_showArtworks") { aggregations { diff --git a/src/app/Scenes/Show/Show.tsx b/src/app/Scenes/Show/Show.tsx index 7197c1e33b9..9593f6a6659 100644 --- a/src/app/Scenes/Show/Show.tsx +++ b/src/app/Scenes/Show/Show.tsx @@ -57,10 +57,11 @@ export const Show: React.FC = ({ show }) => { key: "filter", element: ( - + ), @@ -100,7 +101,7 @@ export const Show: React.FC = ({ show }) => { data={sections} keyExtractor={({ key }) => key} - stickyHeaderIndices={[sections.findIndex((section) => section.key === "filter") + 1]} + stickyHeaderIndices={[sections.findIndex((section) => section.key === "filter")]} viewabilityConfig={viewConfigRef.current} ListFooterComponent={} ItemSeparatorComponent={() => }