make horizontal scrollview touch edges (#7256)
This commit is contained in:
@@ -158,6 +158,9 @@ export const atoms = {
|
|||||||
flex_wrap: {
|
flex_wrap: {
|
||||||
flexWrap: 'wrap',
|
flexWrap: 'wrap',
|
||||||
},
|
},
|
||||||
|
flex_nowrap: {
|
||||||
|
flexWrap: 'nowrap',
|
||||||
|
},
|
||||||
flex_0: {
|
flex_0: {
|
||||||
flex: web('0 0 auto') || (native(0) as number),
|
flex: web('0 0 auto') || (native(0) as number),
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ import {
|
|||||||
NativeStackScreenProps,
|
NativeStackScreenProps,
|
||||||
SearchTabNavigatorParams,
|
SearchTabNavigatorParams,
|
||||||
} from '#/lib/routes/types'
|
} from '#/lib/routes/types'
|
||||||
|
import {sanitizeDisplayName} from '#/lib/strings/display-names'
|
||||||
import {augmentSearchQuery} from '#/lib/strings/helpers'
|
import {augmentSearchQuery} from '#/lib/strings/helpers'
|
||||||
import {logger} from '#/logger'
|
import {logger} from '#/logger'
|
||||||
import {isNative, isWeb} from '#/platform/detection'
|
import {isNative, isWeb} from '#/platform/detection'
|
||||||
@@ -58,7 +59,13 @@ import {Text} from '#/view/com/util/text/Text'
|
|||||||
import {Explore} from '#/view/screens/Search/Explore'
|
import {Explore} from '#/view/screens/Search/Explore'
|
||||||
import {SearchLinkCard, SearchProfileCard} from '#/view/shell/desktop/Search'
|
import {SearchLinkCard, SearchProfileCard} from '#/view/shell/desktop/Search'
|
||||||
import {makeSearchQuery, parseSearchQuery} from '#/screens/Search/utils'
|
import {makeSearchQuery, parseSearchQuery} from '#/screens/Search/utils'
|
||||||
import {atoms as a, useBreakpoints, useTheme as useThemeNew, web} from '#/alf'
|
import {
|
||||||
|
atoms as a,
|
||||||
|
tokens,
|
||||||
|
useBreakpoints,
|
||||||
|
useTheme as useThemeNew,
|
||||||
|
web,
|
||||||
|
} from '#/alf'
|
||||||
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
||||||
import * as FeedCard from '#/components/FeedCard'
|
import * as FeedCard from '#/components/FeedCard'
|
||||||
import {SearchInput} from '#/components/forms/SearchInput'
|
import {SearchInput} from '#/components/forms/SearchInput'
|
||||||
@@ -1043,10 +1050,12 @@ function SearchHistory({
|
|||||||
<RNGHScrollView
|
<RNGHScrollView
|
||||||
keyboardShouldPersistTaps="handled"
|
keyboardShouldPersistTaps="handled"
|
||||||
horizontal={true}
|
horizontal={true}
|
||||||
style={styles.profilesRow}
|
style={[
|
||||||
contentContainerStyle={{
|
a.flex_row,
|
||||||
borderWidth: 0,
|
a.flex_nowrap,
|
||||||
}}>
|
{marginHorizontal: -tokens.space._2xl},
|
||||||
|
]}
|
||||||
|
contentContainerStyle={[a.px_2xl, a.border_0]}>
|
||||||
{selectedProfiles.slice(0, 5).map((profile, index) => (
|
{selectedProfiles.slice(0, 5).map((profile, index) => (
|
||||||
<View
|
<View
|
||||||
key={index}
|
key={index}
|
||||||
@@ -1070,7 +1079,9 @@ function SearchHistory({
|
|||||||
emoji
|
emoji
|
||||||
style={[pal.text, styles.profileName]}
|
style={[pal.text, styles.profileName]}
|
||||||
numberOfLines={1}>
|
numberOfLines={1}>
|
||||||
{profile.displayName || profile.handle}
|
{sanitizeDisplayName(
|
||||||
|
profile.displayName || profile.handle,
|
||||||
|
)}
|
||||||
</Text>
|
</Text>
|
||||||
</Link>
|
</Link>
|
||||||
<Pressable
|
<Pressable
|
||||||
@@ -1181,10 +1192,6 @@ const styles = StyleSheet.create({
|
|||||||
selectedProfilesContainerMobile: {
|
selectedProfilesContainerMobile: {
|
||||||
height: 100,
|
height: 100,
|
||||||
},
|
},
|
||||||
profilesRow: {
|
|
||||||
flexDirection: 'row',
|
|
||||||
flexWrap: 'nowrap',
|
|
||||||
},
|
|
||||||
profileItem: {
|
profileItem: {
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
marginRight: 15,
|
marginRight: 15,
|
||||||
|
|||||||
Reference in New Issue
Block a user