fix(threads): thread panel no longer squeezes the composers (#218)
CI / Build & Quality Checks (push) Canceled after 0s
CI / Trigger Desktop Build (push) Canceled after 0s
CI / Secret scan (gitleaks) (push) Canceled after 0s
CI / Docker image build & smoke test (push) Canceled after 0s
CI / Playwright smoke (e2e) (push) Canceled after 0s

Two causes. (1) Three right-hand columns don't fit under ~1500 px: the member
drawer now yields to an open content panel (thread / gallery / widgets /
threads list) on desktops ≤ 1500 px and returns when it closes, like Element.
(2) The thread composer rendered the full ten-button toolbar inside a 360 px
panel, leaving 24 px for the input ('S…') at every width — RoomInput gains a
compactLayout prop (the phone one-row '+ | input | emoji | send' layout) and
ThreadPanel uses it.

Measured headless: 1400 px thread open → drawer hidden, composers 328/168 px
(was 422 → 'Send a mes…' + 24 px); 1600 px → drawer stays, thread composer 168 px.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
This commit is contained in:
2026-09-19 13:05:10 -04:00
co-authored by Claude Opus 5
parent 8658ec05c3
commit 8b1c9fa610
4 changed files with 46 additions and 3 deletions
+13 -2
View File
@@ -169,10 +169,21 @@ interface RoomInputProps {
// message" handler). Threads pass a distinct name so the main timeline's handler
// doesn't fire for the thread composer, and vice-versa.
editableName?: string;
// [Gitea #218] Force the one-row "+ | input | emoji | send" layout regardless
// of viewport — the 360 px thread panel can't fit the full toolbar.
compactLayout?: boolean;
}
export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
(
{ editor, fileDropContainerRef, roomId, room, threadRootId, editableName = 'RoomInput' },
{
editor,
fileDropContainerRef,
roomId,
room,
threadRootId,
editableName = 'RoomInput',
compactLayout = false,
},
ref,
) => {
const mx = useMatrixClient();
@@ -254,7 +265,7 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
// ten controls inline and clips the Send button behind the editor's
// overflow:hidden. Touch-sized (44px) targets stay UA-gated: a narrow
// desktop window still has a mouse.
const compact = isMobile || screenSize === ScreenSize.Mobile;
const compact = isMobile || screenSize === ScreenSize.Mobile || compactLayout;
const [mobileToolsOpen, setMobileToolsOpen] = useState(false);
// Both gates on purpose: the class covers phone-width viewports (matches
// VoiceMessageRecorder's idle button, which lives in the same row), the