From cfc03f9a3fa8980c56ca5ceea871e9d70eb8dd66 Mon Sep 17 00:00:00 2001 From: Chewbacca Date: Tue, 27 Dec 2022 10:06:28 -0500 Subject: [PATCH 1/3] Remove 'file-icon' in empty link preview --- app/soapbox/features/status/components/card.tsx | 6 +----- app/styles/components/status.scss | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/app/soapbox/features/status/components/card.tsx b/app/soapbox/features/status/components/card.tsx index 18dd427a51..615aa5a952 100644 --- a/app/soapbox/features/status/components/card.tsx +++ b/app/soapbox/features/status/components/card.tsx @@ -241,11 +241,7 @@ const Card: React.FC = ({ ); } else { - embed = ( -
- -
- ); + embed = null; } return ( diff --git a/app/styles/components/status.scss b/app/styles/components/status.scss index aeab54646a..b273c0e839 100644 --- a/app/styles/components/status.scss +++ b/app/styles/components/status.scss @@ -61,7 +61,7 @@ } .status-card { - @apply flex text-sm border border-solid border-gray-200 dark:border-gray-800 rounded-lg text-gray-800 dark:text-gray-200 min-h-[150px] no-underline overflow-hidden; + @apply flex text-sm border border-solid border-gray-200 dark:border-gray-800 rounded-lg text-gray-800 dark:text-gray-200 no-underline overflow-hidden; } a.status-card { @@ -95,10 +95,6 @@ a.status-card { stroke-width: 1px; } } - - &--empty { - flex: 0 0 80px; - } } .status-card.horizontal { From 0cc684d940db2eb9c7919ebca8ae26fecc576f2a Mon Sep 17 00:00:00 2001 From: Chewbacca Date: Mon, 9 Jan 2023 12:49:22 -0500 Subject: [PATCH 2/3] Allow null --- app/soapbox/features/status/components/card.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/soapbox/features/status/components/card.tsx b/app/soapbox/features/status/components/card.tsx index 615aa5a952..214b0f1f96 100644 --- a/app/soapbox/features/status/components/card.tsx +++ b/app/soapbox/features/status/components/card.tsx @@ -153,7 +153,7 @@ const Card: React.FC = ({ ); - let embed: React.ReactNode = ''; + let embed: React.ReactNode = null; const canvas = ( = ({ {thumbnail} ); - } else { - embed = null; } return ( From 197a373401078e344a1914aca6ba76d84b06e32e Mon Sep 17 00:00:00 2001 From: Chewbacca Date: Mon, 9 Jan 2023 12:50:29 -0500 Subject: [PATCH 3/3] Add Changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab6a4c2440..231e660d9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Posts: letterbox images to 19:6 again. - Status Info: moved context (repost, pinned) to improve UX. +- Posts: remove file icon from empty link previews. ### Fixed - Layout: use accent color for "floating action button" (mobile compose button).