From abd265c8b5eeed31f94a1c4692e55b9d9dafb134 Mon Sep 17 00:00:00 2001 From: automated-signal <37887102+automated-signal@users.noreply.github.com> Date: Mon, 24 Nov 2025 15:02:43 -0600 Subject: [PATCH] Further tweaks for media gallery Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> --- _locales/en/messages.json | 8 +++ stylesheets/_modules.scss | 38 ------------ .../media-gallery/AttachmentSection.dom.tsx | 4 +- .../media-gallery/EmptyState.dom.tsx | 4 +- .../media-gallery/LinkPreviewItem.dom.tsx | 3 +- .../media-gallery/ListItem.dom.tsx | 5 +- .../media-gallery/MediaGallery.dom.tsx | 58 +++++++++++-------- 7 files changed, 53 insertions(+), 67 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index ba1f5f49b2..209b1b2a00 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -6712,6 +6712,10 @@ "messageformat": "No Links", "description": "Title of the empty state view of media gallery for links tab" }, + "icu:MediaGallery__EmptyState__description--links-2": { + "messageformat": "Links that you send and receive will appear here", + "description": "Description of the empty state view of media gallery for links tab" + }, "icu:MediaGallery__EmptyState__description--documents": { "messageformat": "Links that you send and receive will appear here", "description": "Description of the empty state view of media gallery for links tab" @@ -6720,6 +6724,10 @@ "messageformat": "No Files", "description": "Title of the empty state view of media gallery for files tab" }, + "icu:MediaGallery__EmptyState__description--documents-2": { + "messageformat": "Files that you send and receive will appear here", + "description": "Description of the empty state view of media gallery for files tab" + }, "icu:MediaGallery__EmptyState__description--links": { "messageformat": "Files that you send and receive will appear here", "description": "Description of the empty state view of media gallery for files tab" diff --git a/stylesheets/_modules.scss b/stylesheets/_modules.scss index f9da93b4d1..59c05fb32d 100644 --- a/stylesheets/_modules.scss +++ b/stylesheets/_modules.scss @@ -2464,44 +2464,6 @@ button.ConversationDetails__action-button { margin-inline-start: 16px; } -// Module: Media Gallery - -.module-media-gallery { - display: flex; - flex-direction: column; - flex-grow: 1; - width: 100%; - height: 100%; - outline: none; -} - -.module-media-gallery__content { - flex-grow: 1; - overflow-y: auto; - overflow-x: hidden; - padding: 20px; -} - -.module-media-gallery__scroll-observer { - position: absolute; - bottom: 0; - height: 30px; - - &::after { - content: ''; - height: 1px; // Always show the element to not mess with the height of the scroll area - display: block; - } -} - -.module-media-gallery__sections { - min-width: 0; - - display: flex; - flex-grow: 1; - flex-direction: column; -} - // Module: Message Request Actions .module-message-request-actions { diff --git a/ts/components/conversation/media-gallery/AttachmentSection.dom.tsx b/ts/components/conversation/media-gallery/AttachmentSection.dom.tsx index 5f1558067d..f78b7cadca 100644 --- a/ts/components/conversation/media-gallery/AttachmentSection.dom.tsx +++ b/ts/components/conversation/media-gallery/AttachmentSection.dom.tsx @@ -94,8 +94,8 @@ export function AttachmentSection({ case 'audio': case 'link': return ( -
-

{header}

+
+

{header}

{verified.entries.map(mediaItem => { return ( diff --git a/ts/components/conversation/media-gallery/EmptyState.dom.tsx b/ts/components/conversation/media-gallery/EmptyState.dom.tsx index dab170fe6d..c9d6c7200d 100644 --- a/ts/components/conversation/media-gallery/EmptyState.dom.tsx +++ b/ts/components/conversation/media-gallery/EmptyState.dom.tsx @@ -29,12 +29,12 @@ export function EmptyState({ i18n, tab }: Props): JSX.Element { case TabViews.Documents: title = i18n('icu:MediaGallery__EmptyState__title--documents'); description = i18n( - 'icu:MediaGallery__EmptyState__description--documents' + 'icu:MediaGallery__EmptyState__description--documents-2' ); break; case TabViews.Links: title = i18n('icu:MediaGallery__EmptyState__title--links'); - description = i18n('icu:MediaGallery__EmptyState__description--links'); + description = i18n('icu:MediaGallery__EmptyState__description--links-2'); break; default: throw missingCaseError(tab); diff --git a/ts/components/conversation/media-gallery/LinkPreviewItem.dom.tsx b/ts/components/conversation/media-gallery/LinkPreviewItem.dom.tsx index 2a2fb457dd..1688d307e0 100644 --- a/ts/components/conversation/media-gallery/LinkPreviewItem.dom.tsx +++ b/ts/components/conversation/media-gallery/LinkPreviewItem.dom.tsx @@ -62,7 +62,8 @@ export function LinkPreviewItem({
diff --git a/ts/components/conversation/media-gallery/ListItem.dom.tsx b/ts/components/conversation/media-gallery/ListItem.dom.tsx index 7e62125862..3470a06524 100644 --- a/ts/components/conversation/media-gallery/ListItem.dom.tsx +++ b/ts/components/conversation/media-gallery/ListItem.dom.tsx @@ -110,7 +110,10 @@ export function ListItem({ return (