-
Notifications
You must be signed in to change notification settings - Fork 327
Open
Labels
a-contentParsing and rendering Zulip HTML content, notably message contentsParsing and rendering Zulip HTML content, notably message contentsa-msglistThe message-list screen, except what's label:a-contentThe message-list screen, except what's label:a-content
Milestone
Description
In a message-list page without a compose box, the scroll bar in a code block is misaligned, if it's in a message in the top sliver:
Bottom sliver (aligned correctly) | Top sliver (bug) |
---|---|
![]() |
![]() |
Diagnosis
This is #736 again, reappearing in fca651b; the bug is present at that commit but not its parent. We have a regression test for that issue, but it doesn't check the case where the message is in the top sliver:
testWidgets('content not asked to consume insets (including bottom), even without compose box', (tester) async {
// Regression test for: https://github.com/zulip/zulip-flutter/issues/736
const fakePadding = FakeViewPadding(left: 10, top: 10, right: 10, bottom: 10);
tester.view.viewInsets = fakePadding;
tester.view.padding = fakePadding;
await setupMessageListPage(tester, narrow: const CombinedFeedNarrow(),
messages: [eg.streamMessage(content: ContentExample.codeBlockPlain.html)]);
// Verify this message list lacks a compose box.
// (The original bug wouldn't reproduce with a compose box present.)
final state = MessageListPage.ancestorOf(tester.element(find.text("verb\natim")));
check(state.composeBoxState).isNull();
final element = tester.element(find.byType(CodeBlock));
final padding = MediaQuery.of(element).padding;
check(padding).equals(EdgeInsets.zero);
});
gnprice
Metadata
Metadata
Assignees
Labels
a-contentParsing and rendering Zulip HTML content, notably message contentsParsing and rendering Zulip HTML content, notably message contentsa-msglistThe message-list screen, except what's label:a-contentThe message-list screen, except what's label:a-content
Type
Projects
Status
No status