diff --git a/src/analytics/features/types.ts b/src/analytics/features/types.ts index c1871e2927..89a1d4c8ac 100644 --- a/src/analytics/features/types.ts +++ b/src/analytics/features/types.ts @@ -12,7 +12,6 @@ export enum Features { GroupChatsDisable = 'group_chats:disable', ComposerLanguageDetectionEnable = 'composer:language_detection:enable', ComposerImageLayoutToggleEnable = 'composer:image_layout_toggle:enable', - PostGalleryEmbedEnable = 'post_gallery_embed:enable', NotificationsExpandedProfileCardEnable = 'notifications:expanded_profile_card:enable', SearchV2Enable = 'search_v2:enable', AdvancedSearchV2Enable = 'advanced_search_v2:enable', diff --git a/src/components/Post/Embed/ImageEmbed.tsx b/src/components/Post/Embed/ImageEmbed.tsx index bc3e15cfbf..24f646c82a 100644 --- a/src/components/Post/Embed/ImageEmbed.tsx +++ b/src/components/Post/Embed/ImageEmbed.tsx @@ -37,19 +37,17 @@ export function ImageEmbed({ })) : embed.view.images /* - * The gallery embed type implies the carousel layout: >4 images always - * publishes as a gallery, and the composer's layout toggle experiment - * publishes 2-4 images as a gallery when the user opts into the carousel. - * Legacy `images` embeds keep the grid unless the viewer-side gate flips - * them to the carousel. + * The embed type decides the layout: gallery embeds render as the + * carousel (>4 images always publishes as a gallery, and the composer's + * layout toggle experiment lets 2-4 images opt in), legacy `images` + * embeds render as the grid. */ - const useExpandedLayout = - embed.type === 'gallery' - ? true - : ax.features.enabled(ax.features.PostGalleryEmbedEnable) - const layout: 'single' | 'grid' | 'carousel' = - images.length === 1 ? 'single' : useExpandedLayout ? 'carousel' : 'grid' + images.length === 1 + ? 'single' + : embed.type === 'gallery' + ? 'carousel' + : 'grid' const postContext = rest.post ? { @@ -153,7 +151,7 @@ export function ImageEmbed({ ) } - if (useExpandedLayout) { + if (layout === 'carousel') { return ( ( diff --git a/src/view/com/posts/PostFeed.tsx b/src/view/com/posts/PostFeed.tsx index e43004b1c2..c9017a61f8 100644 --- a/src/view/com/posts/PostFeed.tsx +++ b/src/view/com/posts/PostFeed.tsx @@ -968,16 +968,13 @@ let PostFeed = ({ : post.embed.images.length /* * Keep in sync with the layout decision in ImageEmbed: gallery - * embeds always render as the carousel, legacy `images` embeds - * depend on the viewer-side gate. + * embeds render as the carousel, legacy `images` embeds as the + * grid. */ - const useExpandedLayout = AppBskyEmbedGallery.isView(post.embed) - ? true - : ax.features.enabled(ax.features.PostGalleryEmbedEnable) const layout = totalImages === 1 ? 'single' - : useExpandedLayout + : AppBskyEmbedGallery.isView(post.embed) ? 'carousel' : 'grid'