From a3f79cc714946b0f6f5d32f3bdf0c4f0df540dac Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Thu, 13 Feb 2025 14:56:12 +0000 Subject: Revert "fix quote & feed padding not being pressable (#7694)" (#7733) This reverts commit 521a764d4f896518af7f668e2d196b720461ec13. --- src/components/ListCard.tsx | 5 ++- src/view/com/util/post-embeds/QuoteEmbed.tsx | 5 +-- src/view/com/util/post-embeds/index.tsx | 49 ++++++++++++++++++++++++---- 3 files changed, 47 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/components/ListCard.tsx b/src/components/ListCard.tsx index 9061648e0..ed5838fb0 100644 --- a/src/components/ListCard.tsx +++ b/src/components/ListCard.tsx @@ -26,7 +26,6 @@ import { import {Link as InternalLink, LinkProps} from '#/components/Link' import * as Hider from '#/components/moderation/Hider' import {Text} from '#/components/Typography' -import {ButtonProps} from './Button' /* * This component is based on `FeedCard` and is tightly coupled with that @@ -49,7 +48,7 @@ const MODLIST = 'app.bsky.graph.defs#modlist' type Props = { view: AppBskyGraphDefs.ListView showPinButton?: boolean -} & Omit +} export function Default(props: Props) { const {view, showPinButton} = props @@ -83,7 +82,7 @@ export function Link({ view, children, ...props -}: Props & Pick) { +}: Props & Omit) { const queryClient = useQueryClient() const href = React.useMemo(() => { diff --git a/src/view/com/util/post-embeds/QuoteEmbed.tsx b/src/view/com/util/post-embeds/QuoteEmbed.tsx index 7b9bd20bf..cb549f7cd 100644 --- a/src/view/com/util/post-embeds/QuoteEmbed.tsx +++ b/src/view/com/util/post-embeds/QuoteEmbed.tsx @@ -221,15 +221,16 @@ export function QuoteEmbed({ modui={moderation?.ui('contentList')} style={[ a.rounded_md, + a.p_md, a.mt_sm, a.border, t.atoms.border_contrast_low, style, - ]}> + ]} + childContainerStyle={[a.pt_sm]}> diff --git a/src/view/com/util/post-embeds/index.tsx b/src/view/com/util/post-embeds/index.tsx index 429b2812c..6f5f9d3ab 100644 --- a/src/view/com/util/post-embeds/index.tsx +++ b/src/view/com/util/post-embeds/index.tsx @@ -1,5 +1,11 @@ import React from 'react' -import {InteractionManager, StyleProp, View, ViewStyle} from 'react-native' +import { + InteractionManager, + StyleProp, + StyleSheet, + View, + ViewStyle, +} from 'react-native' import {MeasuredDimensions, runOnJS, runOnUI} from 'react-native-reanimated' import {Image} from 'expo-image' import { @@ -16,6 +22,7 @@ import { } from '@atproto/api' import {HandleRef, measureHandle} from '#/lib/hooks/useHandleRef' +import {usePalette} from '#/lib/hooks/usePalette' import {useLightboxControls} from '#/state/lightbox' import {useModerationOpts} from '#/state/preferences/moderation-opts' import {FeedSourceCard} from '#/view/com/feeds/FeedSourceCard' @@ -248,7 +255,7 @@ export function PostEmbeds({ } export function MaybeFeedCard({view}: {view: AppBskyFeedDefs.GeneratorView}) { - const t = useTheme() + const pal = usePalette('default') const moderationOpts = useModerationOpts() const moderation = React.useMemo(() => { return moderationOpts @@ -260,7 +267,7 @@ export function MaybeFeedCard({view}: {view: AppBskyFeedDefs.GeneratorView}) { @@ -276,10 +283,38 @@ export function MaybeListCard({view}: {view: AppBskyGraphDefs.ListView}) { return ( - + + + ) } + +const styles = StyleSheet.create({ + altContainer: { + backgroundColor: 'rgba(0, 0, 0, 0.75)', + borderRadius: 6, + paddingHorizontal: 6, + paddingVertical: 3, + position: 'absolute', + right: 6, + bottom: 6, + }, + alt: { + color: 'white', + fontSize: 7, + fontWeight: '600', + }, + customFeedOuter: { + borderWidth: StyleSheet.hairlineWidth, + borderRadius: 8, + paddingHorizontal: 12, + paddingVertical: 12, + }, +}) -- cgit 1.4.1