Increase rounding for all embeds (#5421)

* tweak image styles

* fix reply image preview and covert to atoms

* increase rounding on media inset border

* decrease gap on desktop

* fix inset styles

* increase rounding on embeds to `md`

* Couple edge cases

---------

Co-authored-by: Eric Bailey <git@esb.lol>
This commit is contained in:
Samuel Newman
2024-09-20 20:47:28 +01:00
committed by GitHub
parent c85a271ef6
commit 79a2f8d528
14 changed files with 223 additions and 160 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ export function MediaInsetBorder({
return ( return (
<Fill <Fill
style={[ style={[
a.rounded_sm, a.rounded_md,
a.border, a.border,
opaque opaque
? [t.atoms.border_contrast_low] ? [t.atoms.border_contrast_low]
+67 -90
View File
@@ -16,7 +16,7 @@ import {ComposerOptsPostRef} from 'state/shell/composer'
import {QuoteEmbed} from 'view/com/util/post-embeds/QuoteEmbed' import {QuoteEmbed} from 'view/com/util/post-embeds/QuoteEmbed'
import {Text} from 'view/com/util/text/Text' import {Text} from 'view/com/util/text/Text'
import {PreviewableUserAvatar} from 'view/com/util/UserAvatar' import {PreviewableUserAvatar} from 'view/com/util/UserAvatar'
import {useTheme} from '#/alf' import {atoms as a, useTheme} from '#/alf'
export function ComposerReplyTo({replyTo}: {replyTo: ComposerOptsPostRef}) { export function ComposerReplyTo({replyTo}: {replyTo: ComposerOptsPostRef}) {
const t = useTheme() const t = useTheme()
@@ -122,94 +122,87 @@ function ComposerReplyToImages({
showFull: boolean showFull: boolean
}) { }) {
return ( return (
<View <View style={[styles.imagesContainer, a.mx_xs]}>
style={{ {(images.length === 1 && (
width: 65, <Image
flexDirection: 'column', source={{uri: images[0].thumb}}
alignItems: 'center', style={[a.flex_1]}
}}> cachePolicy="memory-disk"
<View style={styles.imagesContainer}> accessibilityIgnoresInvertColors
{(images.length === 1 && ( />
<Image )) ||
source={{uri: images[0].thumb}} (images.length === 2 && (
style={styles.singleImage} <View style={[a.flex_1, a.flex_row, a.gap_2xs]}>
cachePolicy="memory-disk" <Image
accessibilityIgnoresInvertColors source={{uri: images[0].thumb}}
/> style={[a.flex_1]}
cachePolicy="memory-disk"
accessibilityIgnoresInvertColors
/>
<Image
source={{uri: images[1].thumb}}
style={[a.flex_1]}
cachePolicy="memory-disk"
accessibilityIgnoresInvertColors
/>
</View>
)) || )) ||
(images.length === 2 && ( (images.length === 3 && (
<View style={[styles.imagesInner, styles.imagesRow]}> <View style={[a.flex_1, a.flex_row, a.gap_2xs]}>
<Image
source={{uri: images[0].thumb}}
style={[a.flex_1]}
cachePolicy="memory-disk"
accessibilityIgnoresInvertColors
/>
<View style={[a.flex_1, a.gap_2xs]}>
<Image
source={{uri: images[1].thumb}}
style={[a.flex_1]}
cachePolicy="memory-disk"
accessibilityIgnoresInvertColors
/>
<Image
source={{uri: images[2].thumb}}
style={[a.flex_1]}
cachePolicy="memory-disk"
accessibilityIgnoresInvertColors
/>
</View>
</View>
)) ||
(images.length === 4 && (
<View style={[a.flex_1, a.gap_2xs]}>
<View style={[a.flex_1, a.flex_row, a.gap_2xs]}>
<Image <Image
source={{uri: images[0].thumb}} source={{uri: images[0].thumb}}
style={styles.doubleImageTall} style={[a.flex_1]}
cachePolicy="memory-disk" cachePolicy="memory-disk"
accessibilityIgnoresInvertColors accessibilityIgnoresInvertColors
/> />
<Image <Image
source={{uri: images[1].thumb}} source={{uri: images[1].thumb}}
style={styles.doubleImageTall} style={[a.flex_1]}
cachePolicy="memory-disk" cachePolicy="memory-disk"
accessibilityIgnoresInvertColors accessibilityIgnoresInvertColors
/> />
</View> </View>
)) || <View style={[a.flex_1, a.flex_row, a.gap_2xs]}>
(images.length === 3 && (
<View style={[styles.imagesInner, styles.imagesRow]}>
<Image <Image
source={{uri: images[0].thumb}} source={{uri: images[2].thumb}}
style={styles.doubleImageTall} style={[a.flex_1]}
cachePolicy="memory-disk"
accessibilityIgnoresInvertColors
/>
<Image
source={{uri: images[3].thumb}}
style={[a.flex_1]}
cachePolicy="memory-disk" cachePolicy="memory-disk"
accessibilityIgnoresInvertColors accessibilityIgnoresInvertColors
/> />
<View style={styles.imagesInner}>
<Image
source={{uri: images[1].thumb}}
style={styles.doubleImage}
cachePolicy="memory-disk"
accessibilityIgnoresInvertColors
/>
<Image
source={{uri: images[2].thumb}}
style={styles.doubleImage}
cachePolicy="memory-disk"
accessibilityIgnoresInvertColors
/>
</View>
</View> </View>
)) || </View>
(images.length === 4 && ( ))}
<View style={styles.imagesInner}>
<View style={[styles.imagesInner, styles.imagesRow]}>
<Image
source={{uri: images[0].thumb}}
style={styles.doubleImage}
cachePolicy="memory-disk"
accessibilityIgnoresInvertColors
/>
<Image
source={{uri: images[1].thumb}}
style={styles.doubleImage}
cachePolicy="memory-disk"
accessibilityIgnoresInvertColors
/>
</View>
<View style={[styles.imagesInner, styles.imagesRow]}>
<Image
source={{uri: images[2].thumb}}
style={styles.doubleImage}
cachePolicy="memory-disk"
accessibilityIgnoresInvertColors
/>
<Image
source={{uri: images[3].thumb}}
style={styles.doubleImage}
cachePolicy="memory-disk"
accessibilityIgnoresInvertColors
/>
</View>
</View>
))}
</View>
</View> </View>
) )
} }
@@ -240,23 +233,7 @@ const styles = StyleSheet.create({
borderRadius: 6, borderRadius: 6,
overflow: 'hidden', overflow: 'hidden',
marginTop: 2, marginTop: 2,
}, height: 64,
imagesInner: { width: 64,
gap: 2,
},
imagesRow: {
flexDirection: 'row',
},
singleImage: {
width: 65,
height: 65,
},
doubleImageTall: {
width: 32.5,
height: 65,
},
doubleImage: {
width: 32.5,
height: 32.5,
}, },
}) })
+2 -2
View File
@@ -88,7 +88,7 @@ export function ConstrainedImage({
<View <View
style={[ style={[
a.h_full, a.h_full,
a.rounded_sm, a.rounded_md,
a.overflow_hidden, a.overflow_hidden,
t.atoms.bg_contrast_25, t.atoms.bg_contrast_25,
fullBleed ? a.w_full : {aspectRatio}, fullBleed ? a.w_full : {aspectRatio},
@@ -219,7 +219,7 @@ export function AutoSizedImage({
accessibilityHint={_(msg`Tap to view full image`)} accessibilityHint={_(msg`Tap to view full image`)}
style={[ style={[
a.w_full, a.w_full,
a.rounded_sm, a.rounded_md,
a.overflow_hidden, a.overflow_hidden,
t.atoms.bg_contrast_25, t.atoms.bg_contrast_25,
{aspectRatio: max}, {aspectRatio: max},
+10 -9
View File
@@ -1,6 +1,6 @@
import React, {ComponentProps, FC} from 'react' import React from 'react'
import {Pressable, View} from 'react-native' import {Pressable, StyleProp, View, ViewStyle} from 'react-native'
import {Image} from 'expo-image' import {Image, ImageStyle} from 'expo-image'
import {AppBskyEmbedImages} from '@atproto/api' import {AppBskyEmbedImages} from '@atproto/api'
import {msg} from '@lingui/macro' import {msg} from '@lingui/macro'
import {useLingui} from '@lingui/react' import {useLingui} from '@lingui/react'
@@ -13,17 +13,18 @@ import {Text} from '#/components/Typography'
type EventFunction = (index: number) => void type EventFunction = (index: number) => void
interface GalleryItemProps { interface Props {
images: AppBskyEmbedImages.ViewImage[] images: AppBskyEmbedImages.ViewImage[]
index: number index: number
onPress?: EventFunction onPress?: EventFunction
onLongPress?: EventFunction onLongPress?: EventFunction
onPressIn?: EventFunction onPressIn?: EventFunction
imageStyle?: ComponentProps<typeof Image>['style'] imageStyle?: StyleProp<ImageStyle>
viewContext?: PostEmbedViewContext viewContext?: PostEmbedViewContext
insetBorderStyle?: StyleProp<ViewStyle>
} }
export const GalleryItem: FC<GalleryItemProps> = ({ export function GalleryItem({
images, images,
index, index,
imageStyle, imageStyle,
@@ -31,7 +32,8 @@ export const GalleryItem: FC<GalleryItemProps> = ({
onPressIn, onPressIn,
onLongPress, onLongPress,
viewContext, viewContext,
}) => { insetBorderStyle,
}: Props) {
const t = useTheme() const t = useTheme()
const {_} = useLingui() const {_} = useLingui()
const largeAltBadge = useLargeAltBadgeEnabled() const largeAltBadge = useLargeAltBadgeEnabled()
@@ -47,7 +49,6 @@ export const GalleryItem: FC<GalleryItemProps> = ({
onLongPress={onLongPress ? () => onLongPress(index) : undefined} onLongPress={onLongPress ? () => onLongPress(index) : undefined}
style={[ style={[
a.flex_1, a.flex_1,
a.rounded_sm,
a.overflow_hidden, a.overflow_hidden,
t.atoms.bg_contrast_25, t.atoms.bg_contrast_25,
imageStyle, imageStyle,
@@ -63,7 +64,7 @@ export const GalleryItem: FC<GalleryItemProps> = ({
accessibilityHint="" accessibilityHint=""
accessibilityIgnoresInvertColors accessibilityIgnoresInvertColors
/> />
<MediaInsetBorder /> <MediaInsetBorder style={insetBorderStyle} />
</Pressable> </Pressable>
{hasAlt && !hideBadges ? ( {hasAlt && !hideBadges ? (
<View <View
+109 -21
View File
@@ -1,5 +1,5 @@
import React from 'react' import React from 'react'
import {StyleProp, View, ViewStyle} from 'react-native' import {StyleProp, StyleSheet, View, ViewStyle} from 'react-native'
import {AppBskyEmbedImages} from '@atproto/api' import {AppBskyEmbedImages} from '@atproto/api'
import {PostEmbedViewContext} from '#/view/com/util/post-embeds/types' import {PostEmbedViewContext} from '#/view/com/util/post-embeds/types'
@@ -22,14 +22,23 @@ export function ImageLayoutGrid({style, ...props}: ImageLayoutGridProps) {
? gtMobile ? gtMobile
? a.gap_xs ? a.gap_xs
: a.gap_2xs : a.gap_2xs
: gtMobile
? a.gap_sm
: a.gap_xs : a.gap_xs
const count = props.images.length const count = props.images.length
const aspectRatio = count === 2 ? 2 : count === 3 ? 1.5 : 1 let aspectRatio
switch (count) {
case 2:
aspectRatio = 2
break
case 3:
aspectRatio = 2
break
case 4:
aspectRatio = undefined
break
}
return ( return (
<View style={style}> <View style={style}>
<View style={[gap, {aspectRatio}]}> <View style={[gap, a.rounded_md, a.overflow_hidden, {aspectRatio}]}>
<ImageLayoutGridInner {...props} gap={gap} /> <ImageLayoutGridInner {...props} gap={gap} />
</View> </View>
</View> </View>
@@ -54,10 +63,18 @@ function ImageLayoutGridInner(props: ImageLayoutGridInnerProps) {
return ( return (
<View style={[a.flex_1, a.flex_row, gap]}> <View style={[a.flex_1, a.flex_row, gap]}>
<View style={[a.flex_1, {aspectRatio: 1}]}> <View style={[a.flex_1, {aspectRatio: 1}]}>
<GalleryItem {...props} index={0} /> <GalleryItem
{...props}
index={0}
insetBorderStyle={noCorners(['topRight', 'bottomRight'])}
/>
</View> </View>
<View style={[a.flex_1, {aspectRatio: 1}]}> <View style={[a.flex_1, {aspectRatio: 1}]}>
<GalleryItem {...props} index={1} /> <GalleryItem
{...props}
index={1}
insetBorderStyle={noCorners(['topLeft', 'bottomLeft'])}
/>
</View> </View>
</View> </View>
) )
@@ -65,15 +82,35 @@ function ImageLayoutGridInner(props: ImageLayoutGridInnerProps) {
case 3: case 3:
return ( return (
<View style={[a.flex_1, a.flex_row, gap]}> <View style={[a.flex_1, a.flex_row, gap]}>
<View style={{flex: 2}}> <View style={[a.flex_1]}>
<GalleryItem {...props} index={0} /> <GalleryItem
{...props}
index={0}
insetBorderStyle={noCorners(['topRight', 'bottomRight'])}
/>
</View> </View>
<View style={[a.flex_1, gap]}> <View style={[a.flex_1, gap]}>
<View style={[a.flex_1, {aspectRatio: 1}]}> <View style={[a.flex_1]}>
<GalleryItem {...props} index={1} /> <GalleryItem
{...props}
index={1}
insetBorderStyle={noCorners([
'topLeft',
'bottomLeft',
'bottomRight',
])}
/>
</View> </View>
<View style={[a.flex_1, {aspectRatio: 1}]}> <View style={[a.flex_1]}>
<GalleryItem {...props} index={2} /> <GalleryItem
{...props}
index={2}
insetBorderStyle={noCorners([
'topLeft',
'bottomLeft',
'topRight',
])}
/>
</View> </View>
</View> </View>
</View> </View>
@@ -83,19 +120,51 @@ function ImageLayoutGridInner(props: ImageLayoutGridInnerProps) {
return ( return (
<> <>
<View style={[a.flex_row, gap]}> <View style={[a.flex_row, gap]}>
<View style={[a.flex_1, {aspectRatio: 1}]}> <View style={[a.flex_1, {aspectRatio: 1.5}]}>
<GalleryItem {...props} index={0} /> <GalleryItem
{...props}
index={0}
insetBorderStyle={noCorners([
'bottomLeft',
'topRight',
'bottomRight',
])}
/>
</View> </View>
<View style={[a.flex_1, {aspectRatio: 1}]}> <View style={[a.flex_1, {aspectRatio: 1.5}]}>
<GalleryItem {...props} index={1} /> <GalleryItem
{...props}
index={1}
insetBorderStyle={noCorners([
'topLeft',
'bottomLeft',
'bottomRight',
])}
/>
</View> </View>
</View> </View>
<View style={[a.flex_row, gap]}> <View style={[a.flex_row, gap]}>
<View style={[a.flex_1, {aspectRatio: 1}]}> <View style={[a.flex_1, {aspectRatio: 1.5}]}>
<GalleryItem {...props} index={2} /> <GalleryItem
{...props}
index={2}
insetBorderStyle={noCorners([
'topLeft',
'topRight',
'bottomRight',
])}
/>
</View> </View>
<View style={[a.flex_1, {aspectRatio: 1}]}> <View style={[a.flex_1, {aspectRatio: 1.5}]}>
<GalleryItem {...props} index={3} /> <GalleryItem
{...props}
index={3}
insetBorderStyle={noCorners([
'topLeft',
'bottomLeft',
'topRight',
])}
/>
</View> </View>
</View> </View>
</> </>
@@ -105,3 +174,22 @@ function ImageLayoutGridInner(props: ImageLayoutGridInnerProps) {
return null return null
} }
} }
function noCorners(
corners: ('topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight')[],
) {
const styles: StyleProp<ViewStyle>[] = []
if (corners.includes('topLeft')) {
styles.push({borderTopLeftRadius: 0})
}
if (corners.includes('topRight')) {
styles.push({borderTopRightRadius: 0})
}
if (corners.includes('bottomLeft')) {
styles.push({borderBottomLeftRadius: 0})
}
if (corners.includes('bottomRight')) {
styles.push({borderBottomRightRadius: 0})
}
return StyleSheet.flatten(styles)
}
@@ -117,7 +117,7 @@ export function ExternalGifEmbed({
style={[ style={[
{height: imageDims.height}, {height: imageDims.height},
styles.gifContainer, styles.gifContainer,
a.rounded_sm, a.rounded_md,
a.overflow_hidden, a.overflow_hidden,
{ {
borderBottomLeftRadius: 0, borderBottomLeftRadius: 0,
@@ -59,15 +59,15 @@ export const ExternalLinkEmbed = ({
} }
return ( return (
<View style={[a.flex_col, a.w_full]}> <View style={[a.flex_col, a.rounded_md, a.w_full]}>
<LinkWrapper link={link} onOpen={onOpen} style={style}> <LinkWrapper link={link} onOpen={onOpen} style={style}>
{imageUri && !embedPlayerParams ? ( {imageUri && !embedPlayerParams ? (
<View> <View>
<Image <Image
style={{ style={{
aspectRatio: 1.91, aspectRatio: 1.91,
borderTopRightRadius: 8, borderTopRightRadius: a.rounded_md.borderRadius,
borderTopLeftRadius: 8, borderTopLeftRadius: a.rounded_md.borderRadius,
}} }}
source={{uri: imageUri}} source={{uri: imageUri}}
accessibilityIgnoresInvertColors accessibilityIgnoresInvertColors
@@ -101,11 +101,11 @@ export const ExternalLinkEmbed = ({
a.py_sm, a.py_sm,
t.atoms.border_contrast_low, t.atoms.border_contrast_low,
{ {
borderBottomRightRadius: 8, borderBottomRightRadius: a.rounded_md.borderRadius,
borderBottomLeftRadius: 8, borderBottomLeftRadius: a.rounded_md.borderRadius,
paddingHorizontal: isMobile ? 10 : 14, paddingHorizontal: isMobile ? 10 : 14,
}, },
!imageUri && !embedPlayerParams && [a.border, a.rounded_sm], !imageUri && !embedPlayerParams && [a.border, a.rounded_md],
]}> ]}>
<Text <Text
type="sm" type="sm"
@@ -229,7 +229,7 @@ export function ExternalPlayer({
collapsable={false} collapsable={false}
style={[ style={[
aspect, aspect,
a.rounded_sm, a.rounded_md,
a.overflow_hidden, a.overflow_hidden,
{ {
borderBottomLeftRadius: 0, borderBottomLeftRadius: 0,
@@ -245,7 +245,7 @@ export function ExternalPlayer({
/> />
<Fill <Fill
style={[ style={[
a.rounded_sm, a.rounded_md,
t.name === 'light' ? t.atoms.bg_contrast_975 : t.atoms.bg, t.name === 'light' ? t.atoms.bg_contrast_975 : t.atoms.bg,
{ {
borderBottomLeftRadius: 0, borderBottomLeftRadius: 0,
@@ -267,7 +267,7 @@ export function ExternalPlayer({
) : ( ) : (
<Fill <Fill
style={[ style={[
a.rounded_sm, a.rounded_md,
{ {
backgroundColor: backgroundColor:
t.name === 'light' ? t.palette.contrast_975 : 'black', t.name === 'light' ? t.palette.contrast_975 : 'black',
@@ -304,8 +304,8 @@ export function ExternalPlayer({
const styles = StyleSheet.create({ const styles = StyleSheet.create({
topRadius: { topRadius: {
borderTopLeftRadius: 8, borderTopLeftRadius: a.rounded_md.borderRadius,
borderTopRightRadius: 8, borderTopRightRadius: a.rounded_md.borderRadius,
}, },
overlayContainer: { overlayContainer: {
flex: 1, flex: 1,
@@ -319,8 +319,8 @@ const styles = StyleSheet.create({
zIndex: 3, zIndex: 3,
}, },
webview: { webview: {
borderTopRightRadius: 8, borderTopRightRadius: a.rounded_md.borderRadius,
borderTopLeftRadius: 8, borderTopLeftRadius: a.rounded_md.borderRadius,
backgroundColor: 'transparent', backgroundColor: 'transparent',
}, },
gifContainer: { gifContainer: {
+4 -4
View File
@@ -53,7 +53,7 @@ function PlaybackControls({
a.inset_0, a.inset_0,
a.w_full, a.w_full,
a.h_full, a.h_full,
a.rounded_sm, a.rounded_md,
{ {
zIndex: 2, zIndex: 2,
backgroundColor: !isLoaded backgroundColor: !isLoaded
@@ -117,10 +117,10 @@ export function GifEmbed({
) )
return ( return (
<View style={[a.rounded_sm, a.overflow_hidden, a.mt_sm, style]}> <View style={[a.rounded_md, a.overflow_hidden, a.mt_sm, style]}>
<View <View
style={[ style={[
a.rounded_sm, a.rounded_md,
a.overflow_hidden, a.overflow_hidden,
{aspectRatio: params.dimensions!.width / params.dimensions!.height}, {aspectRatio: params.dimensions!.width / params.dimensions!.height},
]}> ]}>
@@ -132,7 +132,7 @@ export function GifEmbed({
<GifView <GifView
source={params.playerUri} source={params.playerUri}
placeholderSource={link.thumb} placeholderSource={link.thumb}
style={[a.flex_1, a.rounded_sm]} style={[a.flex_1, a.rounded_md]}
autoplay={!autoplayDisabled} autoplay={!autoplayDisabled}
onPlayerStateChange={onPlayerStateChange} onPlayerStateChange={onPlayerStateChange}
ref={playerRef} ref={playerRef}
+8 -8
View File
@@ -219,7 +219,14 @@ export function QuoteEmbed({
return ( return (
<ContentHider <ContentHider
modui={moderation?.ui('contentList')} modui={moderation?.ui('contentList')}
style={[styles.container, a.border, t.atoms.border_contrast_low, style]} style={[
a.rounded_md,
a.p_md,
a.mt_sm,
a.border,
t.atoms.border_contrast_low,
style,
]}
childContainerStyle={[a.pt_sm]}> childContainerStyle={[a.pt_sm]}>
<Link <Link
hoverStyle={{borderColor: pal.colors.borderLinkHover}} hoverStyle={{borderColor: pal.colors.borderLinkHover}}
@@ -293,13 +300,6 @@ function viewRecordToPostView(
} }
const styles = StyleSheet.create({ const styles = StyleSheet.create({
container: {
borderRadius: 8,
marginTop: 8,
paddingVertical: 12,
paddingHorizontal: 12,
borderWidth: StyleSheet.hairlineWidth,
},
errorContainer: { errorContainer: {
flexDirection: 'row', flexDirection: 'row',
alignItems: 'center', alignItems: 'center',
+2 -2
View File
@@ -40,11 +40,11 @@ export function VideoEmbed({embed}: Props) {
<View <View
style={[ style={[
a.w_full, a.w_full,
a.rounded_sm, a.rounded_md,
a.overflow_hidden, a.overflow_hidden,
{aspectRatio}, {aspectRatio},
{backgroundColor: 'black'}, {backgroundColor: 'black'},
a.my_xs, a.mt_xs,
]}> ]}>
<ErrorBoundary renderError={renderError} key={key}> <ErrorBoundary renderError={renderError} key={key}>
<InnerWrapper embed={embed} /> <InnerWrapper embed={embed} />
@@ -66,8 +66,8 @@ export function VideoEmbed({embed}: {embed: AppBskyEmbedVideo.View}) {
{aspectRatio}, {aspectRatio},
{backgroundColor: 'black'}, {backgroundColor: 'black'},
a.relative, a.relative,
a.rounded_sm, a.rounded_md,
a.my_xs, a.mt_xs,
]}> ]}>
<div <div
ref={ref} ref={ref}
@@ -78,7 +78,7 @@ export function VideoEmbedInnerWeb({
}, [embed.playlist]) }, [embed.playlist])
return ( return (
<View style={[a.flex_1, a.rounded_sm, a.overflow_hidden]}> <View style={[a.flex_1, a.rounded_md, a.overflow_hidden]}>
<div ref={containerRef} style={{height: '100%', width: '100%'}}> <div ref={containerRef} style={{height: '100%', width: '100%'}}>
<figure style={{margin: 0, position: 'absolute', inset: 0}}> <figure style={{margin: 0, position: 'absolute', inset: 0}}>
<video <video
+3 -6
View File
@@ -138,7 +138,7 @@ export function PostEmbeds({
const image = images[0] const image = images[0]
return ( return (
<ContentHider modui={moderation?.ui('contentMedia')}> <ContentHider modui={moderation?.ui('contentMedia')}>
<View style={[styles.container, style]}> <View style={[a.mt_sm, style]}>
<AutoSizedImage <AutoSizedImage
crop={ crop={
viewContext === PostEmbedViewContext.ThreadHighlighted viewContext === PostEmbedViewContext.ThreadHighlighted
@@ -162,7 +162,7 @@ export function PostEmbeds({
return ( return (
<ContentHider modui={moderation?.ui('contentMedia')}> <ContentHider modui={moderation?.ui('contentMedia')}>
<View style={[styles.container, style]}> <View style={[a.mt_sm, style]}>
<ImageLayoutGrid <ImageLayoutGrid
images={embed.images} images={embed.images}
onPress={_openLightbox} onPress={_openLightbox}
@@ -184,7 +184,7 @@ export function PostEmbeds({
<ExternalLinkEmbed <ExternalLinkEmbed
link={link} link={link}
onOpen={onOpen} onOpen={onOpen}
style={[styles.container, style]} style={[a.mt_sm, style]}
/> />
</ContentHider> </ContentHider>
) )
@@ -247,9 +247,6 @@ function MaybeListCard({view}: {view: AppBskyGraphDefs.ListView}) {
} }
const styles = StyleSheet.create({ const styles = StyleSheet.create({
container: {
marginTop: 8,
},
altContainer: { altContainer: {
backgroundColor: 'rgba(0, 0, 0, 0.75)', backgroundColor: 'rgba(0, 0, 0, 0.75)',
borderRadius: 6, borderRadius: 6,