Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/widgets/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class SettingsPage extends StatelessWidget {
return Scaffold(
appBar: ZulipAppBar(
title: Text(zulipLocalizations.settingsPageTitle)),
body: Column(children: [
body: ListView(children: [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

settings: Make page scrollable
Fixes #1904.

The body should be separated from the summary line by a blank line, so that it makes its own paragraph.

const _ThemeSetting(),
const _BrowserPreferenceSetting(),
const _VisitFirstUnreadSetting(),
Expand Down
15 changes: 15 additions & 0 deletions test/widgets/settings_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,21 @@ void main() {
hasCheckedState: true, isChecked: expectedIsChecked);
}

testWidgets('SettingsPage is scrollable when taller than a screenful', (tester) async {
tester.view.physicalSize = const Size(200, 200);
tester.view.devicePixelRatio = 1.0;
addTearDown(tester.view.reset);
await prepare(tester);

final lastElementFinder = GlobalSettingsStore.experimentalFeatureFlags.isNotEmpty
? find.text("Experimental features")
: find.text("Mark messages as read on scroll");
check(lastElementFinder).findsNothing();

await tester.scrollUntilVisible(lastElementFinder, 100);
check(lastElementFinder).findsOne();
});

group('ThemeSetting', () {
void checkThemeSetting(WidgetTester tester, {
required ThemeSetting? expectedThemeSetting,
Expand Down