Skip to content

A local-first personal finance app

Fix mobile settings page horizontal scroll (#6100)

Matiss Janis Aboltins2c9d2a0d63cf
diff --git a/packages/desktop-client/e2e/settings.mobile.test.ts-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-1-chromium-linux.png b/packages/desktop-client/e2e/settings.mobile.test.ts-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-1-chromium-linux.png
index 5ab9d7d4cf..44379a8b9a 100644
Binary files a/packages/desktop-client/e2e/settings.mobile.test.ts-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-1-chromium-linux.png and b/packages/desktop-client/e2e/settings.mobile.test.ts-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/settings.mobile.test.ts-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-2-chromium-linux.png b/packages/desktop-client/e2e/settings.mobile.test.ts-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-2-chromium-linux.png
index fac18c5550..b7fceea5ee 100644
Binary files a/packages/desktop-client/e2e/settings.mobile.test.ts-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-2-chromium-linux.png and b/packages/desktop-client/e2e/settings.mobile.test.ts-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/settings.mobile.test.ts-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-3-chromium-linux.png b/packages/desktop-client/e2e/settings.mobile.test.ts-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-3-chromium-linux.png
index 64b55a19fa..12af42d805 100644
Binary files a/packages/desktop-client/e2e/settings.mobile.test.ts-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-3-chromium-linux.png and b/packages/desktop-client/e2e/settings.mobile.test.ts-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-3-chromium-linux.png differ
diff --git a/packages/desktop-client/src/components/settings/index.tsx b/packages/desktop-client/src/components/settings/index.tsx
index f2465fd3e7..d7d6eb5d08 100644
--- a/packages/desktop-client/src/components/settings/index.tsx
+++ b/packages/desktop-client/src/components/settings/index.tsx
@@ -213,16 +213,22 @@ export function Settings() {
marginTop: 10,
flexShrink: 0,
maxWidth: 530,
+ width: '100%',
gap: 30,
paddingBottom: MOBILE_NAV_HEIGHT,
}}
>
{isNarrowWidth && (
<View
- style={{ gap: 10, flexDirection: 'row', alignItems: 'flex-end' }}
+ style={{
+ gap: 10,
+ flexDirection: 'row',
+ alignItems: 'flex-end',
+ width: '100%',
+ }}
>
{/* The only spot to close a budget on mobile */}
- <FormField>
+ <FormField style={{ flex: 1 }}>
<FormLabel title={t('Budget name')} />
<Input
value={budgetName}
@@ -230,7 +236,7 @@ export function Settings() {
style={{ color: theme.buttonNormalDisabledText }}
/>
</FormField>
- <Button onPress={onCloseBudget}>
+ <Button onPress={onCloseBudget} style={{ flexShrink: 0 }}>
<Trans>Switch file</Trans>
</Button>
</View>
diff --git a/upcoming-release-notes/6100.md b/upcoming-release-notes/6100.md
new file mode 100644
index 0000000000..00c68cabf8
--- /dev/null
+++ b/upcoming-release-notes/6100.md
@@ -0,0 +1,7 @@
+---
+category: Bugfix
+authors: [MatissJanis]
+---
+
+Prevent the settings page from overflowing horizontally on mobile
+