A local-first personal finance app
Fix schedule searchbar (#1729)
Shaan Khoslaabd2d424a602
diff --git a/packages/desktop-client/e2e/schedules.test.js b/packages/desktop-client/e2e/schedules.test.jsindex 16b0ca222b..5935840465 100644--- a/packages/desktop-client/e2e/schedules.test.js+++ b/packages/desktop-client/e2e/schedules.test.js@@ -78,5 +78,15 @@ test.describe('Schedules', () => {'Show completed schedules',);await expect(page).toHaveScreenshot(screenshotConfig(page));++ // Schedules search shouldn't shrink with many schedules+ for (let i = 0; i < 15; i++) {+ await schedulesPage.addNewSchedule({+ payee: 'Home Depot',+ account: 'HSBC',+ amount: 0,+ });+ }+ await expect(page).toHaveScreenshot(screenshotConfig(page));});});diff --git a/packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-checks-the-page-visuals-1-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-checks-the-page-visuals-1-chromium-linux.pngindex 3964156531..8c164597f0 100644Binary files a/packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-checks-the-page-visuals-1-chromium-linux.png and b/packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-checks-the-page-visuals-1-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-1-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-1-chromium-linux.pngindex 42ed28b1b7..62dd961669 100644Binary files a/packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-1-chromium-linux.png and b/packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-1-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-2-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-2-chromium-linux.pngindex c061ae744b..00d49fff88 100644Binary files a/packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-2-chromium-linux.png and b/packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-2-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-3-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-3-chromium-linux.pngindex 7aa1665337..ec25977ca3 100644Binary files a/packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-3-chromium-linux.png and b/packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-3-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-4-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-4-chromium-linux.pngnew file mode 100644index 0000000000..6d48f2320fBinary files /dev/null and b/packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-4-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/transactions.test.js-snapshots/Transactions-creates-a-split-test-transaction-1-chromium-linux.png b/packages/desktop-client/e2e/transactions.test.js-snapshots/Transactions-creates-a-split-test-transaction-1-chromium-linux.pngindex a82cb3c9d4..be618d9e5a 100644Binary files a/packages/desktop-client/e2e/transactions.test.js-snapshots/Transactions-creates-a-split-test-transaction-1-chromium-linux.png and b/packages/desktop-client/e2e/transactions.test.js-snapshots/Transactions-creates-a-split-test-transaction-1-chromium-linux.png differdiff --git a/packages/desktop-client/src/components/schedules/index.tsx b/packages/desktop-client/src/components/schedules/index.tsxindex 02f0be80e0..a4fb235e77 100644--- a/packages/desktop-client/src/components/schedules/index.tsx+++ b/packages/desktop-client/src/components/schedules/index.tsx@@ -11,11 +11,7 @@ import Search from '../common/Search';import View from '../common/View';import { Page } from '../Page';-import {- SchedulesTable,- ROW_HEIGHT,- type ScheduleItemAction,-} from './SchedulesTable';+import { SchedulesTable, type ScheduleItemAction } from './SchedulesTable';export default function Schedules() {const { pushModal } = useActions();@@ -69,31 +65,38 @@ export default function Schedules() {return (<Page title="Schedules">- <View style={{ alignItems: 'flex-end' }}>- <Search- placeholder="Filter schedules…"- value={filter}- onChange={setFilter}- />- </View>-<Viewstyle={{- flexBasis: (ROW_HEIGHT - 1) * (Math.max(schedules.length, 1) + 1),- marginTop: 15,+ flexDirection: 'row',+ alignItems: 'center',+ padding: '0 0 15px',}}>- <SchedulesTable- schedules={schedules}- filter={filter}- statuses={statuses}- allowCompleted={true}- onSelect={onEdit}- onAction={onAction}- style={{ backgroundColor: theme.tableBackground }}- />+ <View+ style={{+ flex: 1,+ flexDirection: 'row',+ justifyContent: 'flex-end',+ }}+ >+ <Search+ placeholder="Filter schedules…"+ value={filter}+ onChange={setFilter}+ />+ </View></View>+ <SchedulesTable+ schedules={schedules}+ filter={filter}+ statuses={statuses}+ allowCompleted={true}+ onSelect={onEdit}+ onAction={onAction}+ style={{ backgroundColor: theme.tableBackground }}+ />+<Viewstyle={{flexDirection: 'row',diff --git a/upcoming-release-notes/1729.md b/upcoming-release-notes/1729.mdnew file mode 100644index 0000000000..bb086e559e--- /dev/null+++ b/upcoming-release-notes/1729.md@@ -0,0 +1,6 @@+---+category: Bugfix+authors: [shaankhosla]+---++Fix bug that makes the schedule search bar shrink when there's many schedules.