From ddc8837d4f18f03a59286c495f84d6c9c93191c2 Mon Sep 17 00:00:00 2001 From: Hampus Date: Thu, 20 Aug 2026 04:33:17 +0200 Subject: [PATCH] fix(app): scale embed and attachment width caps with zoom (#1775) --- .../app/components/shared/SpoilerOverlay.tsx | 14 +------ .../components/MessageAttachmentUtils.ts | 2 + .../components/MessageAttachments.module.css | 2 +- .../channel/components/MessageAttachments.tsx | 1 - .../components/MessageUploadProgress.tsx | 5 ++- .../embeds/EmbedRenderUtils.test.ts | 41 +++++++++++++++++++ .../components/embeds/EmbedRenderUtils.ts | 7 ++-- .../embeds/attachments/AttachmentFile.tsx | 5 ++- .../embeds/channel_embed/RichEmbed.tsx | 6 ++- .../components/embeds/media/EmbedAudio.tsx | 5 ++- .../components/embeds/media/EmbedYouTube.tsx | 2 +- 11 files changed, 65 insertions(+), 25 deletions(-) create mode 100644 fluxer_app/src/features/channel/components/embeds/EmbedRenderUtils.test.ts diff --git a/fluxer_app/src/features/app/components/shared/SpoilerOverlay.tsx b/fluxer_app/src/features/app/components/shared/SpoilerOverlay.tsx index 1b4307dbe..c9a617c44 100644 --- a/fluxer_app/src/features/app/components/shared/SpoilerOverlay.tsx +++ b/fluxer_app/src/features/app/components/shared/SpoilerOverlay.tsx @@ -5,7 +5,7 @@ import FocusRing from '@app/features/ui/focus_ring/FocusRing'; import {msg} from '@lingui/core/macro'; import {useLingui} from '@lingui/react/macro'; import {clsx} from 'clsx'; -import type {CSSProperties, FC, ReactNode} from 'react'; +import type {FC, ReactNode} from 'react'; const REVEAL_SPOILER_DESCRIPTOR = msg({ message: 'Reveal spoiler', @@ -23,24 +23,14 @@ interface SpoilerOverlayProps { label?: string; inline?: boolean; className?: string; - style?: CSSProperties; } -export const SpoilerOverlay: FC = ({ - hidden, - onReveal, - children, - label, - inline, - className, - style, -}) => { +export const SpoilerOverlay: FC = ({hidden, onReveal, children, label, inline, className}) => { const {i18n} = useLingui(); const ariaLabel = label ?? i18n._(REVEAL_SPOILER_DESCRIPTOR); return (