A local-first personal finance app
refactor: Replace all Stack component usages with SpaceBetween (#6039)
Matiss Janis Aboltinse786bdc39890
diff --git a/packages/component-library/package.json b/packages/component-library/package.jsonindex c724a2eebd..0773510c22 100644--- a/packages/component-library/package.json+++ b/packages/component-library/package.json@@ -40,7 +40,6 @@"./popover": "./src/Popover.tsx","./select": "./src/Select.tsx","./space-between": "./src/SpaceBetween.tsx",- "./stack": "./src/Stack.tsx","./styles": "./src/styles.ts","./text": "./src/Text.tsx","./text-one-line": "./src/TextOneLine.tsx",diff --git a/packages/component-library/src/SpaceBetween.tsx b/packages/component-library/src/SpaceBetween.tsxindex 547518f00f..a88081c329 100644--- a/packages/component-library/src/SpaceBetween.tsx+++ b/packages/component-library/src/SpaceBetween.tsx@@ -6,6 +6,7 @@ import { View } from './View';type SpaceBetweenProps = {direction?: 'horizontal' | 'vertical';gap?: number;+ wrap?: boolean;style?: CSSProperties;children: ReactNode;};@@ -13,18 +14,21 @@ type SpaceBetweenProps = {export const SpaceBetween = ({direction = 'horizontal',gap = 15,+ wrap = true,style,children,+ ...props}: SpaceBetweenProps) => {return (<Viewstyle={{- flexWrap: 'wrap',+ flexWrap: wrap ? 'wrap' : 'nowrap',flexDirection: direction === 'horizontal' ? 'row' : 'column',alignItems: 'center',gap,...style,}}+ {...props}>{children}</View>diff --git a/packages/component-library/src/Stack.tsx b/packages/component-library/src/Stack.tsxdeleted file mode 100644index bcb2817005..0000000000--- a/packages/component-library/src/Stack.tsx+++ /dev/null@@ -1,105 +0,0 @@-// @ts-strict-ignore-import React, {- Children,- type ComponentProps,- Fragment,- cloneElement,- forwardRef,- type ReactNode,- type CSSProperties,-} from 'react';--import { Text } from './Text';-import { View } from './View';--function getChildren(key, children) {- return Children.toArray(children).reduce(- (list, child) => {- if (child) {- if (- typeof child === 'object' &&- 'type' in child &&- child.type === Fragment- ) {- return list.concat(- getChildren(- child.key,- typeof child.props === 'object' && 'children' in child.props- ? child.props.children- : [],- ),- );- }- list.push({ key: key + child['key'], child });- return list;- }- return list;- },- [] as Array<{ key: string; child: ReactNode }>,- );-}--type StackProps = ComponentProps<typeof View> & {- direction?: CSSProperties['flexDirection'];- align?: string;- justify?: string;- spacing?: number;- debug?: boolean;-};-export const Stack = forwardRef<HTMLDivElement, StackProps>(- (- {- direction = 'column',- align,- justify,- spacing = 3,- children,- debug,- style,- ...props- },- ref,- ) => {- const isReversed = direction.endsWith('reverse');- const isHorizontal = direction.startsWith('row');- const validChildren = getChildren('', children);-- return (- <View- style={{- flexDirection: direction,- alignItems: align,- justifyContent: justify,- ...style,- }}- innerRef={ref}- {...props}- >- {validChildren.map(({ key, child }, index) => {- const isLastChild = validChildren.length === index + 1;-- let marginProp;- if (isHorizontal) {- marginProp = isReversed ? 'marginLeft' : 'marginRight';- } else {- marginProp = isReversed ? 'marginTop' : 'marginBottom';- }-- return cloneElement(- typeof child === 'string' ? <Text>{child}</Text> : child,- {- key,- style: {- ...(debug && { borderWidth: 1, borderColor: 'red' }),- ...(isLastChild ? null : { [marginProp]: spacing * 5 }),- ...(child.props ? child.props.style : null),- },- },- );- })}- </View>- );- },-);--Stack.displayName = 'Stack';diff --git a/packages/desktop-client/e2e/transactions.test.ts-snapshots/Transactions-filters-transactions-by-category-1-chromium-linux.png b/packages/desktop-client/e2e/transactions.test.ts-snapshots/Transactions-filters-transactions-by-category-1-chromium-linux.pngindex 1bf2834668..415af71e80 100644Binary files a/packages/desktop-client/e2e/transactions.test.ts-snapshots/Transactions-filters-transactions-by-category-1-chromium-linux.png and b/packages/desktop-client/e2e/transactions.test.ts-snapshots/Transactions-filters-transactions-by-category-1-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/transactions.test.ts-snapshots/Transactions-filters-transactions-by-category-2-chromium-linux.png b/packages/desktop-client/e2e/transactions.test.ts-snapshots/Transactions-filters-transactions-by-category-2-chromium-linux.pngindex d1dde59b32..21a40b1be1 100644Binary files a/packages/desktop-client/e2e/transactions.test.ts-snapshots/Transactions-filters-transactions-by-category-2-chromium-linux.png and b/packages/desktop-client/e2e/transactions.test.ts-snapshots/Transactions-filters-transactions-by-category-2-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/transactions.test.ts-snapshots/Transactions-filters-transactions-by-category-3-chromium-linux.png b/packages/desktop-client/e2e/transactions.test.ts-snapshots/Transactions-filters-transactions-by-category-3-chromium-linux.pngindex 56492e6126..8842974d11 100644Binary files a/packages/desktop-client/e2e/transactions.test.ts-snapshots/Transactions-filters-transactions-by-category-3-chromium-linux.png and b/packages/desktop-client/e2e/transactions.test.ts-snapshots/Transactions-filters-transactions-by-category-3-chromium-linux.png differdiff --git a/packages/desktop-client/src/components/FatalError.tsx b/packages/desktop-client/src/components/FatalError.tsxindex f8e1fcf605..1be88be762 100644--- a/packages/desktop-client/src/components/FatalError.tsx+++ b/packages/desktop-client/src/components/FatalError.tsx@@ -4,7 +4,7 @@ import { useTranslation, Trans } from 'react-i18next';import { Block } from '@actual-app/components/block';import { Button } from '@actual-app/components/button';import { Paragraph } from '@actual-app/components/paragraph';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { Text } from '@actual-app/components/text';import { View } from '@actual-app/components/view';@@ -81,7 +81,8 @@ function RenderSimple({ error }: RenderSimpleProps) {}return (- <Stack+ <SpaceBetween+ direction="vertical"style={{paddingBottom: 15,lineHeight: '1.5em',@@ -102,13 +103,14 @@ function RenderSimple({ error }: RenderSimpleProps) {for support</Trans></Text>- </Stack>+ </SpaceBetween>);}function RenderLazyLoadError() {return (- <Stack+ <SpaceBetween+ direction="vertical"style={{paddingBottom: 15,lineHeight: '1.5em',@@ -123,7 +125,7 @@ function RenderLazyLoadError() {server where the app is hosted.</Trans></Text>- </Stack>+ </SpaceBetween>);}diff --git a/packages/desktop-client/src/components/ManageRules.tsx b/packages/desktop-client/src/components/ManageRules.tsxindex d8fabf4199..1eab7f877d 100644--- a/packages/desktop-client/src/components/ManageRules.tsx+++ b/packages/desktop-client/src/components/ManageRules.tsx@@ -10,7 +10,7 @@ import React, {import { Trans, useTranslation } from 'react-i18next';import { Button } from '@actual-app/components/button';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { Text } from '@actual-app/components/text';import { theme } from '@actual-app/components/theme';import { View } from '@actual-app/components/view';@@ -366,7 +366,7 @@ export function ManageRules({flexShrink: 0,}}>- <Stack direction="row" align="center" justify="flex-end" spacing={2}>+ <SpaceBetween gap={10} style={{ justifyContent: 'flex-end' }}>{selectedInst.items.size > 0 && (<Button onPress={onDeleteSelected}><Trans count={selectedInst.items.size}>@@ -377,7 +377,7 @@ export function ManageRules({<Button variant="primary" onPress={onCreateRule}><Trans>Create new rule</Trans></Button>- </Stack>+ </SpaceBetween></View></View></SelectedProvider>diff --git a/packages/desktop-client/src/components/Notifications.tsx b/packages/desktop-client/src/components/Notifications.tsxindex f83f41efc4..ecab132114 100644--- a/packages/desktop-client/src/components/Notifications.tsx+++ b/packages/desktop-client/src/components/Notifications.tsx@@ -14,7 +14,7 @@ import { Button, ButtonWithLoading } from '@actual-app/components/button';import { useResponsive } from '@actual-app/components/hooks/useResponsive';import { AnimatedLoading } from '@actual-app/components/icons/AnimatedLoading';import { SvgDelete } from '@actual-app/components/icons/v0';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { styles } from '@actual-app/components/styles';import { Text } from '@actual-app/components/text';import { theme } from '@actual-app/components/theme';@@ -37,7 +37,7 @@ function compileMessage(onRemove?: () => void,) {return (- <Stack spacing={2}>+ <SpaceBetween direction="vertical" gap={10}>{message.split(/\n\n/).map((paragraph, idx) => {const parts = paragraph.split(/(\[[^\]]*\]\([^)]*\))/g);@@ -84,7 +84,7 @@ function compileMessage(</Text>);})}- </Stack>+ </SpaceBetween>);}@@ -180,11 +180,11 @@ function Notification({}}{...swipeHandlers}>- <Stack- align="center"- justify="space-between"- direction="row"+ <SpaceBetween+ wrap={false}style={{+ alignItems: 'center',+ justifyContent: 'space-between',padding: '14px 14px',...styles.mediumText,backgroundColor: positive@@ -204,7 +204,7 @@ function Notification({'& a': { color: 'currentColor' },}}>- <Stack align="flex-start">+ <SpaceBetween direction="vertical" style={{ alignItems: 'flex-start' }}>{title && (<Viewstyle={{@@ -269,7 +269,7 @@ function Notification({{button.title}</ButtonWithLoading>)}- </Stack>+ </SpaceBetween><Buttonvariant="bare"aria-label={t('Close')}@@ -278,7 +278,7 @@ function Notification({><SvgDelete style={{ width: 10, height: 10 }} /></Button>- </Stack>+ </SpaceBetween>{overlayLoading && (<Viewstyle={{diff --git a/packages/desktop-client/src/components/accounts/Header.tsx b/packages/desktop-client/src/components/accounts/Header.tsxindex d35fd45c4e..ef5b552518 100644--- a/packages/desktop-client/src/components/accounts/Header.tsx+++ b/packages/desktop-client/src/components/accounts/Header.tsx@@ -26,7 +26,6 @@ import { Input } from '@actual-app/components/input';import { Menu } from '@actual-app/components/menu';import { Popover } from '@actual-app/components/popover';import { SpaceBetween } from '@actual-app/components/space-between';-import { Stack } from '@actual-app/components/stack';import { styles } from '@actual-app/components/styles';import { theme } from '@actual-app/components/theme';import { Tooltip } from '@actual-app/components/tooltip';@@ -337,12 +336,7 @@ export function AccountHeader({}}/></View>- <Stack- spacing={2}- direction="row"- align="center"- style={{ marginTop: 12 }}- >+ <SpaceBetween gap={10} style={{ marginTop: 12 }}>{canSync && (<Buttonvariant="bare"@@ -385,192 +379,190 @@ export function AccountHeader({</View><View style={{ flex: 1 }} />- <SpaceBetween gap={10}>- <Search- placeholder={t('Search')}- value={search}- onChange={onSearch}- ref={searchInput}+ <Search+ placeholder={t('Search')}+ value={search}+ onChange={onSearch}+ ref={searchInput}+ />+ {workingHard ? (+ <View>+ <AnimatedLoading style={{ width: 16, height: 16 }} />+ </View>+ ) : (+ <SelectedTransactionsButton+ getTransaction={id => transactions.find(t => t.id === id)}+ onShow={onShowTransactions}+ onDuplicate={onBatchDuplicate}+ onDelete={onBatchDelete}+ onEdit={onBatchEdit}+ onRunRules={onRunRules}+ onLinkSchedule={onBatchLinkSchedule}+ onUnlinkSchedule={onBatchUnlinkSchedule}+ onCreateRule={onCreateRule}+ onSetTransfer={onSetTransfer}+ onScheduleAction={onScheduleAction}+ showMakeTransfer={showMakeTransfer}+ onMakeAsSplitTransaction={onMakeAsSplitTransaction}+ onMakeAsNonSplitTransactions={onMakeAsNonSplitTransactions}+ onMergeTransactions={onMergeTransactions}/>- {workingHard ? (- <View>- <AnimatedLoading style={{ width: 16, height: 16 }} />- </View>- ) : (- <SelectedTransactionsButton- getTransaction={id => transactions.find(t => t.id === id)}- onShow={onShowTransactions}- onDuplicate={onBatchDuplicate}- onDelete={onBatchDelete}- onEdit={onBatchEdit}- onRunRules={onRunRules}- onLinkSchedule={onBatchLinkSchedule}- onUnlinkSchedule={onBatchUnlinkSchedule}- onCreateRule={onCreateRule}- onSetTransfer={onSetTransfer}- onScheduleAction={onScheduleAction}- showMakeTransfer={showMakeTransfer}- onMakeAsSplitTransaction={onMakeAsSplitTransaction}- onMakeAsNonSplitTransactions={onMakeAsNonSplitTransactions}- onMergeTransactions={onMergeTransactions}- />- )}- <View style={{ flex: '0 0 auto' }}>- {account && (- <Tooltip- style={{- ...styles.tooltip,- marginBottom: 10,- }}- content={- account?.last_reconciled- ? t(- 'Reconciled {{ relativeTimeAgo }} ({{ absoluteDate }})',- {- relativeTimeAgo: tsToRelativeTime(- account.last_reconciled,- locale,- ),- absoluteDate: formatDate(- new Date(- parseInt(account.last_reconciled ?? '0', 10),- ),- dateFormat,- { locale },+ )}+ <View style={{ flex: '0 0 auto' }}>+ {account && (+ <Tooltip+ style={{+ ...styles.tooltip,+ marginBottom: 10,+ }}+ content={+ account?.last_reconciled+ ? t(+ 'Reconciled {{ relativeTimeAgo }} ({{ absoluteDate }})',+ {+ relativeTimeAgo: tsToRelativeTime(+ account.last_reconciled,+ locale,+ ),+ absoluteDate: formatDate(+ new Date(+ parseInt(account.last_reconciled ?? '0', 10),),- },- )- : t('Not yet reconciled')- }- placement="top"- triggerProps={{- isDisabled: reconcileOpen,+ dateFormat,+ { locale },+ ),+ },+ )+ : t('Not yet reconciled')+ }+ placement="top"+ triggerProps={{+ isDisabled: reconcileOpen,+ }}+ >+ <Button+ ref={reconcileRef}+ variant="bare"+ aria-label={t('Reconcile')}+ style={{ padding: 6 }}+ onPress={() => {+ setReconcileOpen(true);}}>- <Button- ref={reconcileRef}- variant="bare"- aria-label={t('Reconcile')}- style={{ padding: 6 }}- onPress={() => {- setReconcileOpen(true);- }}- >- <View>- <SvgLockClosed width={14} height={14} />- </View>- </Button>- <Popover- placement="bottom"- triggerRef={reconcileRef}- style={{ width: 275 }}- isOpen={reconcileOpen}- onOpenChange={() => setReconcileOpen(false)}- >- <ReconcileMenu- account={account}- onClose={() => setReconcileOpen(false)}- onReconcile={onReconcile}- />- </Popover>- </Tooltip>- )}- </View>- <Button- variant="bare"- aria-label={+ <View>+ <SvgLockClosed width={14} height={14} />+ </View>+ </Button>+ <Popover+ placement="bottom"+ triggerRef={reconcileRef}+ style={{ width: 275 }}+ isOpen={reconcileOpen}+ onOpenChange={() => setReconcileOpen(false)}+ >+ <ReconcileMenu+ account={account}+ onClose={() => setReconcileOpen(false)}+ onReconcile={onReconcile}+ />+ </Popover>+ </Tooltip>+ )}+ </View>+ <Button+ variant="bare"+ aria-label={+ splitsExpanded.state.mode === 'collapse'+ ? t('Collapse split transactions')+ : t('Expand split transactions')+ }+ style={{ padding: 6 }}+ onPress={onToggleSplits}+ >+ <View+ title={splitsExpanded.state.mode === 'collapse'? t('Collapse split transactions'): t('Expand split transactions')}- style={{ padding: 6 }}- onPress={onToggleSplits}>- <View- title={- splitsExpanded.state.mode === 'collapse'- ? t('Collapse split transactions')- : t('Expand split transactions')- }- >- {splitsExpanded.state.mode === 'collapse' ? (- <SvgArrowsShrink3 style={{ width: 14, height: 14 }} />- ) : (- <SvgArrowsExpand3 style={{ width: 14, height: 14 }} />- )}- </View>- </Button>- {account ? (- <View style={{ flex: '0 0 auto' }}>- <DialogTrigger>- <Button variant="bare" aria-label={t('Account menu')}>- <SvgDotsHorizontalTriple- width={15}- height={15}- style={{ transform: 'rotateZ(90deg)' }}+ {splitsExpanded.state.mode === 'collapse' ? (+ <SvgArrowsShrink3 style={{ width: 14, height: 14 }} />+ ) : (+ <SvgArrowsExpand3 style={{ width: 14, height: 14 }} />+ )}+ </View>+ </Button>+ {account ? (+ <View style={{ flex: '0 0 auto' }}>+ <DialogTrigger>+ <Button variant="bare" aria-label={t('Account menu')}>+ <SvgDotsHorizontalTriple+ width={15}+ height={15}+ style={{ transform: 'rotateZ(90deg)' }}+ />+ </Button>++ <Popover style={{ minWidth: 275 }}>+ <Dialog>+ <AccountMenu+ account={account}+ canSync={canSync}+ showNetWorthChart={showNetWorthChart}+ canShowBalances={+ canCalculateBalance ? canCalculateBalance() : false+ }+ isSorted={isSorted}+ showBalances={showBalances}+ showCleared={showCleared}+ showReconciled={showReconciled}+ onMenuSelect={onMenuSelect}/>- </Button>-- <Popover style={{ minWidth: 275 }}>- <Dialog>- <AccountMenu- account={account}- canSync={canSync}- showNetWorthChart={showNetWorthChart}- canShowBalances={- canCalculateBalance ? canCalculateBalance() : false- }- isSorted={isSorted}- showBalances={showBalances}- showCleared={showCleared}- showReconciled={showReconciled}- onMenuSelect={onMenuSelect}- />- </Dialog>- </Popover>- </DialogTrigger>- </View>- ) : (- <View style={{ flex: '0 0 auto' }}>- <DialogTrigger>- <Button variant="bare" aria-label={t('Account menu')}>- <SvgDotsHorizontalTriple- width={15}- height={15}- style={{ transform: 'rotateZ(90deg)' }}+ </Dialog>+ </Popover>+ </DialogTrigger>+ </View>+ ) : (+ <View style={{ flex: '0 0 auto' }}>+ <DialogTrigger>+ <Button variant="bare" aria-label={t('Account menu')}>+ <SvgDotsHorizontalTriple+ width={15}+ height={15}+ style={{ transform: 'rotateZ(90deg)' }}+ />+ </Button>++ <Popover>+ <Dialog>+ <Menu+ slot="close"+ onMenuSelect={onMenuSelect}+ items={[+ ...(isSorted+ ? [+ {+ name: 'remove-sorting',+ text: t('Remove all sorting'),+ } as const,+ ]+ : []),+ { name: 'export', text: t('Export') },+ {+ name: 'toggle-net-worth-chart',+ text: showNetWorthChart+ ? t('Hide balance chart')+ : t('Show balance chart'),+ },+ ]}/>- </Button>-- <Popover>- <Dialog>- <Menu- slot="close"- onMenuSelect={onMenuSelect}- items={[- ...(isSorted- ? [- {- name: 'remove-sorting',- text: t('Remove all sorting'),- } as const,- ]- : []),- { name: 'export', text: t('Export') },- {- name: 'toggle-net-worth-chart',- text: showNetWorthChart- ? t('Hide balance chart')- : t('Show balance chart'),- },- ]}- />- </Dialog>- </Popover>- </DialogTrigger>- </View>- )}- </SpaceBetween>- </Stack>+ </Dialog>+ </Popover>+ </DialogTrigger>+ </View>+ )}+ </SpaceBetween>{filterConditions?.length > 0 && (<FiltersStackconditions={filterConditions}diff --git a/packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsx b/packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsxindex eb993679b7..90a78fd658 100644--- a/packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsx+++ b/packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsx@@ -11,7 +11,7 @@ import {import { Trans, useTranslation } from 'react-i18next';import { Button } from '@actual-app/components/button';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { Text } from '@actual-app/components/text';import { theme } from '@actual-app/components/theme';import { View } from '@actual-app/components/view';@@ -325,7 +325,10 @@ function UserDirectoryContent({flexShrink: 0,}}>- <Stack direction="row" align="center" justify="flex-end" spacing={2}>+ <SpaceBetween+ gap={10}+ style={{ alignItems: 'center', justifyContent: 'flex-end' }}+ >{selectedInst.items.size > 0 && (<Button onPress={onDeleteSelected}><Trans count={selectedCount}>@@ -336,7 +339,7 @@ function UserDirectoryContent({<Button variant="primary" onPress={onAddUser}><Trans>Add new user</Trans></Button>- </Stack>+ </SpaceBetween></View></View></SelectedProvider>diff --git a/packages/desktop-client/src/components/banksync/BankSyncCheckboxOptions.tsx b/packages/desktop-client/src/components/banksync/BankSyncCheckboxOptions.tsxindex 0d42119c32..f690159105 100644--- a/packages/desktop-client/src/components/banksync/BankSyncCheckboxOptions.tsx+++ b/packages/desktop-client/src/components/banksync/BankSyncCheckboxOptions.tsx@@ -3,7 +3,7 @@ import { useTranslation, Trans } from 'react-i18next';import { Button } from '@actual-app/components/button';import { SvgQuestion } from '@actual-app/components/icons/v1';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { Text } from '@actual-app/components/text';import { theme } from '@actual-app/components/theme';import { Tooltip } from '@actual-app/components/tooltip';@@ -30,11 +30,8 @@ function CheckboxOption({}: CheckboxOptionProps) {if (helpMode === 'mobile') {return (- <Stack- direction="row"- align="center"- justify="space-between"- style={{ marginBottom: 5 }}+ <SpaceBetween+ style={{ marginBottom: 5, justifyContent: 'space-between' }}><Text>{children}</Text><ToggleField@@ -43,7 +40,7 @@ function CheckboxOption({onToggle={onChange}isDisabled={disabled}/>- </Stack>+ </SpaceBetween>);}@@ -90,19 +87,19 @@ function CheckboxOptionWithHelp({disabled={disabled}><Tooltip content={helpText}>- <Stack direction="row" align="center" spacing={1}>+ <SpaceBetween gap={5}><Text>{children}</Text><SvgQuestion height={12} width={12} cursor="pointer" />- </Stack>+ </SpaceBetween></Tooltip></LabeledCheckbox>);}return (- <Stack direction="column" spacing={1} style={{ marginBottom: 5 }}>- <Stack direction="row" align="center" justify="space-between">- <Stack direction="row" align="center" spacing={1}>+ <SpaceBetween direction="vertical" gap={5} style={{ marginBottom: 5 }}>+ <SpaceBetween style={{ justifyContent: 'space-between' }}>+ <SpaceBetween gap={5}><Text>{children}</Text><Buttonvariant="bare"@@ -116,14 +113,14 @@ function CheckboxOptionWithHelp({><SvgQuestion height={12} width={12} /></Button>- </Stack>+ </SpaceBetween><ToggleFieldid={id}isOn={checked}onToggle={onChange}isDisabled={disabled}/>- </Stack>+ </SpaceBetween>{showHelp && (<Textstyle={{@@ -134,7 +131,7 @@ function CheckboxOptionWithHelp({{helpText}</Text>)}- </Stack>+ </SpaceBetween>);}diff --git a/packages/desktop-client/src/components/banksync/EditSyncAccount.tsx b/packages/desktop-client/src/components/banksync/EditSyncAccount.tsxindex 6299f19fe4..87b0c536cf 100644--- a/packages/desktop-client/src/components/banksync/EditSyncAccount.tsx+++ b/packages/desktop-client/src/components/banksync/EditSyncAccount.tsx@@ -2,7 +2,7 @@ import React from 'react';import { Trans, useTranslation } from 'react-i18next';import { Button } from '@actual-app/components/button';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { Text } from '@actual-app/components/text';import { theme } from '@actual-app/components/theme';import { View } from '@actual-app/components/view';@@ -243,8 +243,8 @@ export function EditSyncAccount({ account }: EditSyncAccountProps) {<Trans>Unlink account</Trans></Button>- <Stack direction="row">- <Button style={{ marginRight: 10 }} onPress={close}>+ <SpaceBetween gap={10}>+ <Button onPress={close}><Trans>Cancel</Trans></Button><Button@@ -255,7 +255,7 @@ export function EditSyncAccount({ account }: EditSyncAccountProps) {><Trans>Save</Trans></Button>- </Stack>+ </SpaceBetween></View></>)}diff --git a/packages/desktop-client/src/components/budget/goals/BudgetAutomation.tsx b/packages/desktop-client/src/components/budget/goals/BudgetAutomation.tsxindex 41a93c4ea2..24b93be496 100644--- a/packages/desktop-client/src/components/budget/goals/BudgetAutomation.tsx+++ b/packages/desktop-client/src/components/budget/goals/BudgetAutomation.tsx@@ -1,6 +1,6 @@import { useCallback, useMemo, useReducer, useState } from 'react';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { type CSSProperties } from '@actual-app/components/styles';import {@@ -69,9 +69,9 @@ export const BudgetAutomation = ({}, [categories]);return (- <Stack- direction="column"- spacing={inline ? 0 : 1}+ <SpaceBetween+ direction="vertical"+ gap={inline ? 0 : 5}style={{ ...style, minHeight: 'fit-content' }}><BudgetAutomationReadOnly@@ -92,6 +92,6 @@ export const BudgetAutomation = ({categories={categories}/>)}- </Stack>+ </SpaceBetween>);};diff --git a/packages/desktop-client/src/components/budget/goals/BudgetAutomationEditor.tsx b/packages/desktop-client/src/components/budget/goals/BudgetAutomationEditor.tsxindex 1d744ddb6c..67325a4c32 100644--- a/packages/desktop-client/src/components/budget/goals/BudgetAutomationEditor.tsx+++ b/packages/desktop-client/src/components/budget/goals/BudgetAutomationEditor.tsx@@ -3,7 +3,7 @@ import { useTranslation, Trans } from 'react-i18next';import { InitialFocus } from '@actual-app/components/initial-focus';import { Select } from '@actual-app/components/select';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { styles } from '@actual-app/components/styles';import { Text } from '@actual-app/components/text';import { theme } from '@actual-app/components/theme';@@ -122,9 +122,9 @@ export function BudgetAutomationEditor({}return (- <Stack- direction="column"- spacing={2}+ <SpaceBetween+ direction="vertical"+ gap={10}style={{flex: 1,...styles.editorPill,@@ -134,7 +134,7 @@ export function BudgetAutomationEditor({minHeight: 'fit-content',}}>- <Stack direction="row" align="flex-start" spacing={4}>+ <SpaceBetween gap={20} style={{ alignItems: 'flex-start' }}><FormField style={{ flexShrink: 0 }}><FormLabel title={t('Type')} htmlFor="type-field" /><InitialFocus>@@ -156,8 +156,8 @@ export function BudgetAutomationEditor({)}</Text></FormField>- </Stack>+ </SpaceBetween>{automationEditor}- </Stack>+ </SpaceBetween>);}diff --git a/packages/desktop-client/src/components/budget/goals/BudgetAutomationReadOnly.tsx b/packages/desktop-client/src/components/budget/goals/BudgetAutomationReadOnly.tsxindex 09056d83ee..e2e64eacc9 100644--- a/packages/desktop-client/src/components/budget/goals/BudgetAutomationReadOnly.tsx+++ b/packages/desktop-client/src/components/budget/goals/BudgetAutomationReadOnly.tsx@@ -7,7 +7,7 @@ import {SvgCheveronDown,SvgCheveronUp,} from '@actual-app/components/icons/v1';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { type CSSProperties } from '@actual-app/components/styles';import { Text } from '@actual-app/components/text';import { theme } from '@actual-app/components/theme';@@ -79,7 +79,7 @@ export function BudgetAutomationReadOnly({}return (- <Stack direction="row" align="center" spacing={2} style={style}>+ <SpaceBetween gap={10} style={{ alignItems: 'center', ...style }}>{inline && (<Viewstyle={{@@ -114,6 +114,6 @@ export function BudgetAutomationReadOnly({><SvgDelete style={{ width: 8, height: 8, color: 'inherit' }} /></Button>- </Stack>+ </SpaceBetween>);}diff --git a/packages/desktop-client/src/components/budget/goals/editor/HistoricalAutomation.tsx b/packages/desktop-client/src/components/budget/goals/editor/HistoricalAutomation.tsxindex 1283e18f36..be189f4e5d 100644--- a/packages/desktop-client/src/components/budget/goals/editor/HistoricalAutomation.tsx+++ b/packages/desktop-client/src/components/budget/goals/editor/HistoricalAutomation.tsx@@ -1,7 +1,7 @@import { useTranslation } from 'react-i18next';import { Select } from '@actual-app/components/select';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import type {CopyTemplate,@@ -27,12 +27,7 @@ export const HistoricalAutomation = ({const { t } = useTranslation();return (- <Stack- direction="row"- align="center"- spacing={10}- style={{ marginTop: 10 }}- >+ <SpaceBetween gap={50} style={{ marginTop: 10 }}><FormField style={{ flex: 1 }}><FormLabel title={t('Mode')} htmlFor="mode-field" /><Select@@ -69,6 +64,6 @@ export const HistoricalAutomation = ({}/></FormField>- </Stack>+ </SpaceBetween>);};diff --git a/packages/desktop-client/src/components/budget/goals/editor/PercentageAutomation.tsx b/packages/desktop-client/src/components/budget/goals/editor/PercentageAutomation.tsxindex 5f03bd3f0b..cc980b9da2 100644--- a/packages/desktop-client/src/components/budget/goals/editor/PercentageAutomation.tsx+++ b/packages/desktop-client/src/components/budget/goals/editor/PercentageAutomation.tsx@@ -1,7 +1,7 @@import { useTranslation } from 'react-i18next';import { Select } from '@actual-app/components/select';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { View } from '@actual-app/components/view';import type {@@ -33,12 +33,7 @@ export const PercentageAutomation = ({return (<>- <Stack- direction="row"- align="center"- spacing={10}- style={{ marginTop: 10 }}- >+ <SpaceBetween gap={50} style={{ marginTop: 10, alignItems: 'center' }}><FormField style={{ flex: 1 }}><FormLabel title={t('Category')} htmlFor="category-field" /><CategoryAutocomplete@@ -75,13 +70,8 @@ export const PercentageAutomation = ({}/></FormField>- </Stack>- <Stack- direction="row"- align="center"- spacing={10}- style={{ marginTop: 10 }}- >+ </SpaceBetween>+ <SpaceBetween gap={50} style={{ marginTop: 10, alignItems: 'center' }}><FormField style={{ flex: 1 }}><FormLabel title={t('Percentage of')} htmlFor="previous-field" /><Select@@ -109,7 +99,7 @@ export const PercentageAutomation = ({/></FormField><View style={{ flex: 1 }} />- </Stack>+ </SpaceBetween></>);};diff --git a/packages/desktop-client/src/components/budget/goals/editor/ScheduleAutomation.tsx b/packages/desktop-client/src/components/budget/goals/editor/ScheduleAutomation.tsxindex 9309dc5d19..86723dbca2 100644--- a/packages/desktop-client/src/components/budget/goals/editor/ScheduleAutomation.tsx+++ b/packages/desktop-client/src/components/budget/goals/editor/ScheduleAutomation.tsx@@ -1,7 +1,7 @@import { useTranslation, Trans } from 'react-i18next';import { Select } from '@actual-app/components/select';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { Text } from '@actual-app/components/text';import type { ScheduleEntity } from 'loot-core/types/models';@@ -28,12 +28,7 @@ export const ScheduleAutomation = ({const { t } = useTranslation();return schedules.length ? (- <Stack- direction="row"- align="center"- spacing={10}- style={{ marginTop: 10 }}- >+ <SpaceBetween gap={50} style={{ marginTop: 10, alignItems: 'center' }}><FormField style={{ flex: 1 }}><FormLabel title={t('Schedule')} htmlFor="schedule-field" /><Select@@ -74,7 +69,7 @@ export const ScheduleAutomation = ({}/></FormField>- </Stack>+ </SpaceBetween>) : (<Text style={{ marginTop: 10 }}><Trans>diff --git a/packages/desktop-client/src/components/budget/tracking/budgetsummary/BudgetSummary.tsx b/packages/desktop-client/src/components/budget/tracking/budgetsummary/BudgetSummary.tsxindex 858a575e8d..871dc9f297 100644--- a/packages/desktop-client/src/components/budget/tracking/budgetsummary/BudgetSummary.tsx+++ b/packages/desktop-client/src/components/budget/tracking/budgetsummary/BudgetSummary.tsx@@ -9,7 +9,7 @@ import {SvgArrowButtonUp1,} from '@actual-app/components/icons/v2';import { Popover } from '@actual-app/components/popover';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { styles } from '@actual-app/components/styles';import { theme } from '@actual-app/components/theme';import { View } from '@actual-app/components/view';@@ -232,10 +232,12 @@ export function BudgetSummary({ month }: BudgetSummaryProps) {</View>{!collapsed && (- <Stack- spacing={2}+ <SpaceBetween+ direction="vertical"+ gap={10}style={{alignSelf: 'center',+ alignItems: 'flex-start',backgroundColor: theme.tableRowHeaderBackground,borderRadius: 4,padding: '10px 15px',@@ -244,7 +246,7 @@ export function BudgetSummary({ month }: BudgetSummaryProps) {><IncomeTotal /><ExpenseTotal />- </Stack>+ </SpaceBetween>)}{collapsed ? (diff --git a/packages/desktop-client/src/components/filters/FiltersMenu.jsx b/packages/desktop-client/src/components/filters/FiltersMenu.jsxindex c344c49634..1e17a1be90 100644--- a/packages/desktop-client/src/components/filters/FiltersMenu.jsx+++ b/packages/desktop-client/src/components/filters/FiltersMenu.jsx@@ -8,7 +8,7 @@ import { Button } from '@actual-app/components/button';import { Menu } from '@actual-app/components/menu';import { Popover } from '@actual-app/components/popover';import { Select } from '@actual-app/components/select';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { styles } from '@actual-app/components/styles';import { Text } from '@actual-app/components/text';import { theme } from '@actual-app/components/theme';@@ -105,7 +105,7 @@ function ConfigureField({return (<FocusScope><View style={{ marginBottom: 10 }}>- <Stack direction="row" align="flex-start">+ <SpaceBetween style={{ alignItems: 'flex-start' }}>{field === 'amount' || field === 'date' ? (<Selectoptions={@@ -144,9 +144,7 @@ function ConfigureField({<View style={{ flexGrow: 1 }}>{titleFirst(mapField(field))}</View></View>)}-- <View style={{ flex: 1 }} />- </Stack>+ </SpaceBetween></View><View@@ -158,11 +156,9 @@ function ConfigureField({{field === 'saved' && t('Existing filters will be cleared')}</View>- <Stack- direction="row"- align="flex-start"- spacing={1}- style={{ flexWrap: 'wrap' }}+ <SpaceBetween+ gap={5}+ style={{ alignItems: 'flex-start', marginBottom: 15 }}>{type === 'boolean' ? (<>@@ -187,39 +183,25 @@ function ConfigureField({</>) : (<>- <Stack- direction="row"- align="flex-start"- spacing={1}- style={{ flexWrap: 'wrap' }}- >- {ops.slice(0, 3).map(currOp => (- <OpButton- key={currOp}- op={currOp}- isSelected={currOp === op}- onPress={() => dispatch({ type: 'set-op', op: currOp })}- />- ))}- </Stack>- <Stack- direction="row"- align="flex-start"- spacing={1}- style={{ flexWrap: 'wrap' }}- >- {ops.slice(3, ops.length).map(currOp => (- <OpButton- key={currOp}- op={currOp}- isSelected={currOp === op}- onPress={() => dispatch({ type: 'set-op', op: currOp })}- />- ))}- </Stack>+ {ops.slice(0, 3).map(currOp => (+ <OpButton+ key={currOp}+ op={currOp}+ isSelected={currOp === op}+ onPress={() => dispatch({ type: 'set-op', op: currOp })}+ />+ ))}+ {ops.slice(3, ops.length).map(currOp => (+ <OpButton+ key={currOp}+ op={currOp}+ isSelected={currOp === op}+ onPress={() => dispatch({ type: 'set-op', op: currOp })}+ />+ ))}</>)}- </Stack>+ </SpaceBetween><FormonSubmit={e => {@@ -289,17 +271,18 @@ function ConfigureField({/>)}- <Stack- direction="row"- justify="flex-end"- align="center"- style={{ marginTop: 15 }}+ <SpaceBetween+ style={{+ marginTop: 15,+ justifyContent: 'flex-end',+ alignItems: 'center',+ }}><View style={{ flex: 1 }} /><Button variant="primary" type="submit"><Trans>Apply</Trans></Button>- </Stack>+ </SpaceBetween></Form></FocusScope>);diff --git a/packages/desktop-client/src/components/filters/FiltersStack.tsx b/packages/desktop-client/src/components/filters/FiltersStack.tsxindex fc29bb5f97..d9548eda8b 100644--- a/packages/desktop-client/src/components/filters/FiltersStack.tsx+++ b/packages/desktop-client/src/components/filters/FiltersStack.tsx@@ -1,6 +1,6 @@import React from 'react';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { View } from '@actual-app/components/view';import {@@ -40,11 +40,10 @@ export function FiltersStack({}) {return (<View>- <Stack- spacing={2}- direction="row"- justify="flex-start"- align="flex-start"+ <SpaceBetween+ direction="horizontal"+ gap={10}+ style={{ justifyContent: 'flex-start', alignItems: 'flex-start' }}><AppliedFiltersconditions={conditions}@@ -62,7 +61,7 @@ export function FiltersStack({onReloadSavedFilter={onReloadSavedFilter}savedFilters={savedFilters}/>- </Stack>+ </SpaceBetween></View>);}diff --git a/packages/desktop-client/src/components/filters/NameFilter.tsx b/packages/desktop-client/src/components/filters/NameFilter.tsxindex 61dd564116..c439b5fddf 100644--- a/packages/desktop-client/src/components/filters/NameFilter.tsx+++ b/packages/desktop-client/src/components/filters/NameFilter.tsx@@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next';import { Button } from '@actual-app/components/button';import { Input } from '@actual-app/components/input';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { Text } from '@actual-app/components/text';import { theme } from '@actual-app/components/theme';@@ -43,11 +43,12 @@ export function NameFilter({onAddUpdate();}}>- <Stack- direction="row"- justify="flex-end"- align="center"- style={{ padding: 10 }}+ <SpaceBetween+ style={{+ padding: 10,+ justifyContent: 'flex-end',+ alignItems: 'center',+ }}><FormField style={{ flex: 1 }}><FormLabel@@ -65,13 +66,13 @@ export function NameFilter({<Button variant="primary" type="submit" style={{ marginTop: 18 }}>{adding ? t('Add') : t('Update')}</Button>- </Stack>+ </SpaceBetween></Form>)}{err && (- <Stack direction="row" align="center" style={{ padding: 10 }}>+ <SpaceBetween style={{ padding: 10, alignItems: 'center' }}><Text style={{ color: theme.errorText }}>{err}</Text>- </Stack>+ </SpaceBetween>)}</>);diff --git a/packages/desktop-client/src/components/filters/OpButton.tsx b/packages/desktop-client/src/components/filters/OpButton.tsxindex 8e0be7ff06..d1dc8572c0 100644--- a/packages/desktop-client/src/components/filters/OpButton.tsx+++ b/packages/desktop-client/src/components/filters/OpButton.tsx@@ -20,7 +20,6 @@ export function OpButton({ op, isSelected, style, onPress }: OpButtonProps) {style={style}className={css({backgroundColor: theme.pillBackground,- marginBottom: 5,...(isSelected && {color: theme.buttonNormalSelectedText,'&,:hover,:active': {diff --git a/packages/desktop-client/src/components/manager/subscribe/OpenIdForm.tsx b/packages/desktop-client/src/components/manager/subscribe/OpenIdForm.tsxindex 30b9419a00..2b828d0744 100644--- a/packages/desktop-client/src/components/manager/subscribe/OpenIdForm.tsx+++ b/packages/desktop-client/src/components/manager/subscribe/OpenIdForm.tsx@@ -7,7 +7,7 @@ import { useResponsive } from '@actual-app/components/hooks/useResponsive';import { ResponsiveInput } from '@actual-app/components/input';import { Menu } from '@actual-app/components/menu';import { Select } from '@actual-app/components/select';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { styles } from '@actual-app/components/styles';import { Text } from '@actual-app/components/text';import { theme } from '@actual-app/components/theme';@@ -130,7 +130,10 @@ export function OpenIdForm({onProviderChange={handleProviderChange}defaultValue={providerName}/>- <Stack direction="column" style={{ marginTop: 5 }}>+ <SpaceBetween+ direction="vertical"+ style={{ marginTop: 5, alignItems: 'stretch' }}+ ><FormField style={{ flex: 1 }}>{!submitButtonDisabled && (<View>@@ -144,7 +147,7 @@ export function OpenIdForm({</View>)}</FormField>- </Stack>+ </SpaceBetween><labelhtmlFor="issuer-field"style={{@@ -166,7 +169,7 @@ export function OpenIdForm({{tip}</Text></label>{' '}- <Stack>+ <SpaceBetween direction="vertical" style={{ alignItems: 'stretch' }}><FormField style={{ flex: 1 }}><FormLabel title={t('Client ID')} htmlFor="clientid-field" /><ResponsiveInput@@ -211,7 +214,7 @@ export function OpenIdForm({</label></FormField>- <Stack direction="row" justify="flex-end" align="center">+ <SpaceBetween style={{ justifyContent: 'flex-end' }}>{otherButtons}<ButtonWithLoadingvariant="primary"@@ -220,10 +223,10 @@ export function OpenIdForm({isDisabled={submitButtonDisabled}style={isNarrowWidth ? { padding: 10 } : undefined}>- OK+ <Trans>OK</Trans></ButtonWithLoading>- </Stack>- </Stack>+ </SpaceBetween>+ </SpaceBetween></>);}diff --git a/packages/desktop-client/src/components/mobile/banksync/BankSyncAccountsListItem.tsx b/packages/desktop-client/src/components/mobile/banksync/BankSyncAccountsListItem.tsxindex 1d4bb12fce..367752328f 100644--- a/packages/desktop-client/src/components/mobile/banksync/BankSyncAccountsListItem.tsx+++ b/packages/desktop-client/src/components/mobile/banksync/BankSyncAccountsListItem.tsx@@ -1,8 +1,9 @@import { Trans } from 'react-i18next';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { Text } from '@actual-app/components/text';import { theme } from '@actual-app/components/theme';+import { View } from '@actual-app/components/view';import { tsToRelativeTime } from 'loot-core/shared/util';import { type AccountEntity } from 'loot-core/types/models';@@ -29,11 +30,8 @@ export function BankSyncAccountsListItem({: null;return (- <Stack+ <Viewdata-testid="bank-sync-account"- direction="row"- align="center"- spacing={12}style={{backgroundColor: theme.tableBackground,borderBottomWidth: 1,@@ -45,53 +43,59 @@ export function BankSyncAccountsListItem({}}onClick={() => onAction(account, isLinked ? 'edit' : 'link')}>- <Stack spacing={1} style={{ flex: 1 }}>- <Text- style={{- fontSize: 15,- fontWeight: 500,- color: theme.tableText,- }}+ <SpaceBetween gap={60}>+ <SpaceBetween+ direction="vertical"+ gap={5}+ style={{ flex: 1, alignItems: 'flex-start' }}>- {account.name}- </Text>- {isLinked && account.bankName && (- <Text- style={{- fontSize: 13,- color: theme.pageTextSubdued,- }}- >- {account.bankName}- </Text>- )}- {isLinked && lastSyncString && (<Textstyle={{- fontSize: 13,- color: theme.pageTextSubdued,+ fontSize: 15,+ fontWeight: 500,+ color: theme.tableText,}}- data-vrt-mask>- <Trans>Last sync: {{ time: lastSyncString }}</Trans>+ {account.name}</Text>- )}- </Stack>+ {isLinked && account.bankName && (+ <Text+ style={{+ fontSize: 13,+ color: theme.pageTextSubdued,+ }}+ >+ {account.bankName}+ </Text>+ )}+ {isLinked && lastSyncString && (+ <Text+ style={{+ fontSize: 13,+ color: theme.pageTextSubdued,+ }}+ data-vrt-mask+ >+ <Trans>Last sync: {{ time: lastSyncString }}</Trans>+ </Text>+ )}+ </SpaceBetween>- <span- style={{- borderRadius: 4,- padding: '5px 10px',- backgroundColor: theme.noticeBackground,- border: '1px solid ' + theme.noticeBackground,- color: theme.noticeTextDark,- fontSize: 13,- fontWeight: 500,- flexShrink: 0,- }}- >- {isLinked ? <Trans>Edit</Trans> : <Trans>Link account</Trans>}- </span>- </Stack>+ <span+ style={{+ borderRadius: 4,+ padding: '5px 10px',+ backgroundColor: theme.noticeBackground,+ border: '1px solid ' + theme.noticeBackground,+ color: theme.noticeTextDark,+ fontSize: 13,+ fontWeight: 500,+ flexShrink: 0,+ }}+ >+ {isLinked ? <Trans>Edit</Trans> : <Trans>Link account</Trans>}+ </span>+ </SpaceBetween>+ </View>);}diff --git a/packages/desktop-client/src/components/mobile/banksync/MobileBankSyncAccountEditPage.tsx b/packages/desktop-client/src/components/mobile/banksync/MobileBankSyncAccountEditPage.tsxindex a22d29efba..7df58c19eb 100644--- a/packages/desktop-client/src/components/mobile/banksync/MobileBankSyncAccountEditPage.tsx+++ b/packages/desktop-client/src/components/mobile/banksync/MobileBankSyncAccountEditPage.tsx@@ -3,7 +3,7 @@ import { useTranslation, Trans } from 'react-i18next';import { useParams } from 'react-router';import { Button } from '@actual-app/components/button';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { Text } from '@actual-app/components/text';import { theme } from '@actual-app/components/theme';import { View } from '@actual-app/components/view';@@ -172,14 +172,14 @@ export function MobileBankSyncAccountEditPage() {<Trans>Unlink account</Trans></Button>- <Stack direction="row" style={{ gap: 10 }}>+ <SpaceBetween gap={10}><Button onPress={handleCancel}><Trans>Cancel</Trans></Button><Button variant="primary" onPress={handleSave}><Trans>Save</Trans></Button>- </Stack>+ </SpaceBetween></View></View></Page>diff --git a/packages/desktop-client/src/components/modals/BudgetAutomationsModal.tsx b/packages/desktop-client/src/components/modals/BudgetAutomationsModal.tsxindex ae44235180..eaeef4968c 100644--- a/packages/desktop-client/src/components/modals/BudgetAutomationsModal.tsx+++ b/packages/desktop-client/src/components/modals/BudgetAutomationsModal.tsx@@ -3,7 +3,7 @@ import { Trans, useTranslation } from 'react-i18next';import { Button } from '@actual-app/components/button';import { AnimatedLoading } from '@actual-app/components/icons/AnimatedLoading';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { theme } from '@actual-app/components/theme';import { View } from '@actual-app/components/view';import uniqueId from 'lodash/uniqueId';@@ -73,8 +73,9 @@ function BudgetAutomationList({};return (- <Stack- spacing={4}+ <SpaceBetween+ direction="vertical"+ gap={20}style={{overflowY: 'scroll',...style,@@ -100,7 +101,7 @@ function BudgetAutomationList({<Button onPress={onAdd}><Trans>Add new automation</Trans></Button>- </Stack>+ </SpaceBetween>);}@@ -130,7 +131,7 @@ function BudgetAutomationMigrationWarning({return (<Warning style={style}>- <Stack style={{ minHeight: 'unset' }}>+ <SpaceBetween direction="vertical" style={{ minHeight: 'unset' }}><View><Trans>This category uses notes-based automations (formerly “budget@@ -156,7 +157,7 @@ function BudgetAutomationMigrationWarning({</View></Trans></View>- </Stack>+ </SpaceBetween></Warning>);}@@ -209,7 +210,7 @@ export function BudgetAutomationsModal({ categoryId }: { categoryId: string }) {}}>{({ state: { close } }) => (- <Stack direction="column" style={{ height: '100%' }}>+ <SpaceBetween direction="vertical" style={{ height: '100%' }}><ModalHeadertitle={t('Budget automations: {{category}}', {category: currentCategory?.name,@@ -231,7 +232,7 @@ export function BudgetAutomationsModal({ categoryId }: { categoryId: string }) {<AnimatedLoading style={{ width: 20, height: 20 }} /></View>) : (- <Stack>+ <SpaceBetween direction="vertical">{needsMigration && (<BudgetAutomationMigrationWarning categoryId={categoryId} />)}@@ -246,14 +247,15 @@ export function BudgetAutomationsModal({ categoryId }: { categoryId: string }) {schedules={schedules}categories={categories}/>- </Stack>+ </SpaceBetween>)}<View style={{ flexGrow: 1 }} />- <Stack- direction="row"- justify="flex-end"- align="center"- style={{ marginTop: 20 }}+ <SpaceBetween+ style={{+ marginTop: 20,+ justifyContent: 'flex-end',+ alignItems: 'center',+ }}>{!needsMigration && (<Link@@ -280,8 +282,8 @@ export function BudgetAutomationsModal({ categoryId }: { categoryId: string }) {<Button variant="primary" onPress={() => onSave(close)}><Trans>Save</Trans></Button>- </Stack>- </Stack>+ </SpaceBetween>+ </SpaceBetween>)}</Modal>);diff --git a/packages/desktop-client/src/components/modals/EditAccess.tsx b/packages/desktop-client/src/components/modals/EditAccess.tsxindex dafcb146b6..61f52c727f 100644--- a/packages/desktop-client/src/components/modals/EditAccess.tsx+++ b/packages/desktop-client/src/components/modals/EditAccess.tsx@@ -3,7 +3,7 @@ import { Trans, useTranslation } from 'react-i18next';import { Button } from '@actual-app/components/button';import { Select } from '@actual-app/components/select';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { styles } from '@actual-app/components/styles';import { Text } from '@actual-app/components/text';import { theme } from '@actual-app/components/theme';@@ -102,7 +102,7 @@ export function EditUserAccess({title={t('User Access')}rightContent={<ModalCloseButton onPress={close} />}/>- <Stack direction="row" style={{ marginTop: 10 }}>+ <SpaceBetween style={{ marginTop: 10 }}><FormField style={{ flex: 1 }}><FormLabel title={t('User')} htmlFor="user-field" />{availableUsers.length > 0 && (@@ -135,20 +135,17 @@ export function EditUserAccess({</Text>)}</FormField>- </Stack>+ </SpaceBetween>- <Stack- direction="row"- justify="flex-end"- align="center"- style={{ marginTop: 20 }}+ <SpaceBetween+ gap={10}+ style={{+ marginTop: 20,+ justifyContent: 'flex-end',+ }}>{error && <Text style={{ color: theme.errorText }}>{error}</Text>}- <Button- variant="bare"- style={{ marginRight: 10 }}- onPress={() => dispatch(popModal())}- >+ <Button variant="bare" onPress={() => dispatch(popModal())}><Trans>Cancel</Trans></Button><Button@@ -158,7 +155,7 @@ export function EditUserAccess({>{defaultUserAccess.userId ? t('Save') : t('Add')}</Button>- </Stack>+ </SpaceBetween></>)}</Modal>diff --git a/packages/desktop-client/src/components/modals/EditUser.tsx b/packages/desktop-client/src/components/modals/EditUser.tsxindex e0bfb197cf..cdc8f45118 100644--- a/packages/desktop-client/src/components/modals/EditUser.tsx+++ b/packages/desktop-client/src/components/modals/EditUser.tsx@@ -4,7 +4,7 @@ import { Trans, useTranslation } from 'react-i18next';import { Button } from '@actual-app/components/button';import { Input } from '@actual-app/components/input';import { Select } from '@actual-app/components/select';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { styles } from '@actual-app/components/styles';import { Text } from '@actual-app/components/text';import { theme } from '@actual-app/components/theme';@@ -210,7 +210,7 @@ function EditUser({ defaultUser, onSave: originalOnSave }: EditUserProps) {return (<>- <Stack direction="row" style={{ marginTop: 10 }}>+ <SpaceBetween style={{ marginTop: 10 }}><FormField style={{ flex: 1 }}><FormLabel title={t('Username')} htmlFor="name-field" /><Input@@ -252,7 +252,7 @@ function EditUser({ defaultUser, onSave: originalOnSave }: EditUserProps) {<Trans>Enabled</Trans></label></View>- </Stack>+ </SpaceBetween>{isOwner && (<labelstyle={{@@ -266,7 +266,7 @@ function EditUser({ defaultUser, onSave: originalOnSave }: EditUserProps) {</Trans></label>)}- <Stack direction="row" style={{ marginTop: 10 }}>+ <SpaceBetween style={{ marginTop: 10 }}><FormField style={{ flex: 1 }}><FormLabel title={t('Display Name')} htmlFor="displayname-field" /><Input@@ -302,8 +302,8 @@ function EditUser({ defaultUser, onSave: originalOnSave }: EditUserProps) {</Trans></View></FormField>- </Stack>- <Stack direction="row" style={{ marginTop: 10, width: '100px' }}>+ </SpaceBetween>+ <SpaceBetween style={{ marginTop: 10, width: '100px' }}><FormField style={{ flex: 1 }}><FormLabel title={t('Role')} htmlFor="role-field" /><Select@@ -317,27 +317,24 @@ function EditUser({ defaultUser, onSave: originalOnSave }: EditUserProps) {}}/></FormField>- </Stack>+ </SpaceBetween><RoleDescription />- <Stack- direction="row"- justify="flex-end"- align="center"- style={{ marginTop: 20 }}+ <SpaceBetween+ gap={10}+ style={{+ marginTop: 20,+ justifyContent: 'flex-end',+ }}>{error && <Text style={{ color: theme.errorText }}>{error}</Text>}- <Button- variant="bare"- style={{ marginRight: 10 }}- onPress={() => dispatch(popModal())}- >+ <Button variant="bare" onPress={() => dispatch(popModal())}><Trans>Cancel</Trans></Button><Button variant="primary" onPress={onSave}>{isExistingUser ? t('Save') : t('Add')}</Button>- </Stack>+ </SpaceBetween></>);}diff --git a/packages/desktop-client/src/components/modals/ImportTransactionsModal/FieldMappings.tsx b/packages/desktop-client/src/components/modals/ImportTransactionsModal/FieldMappings.tsxindex 4370ea9040..5294663da4 100644--- a/packages/desktop-client/src/components/modals/ImportTransactionsModal/FieldMappings.tsx+++ b/packages/desktop-client/src/components/modals/ImportTransactionsModal/FieldMappings.tsx@@ -1,7 +1,7 @@import React from 'react';import { useTranslation } from 'react-i18next';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { View } from '@actual-app/components/view';import { SelectField } from './SelectField';@@ -51,13 +51,8 @@ export function FieldMappings({return (<View><SectionLabel title={t('CSV FIELDS')} />- <Stack- direction="row"- align="flex-start"- spacing={1}- style={{ marginTop: 5 }}- >- <View style={{ flex: 1, marginRight: 10 }}>+ <SpaceBetween gap={10} style={{ marginTop: 5, alignItems: 'flex-start' }}>+ <View style={{ flex: 1 }}><SubLabel title={t('Date')} /><SelectFieldoptions={options}@@ -67,7 +62,7 @@ export function FieldMappings({firstTransaction={transactions[0]}/></View>- <View style={{ flex: 1, marginRight: 10 }}>+ <View style={{ flex: 1 }}><SubLabel title={t('Payee')} /><SelectFieldoptions={options}@@ -77,7 +72,7 @@ export function FieldMappings({firstTransaction={transactions[0]}/></View>- <View style={{ flex: 1, marginRight: 10 }}>+ <View style={{ flex: 1 }}><SubLabel title={t('Notes')} /><SelectFieldoptions={options}@@ -87,7 +82,7 @@ export function FieldMappings({firstTransaction={transactions[0]}/></View>- <View style={{ flex: 1, marginRight: 10 }}>+ <View style={{ flex: 1 }}><SubLabel title={t('Category')} /><SelectFieldoptions={options}@@ -146,7 +141,7 @@ export function FieldMappings({</View></>)}- </Stack>+ </SpaceBetween></View>);}diff --git a/packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx b/packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsxindex 480ff6bdae..e5777f2f21 100644--- a/packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx+++ b/packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx@@ -10,7 +10,7 @@ import { useTranslation, Trans } from 'react-i18next';import { Button, ButtonWithLoading } from '@actual-app/components/button';import { Input } from '@actual-app/components/input';import { Select } from '@actual-app/components/select';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { Text } from '@actual-app/components/text';import { theme } from '@actual-app/components/theme';import { View } from '@actual-app/components/view';@@ -939,11 +939,9 @@ export function ImportTransactionsModal({{/*Import Options */}{(filetype === 'qif' || filetype === 'csv') && (<View style={{ marginTop: 10 }}>- <Stack- direction="row"- align="flex-start"- spacing={1}- style={{ marginTop: 5 }}+ <SpaceBetween+ gap={5}+ style={{ marginTop: 5, alignItems: 'flex-start' }}>{/* Date Format */}<View>@@ -1081,7 +1079,7 @@ export function ImportTransactionsModal({</>)}</View>- </Stack>+ </SpaceBetween></View>)}diff --git a/packages/desktop-client/src/components/modals/ImportTransactionsModal/Transaction.tsx b/packages/desktop-client/src/components/modals/ImportTransactionsModal/Transaction.tsxindex 96ae6964e2..e2712c6898 100644--- a/packages/desktop-client/src/components/modals/ImportTransactionsModal/Transaction.tsx+++ b/packages/desktop-client/src/components/modals/ImportTransactionsModal/Transaction.tsx@@ -2,7 +2,7 @@ import React, { type ComponentProps, useMemo } from 'react';import { useTranslation } from 'react-i18next';import { SvgDownAndRightArrow } from '@actual-app/components/icons/v2';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { styles } from '@actual-app/components/styles';import { theme } from '@actual-app/components/theme';import { Tooltip } from '@actual-app/components/tooltip';@@ -190,12 +190,12 @@ export function Transaction({<Field width={200}>{transaction.isMatchedTransaction ? (<View>- <Stack direction="row" align="flex-start">+ <SpaceBetween style={{ alignItems: 'flex-start' }}><View><SvgDownAndRightArrow width={16} height={16} /></View><View>{formatDate(transaction.date ?? null, dateFormat)}</View>- </Stack>+ </SpaceBetween></View>) : showParsed ? (<ParsedDatediff --git a/packages/desktop-client/src/components/modals/TrackingBudgetSummaryModal.tsx b/packages/desktop-client/src/components/modals/TrackingBudgetSummaryModal.tsxindex c98ad9b89b..c5cf637f4f 100644--- a/packages/desktop-client/src/components/modals/TrackingBudgetSummaryModal.tsx+++ b/packages/desktop-client/src/components/modals/TrackingBudgetSummaryModal.tsx@@ -1,7 +1,7 @@import React from 'react';import { useTranslation } from 'react-i18next';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { styles } from '@actual-app/components/styles';import { sheetForMonth } from 'loot-core/shared/months';@@ -37,17 +37,19 @@ export function TrackingBudgetSummaryModal({rightContent={<ModalCloseButton onPress={close} />}/><SheetNameProvider name={sheetForMonth(month)}>- <Stack- spacing={2}+ <SpaceBetween+ direction="vertical"+ gap={10}style={{alignSelf: 'center',+ alignItems: 'flex-start',backgroundColor: 'transparent',borderRadius: 4,}}><IncomeTotal style={{ ...styles.mediumText }} /><ExpenseTotal style={{ ...styles.mediumText }} />- </Stack>+ </SpaceBetween><Savedprojected={month >= currentMonth}style={{ ...styles.mediumText, marginTop: 20 }}diff --git a/packages/desktop-client/src/components/modals/TransferOwnership.tsx b/packages/desktop-client/src/components/modals/TransferOwnership.tsxindex 6a67ef910a..cd32c40e8b 100644--- a/packages/desktop-client/src/components/modals/TransferOwnership.tsx+++ b/packages/desktop-client/src/components/modals/TransferOwnership.tsx@@ -3,7 +3,7 @@ import { Trans, useTranslation } from 'react-i18next';import { Button } from '@actual-app/components/button';import { Select } from '@actual-app/components/select';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { styles } from '@actual-app/components/styles';import { Text } from '@actual-app/components/text';import { theme } from '@actual-app/components/theme';@@ -112,7 +112,7 @@ export function TransferOwnership({title={t('Transfer ownership')}rightContent={<ModalCloseButton onPress={close} />}/>- <Stack direction="row" style={{ marginTop: 10 }}>+ <SpaceBetween style={{ marginTop: 10 }}><FormField style={{ flex: 1 }}><FormLabel title={t('User')} htmlFor="user-field" />{availableUsers.length > 0 && (@@ -171,13 +171,14 @@ export function TransferOwnership({</Text>)}</FormField>- </Stack>+ </SpaceBetween>- <Stack- direction="row"- justify="flex-end"- align="center"- style={{ marginTop: 20 }}+ <SpaceBetween+ style={{+ marginTop: 20,+ justifyContent: 'flex-end',+ alignItems: 'center',+ }}>{error && <Text style={{ color: theme.errorText }}>{error}</Text>}<Button@@ -219,7 +220,7 @@ export function TransferOwnership({>{isTransferring ? t('Transferring...') : t('Transfer ownership')}</Button>- </Stack>+ </SpaceBetween></>)}</Modal>diff --git a/packages/desktop-client/src/components/modals/UnmigrateBudgetAutomationsModal.tsx b/packages/desktop-client/src/components/modals/UnmigrateBudgetAutomationsModal.tsxindex 5cea1b3cbb..da32cc70e3 100644--- a/packages/desktop-client/src/components/modals/UnmigrateBudgetAutomationsModal.tsx+++ b/packages/desktop-client/src/components/modals/UnmigrateBudgetAutomationsModal.tsx@@ -3,7 +3,7 @@ import { Trans, useTranslation } from 'react-i18next';import { Button } from '@actual-app/components/button';import { AnimatedLoading } from '@actual-app/components/icons/AnimatedLoading';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { View } from '@actual-app/components/view';import { send } from 'loot-core/platform/client/fetch';@@ -109,7 +109,7 @@ export function UnmigrateBudgetAutomationsModal({}}>{({ state: { close } }) => (- <Stack direction="column" style={{ height: '100%' }} spacing={3}>+ <SpaceBetween direction="vertical" style={{ height: '100%' }}><ModalHeadertitle={t('Un-migrate automations: {{category}}', {category: category?.name,@@ -127,7 +127,10 @@ export function UnmigrateBudgetAutomationsModal({<AnimatedLoading style={{ width: 20, height: 20 }} /></View>) : (- <Stack spacing={3} style={{ overflowY: 'auto', flex: 1 }}>+ <SpaceBetween+ direction="vertical"+ style={{ overflowY: 'auto', flex: 1 }}+ ><View style={{ display: 'inline-block', minHeight: 'unset' }}><Trans>If the automation UI isn't working for you, you can@@ -161,9 +164,9 @@ export function UnmigrateBudgetAutomationsModal({})}onChange={setEditedNotes}/>- </Stack>+ </SpaceBetween>)}- <Stack direction="row" justify="flex-end" spacing={2}>+ <SpaceBetween gap={10} style={{ justifyContent: 'flex-end' }}><Button onPress={() => close()}><Trans>Cancel</Trans></Button>@@ -179,8 +182,8 @@ export function UnmigrateBudgetAutomationsModal({)}<Trans>Save notes & un-migrate</Trans></Button>- </Stack>- </Stack>+ </SpaceBetween>+ </SpaceBetween>)}</Modal>);diff --git a/packages/desktop-client/src/components/reports/SaveReportChoose.tsx b/packages/desktop-client/src/components/reports/SaveReportChoose.tsxindex 57a703a88d..cc349d12d8 100644--- a/packages/desktop-client/src/components/reports/SaveReportChoose.tsx+++ b/packages/desktop-client/src/components/reports/SaveReportChoose.tsx@@ -3,7 +3,6 @@ import { Form } from 'react-aria-components';import { Trans } from 'react-i18next';import { Button } from '@actual-app/components/button';-import { Stack } from '@actual-app/components/stack';import { Text } from '@actual-app/components/text';import { theme } from '@actual-app/components/theme';import { View } from '@actual-app/components/view';@@ -56,22 +55,23 @@ export function SaveReportChoose({ onApply }: SaveReportChooseProps) {onChange={(v: string) => setValue(v)}/>- <Stack- direction="row"- justify="flex-end"- align="center"- style={{ marginTop: 15 }}+ <View+ style={{+ marginTop: 15,+ flexDirection: 'row',+ justifyContent: 'flex-end',+ alignItems: 'center',+ }}>- <View style={{ flex: 1 }} /><Button variant="primary" type="submit"><Trans>Apply</Trans></Button>- </Stack>+ </View></Form>{err !== '' ? (- <Stack direction="row" align="center" style={{ padding: 10 }}>+ <View style={{ padding: 10, alignItems: 'center' }}><Text style={{ color: theme.errorText }}>{err}</Text>- </Stack>+ </View>) : (<View />)}diff --git a/packages/desktop-client/src/components/reports/SaveReportDelete.tsx b/packages/desktop-client/src/components/reports/SaveReportDelete.tsxindex 1ff65bac49..798f360472 100644--- a/packages/desktop-client/src/components/reports/SaveReportDelete.tsx+++ b/packages/desktop-client/src/components/reports/SaveReportDelete.tsx@@ -2,7 +2,7 @@ import React from 'react';import { Trans } from 'react-i18next';import { Button } from '@actual-app/components/button';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { Text } from '@actual-app/components/text';import { theme } from '@actual-app/components/theme';import { View } from '@actual-app/components/view';@@ -34,11 +34,12 @@ export function SaveReportDelete({</Text></View>- <Stack- direction="row"- justify="flex-end"- align="center"- style={{ marginTop: 15 }}+ <SpaceBetween+ style={{+ marginTop: 15,+ justifyContent: 'flex-end',+ alignItems: 'center',+ }}><View style={{ flex: 1 }} /><Button variant="primary" autoFocus onPress={onDelete}>@@ -47,7 +48,7 @@ export function SaveReportDelete({<Button variant="primary" onPress={onClose}><Trans>No</Trans></Button>- </Stack>+ </SpaceBetween></>);}diff --git a/packages/desktop-client/src/components/reports/SaveReportName.tsx b/packages/desktop-client/src/components/reports/SaveReportName.tsxindex 5d6a8b6e78..7a5acce83b 100644--- a/packages/desktop-client/src/components/reports/SaveReportName.tsx+++ b/packages/desktop-client/src/components/reports/SaveReportName.tsx@@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next';import { Button } from '@actual-app/components/button';import { Input } from '@actual-app/components/input';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { Text } from '@actual-app/components/text';import { theme } from '@actual-app/components/theme';import { View } from '@actual-app/components/view';@@ -58,11 +58,12 @@ export function SaveReportName({});}}>- <Stack- direction="row"- justify="flex-end"- align="center"- style={{ padding: 15 }}+ <SpaceBetween+ style={{+ padding: 15,+ justifyContent: 'flex-end',+ alignItems: 'center',+ }}><FormField style={{ flex: 1 }}><FormLabel@@ -81,13 +82,13 @@ export function SaveReportName({<Button variant="primary" type="submit" style={{ marginTop: 30 }}>{menuItem === 'save-report' ? t('Add') : t('Update')}</Button>- </Stack>+ </SpaceBetween></Form>)}{err !== '' ? (- <Stack direction="row" align="center" style={{ padding: 10 }}>+ <View style={{ padding: 10, alignItems: 'center' }}><Text style={{ color: theme.errorText }}>{err}</Text>- </Stack>+ </View>) : (<View />)}diff --git a/packages/desktop-client/src/components/rules/RuleEditor.tsx b/packages/desktop-client/src/components/rules/RuleEditor.tsxindex f38b7f2503..fe55fa05d0 100644--- a/packages/desktop-client/src/components/rules/RuleEditor.tsx+++ b/packages/desktop-client/src/components/rules/RuleEditor.tsx@@ -23,7 +23,6 @@ import {import { Menu } from '@actual-app/components/menu';import { Select } from '@actual-app/components/select';import { SpaceBetween } from '@actual-app/components/space-between';-import { Stack } from '@actual-app/components/stack';import { styles } from '@actual-app/components/styles';import { Text } from '@actual-app/components/text';import { theme } from '@actual-app/components/theme';@@ -263,9 +262,9 @@ function FieldError({ type }) {function Editor({ error, style, children }) {return (<View style={style} data-testid="editor-row">- <Stack direction="row" align="center" spacing={1}>+ <SpaceBetween gap={5} style={{ alignItems: 'center' }}>{children}- </Stack>+ </SpaceBetween>{error && <FieldError type={error} />}</View>);@@ -348,12 +347,12 @@ function ConditionEditor({<View style={{ flex: 1, minWidth: 80 }}>{valueEditor}</View>- <Stack direction="row">+ <SpaceBetween direction="horizontal" gap={0}><EditorButtonsonAdd={onAdd}onDelete={isSchedule && field === 'date' ? null : onDelete}/>- </Stack>+ </SpaceBetween></Editor>);}@@ -701,7 +700,7 @@ function ActionEditor({) : null}{op !== 'delete-transaction' && (- <Stack direction="row" style={{ flexShrink: 0 }}>+ <SpaceBetween gap={0} style={{ flexShrink: 0 }}><EditorButtonsonAdd={onAdd}onDelete={@@ -711,7 +710,7 @@ function ActionEditor({onDelete}/>- </Stack>+ </SpaceBetween>)}</Editor>);@@ -926,7 +925,7 @@ function ConditionsList({<Trans>Add condition</Trans></Button>) : (- <Stack spacing={2} data-testid="condition-list">+ <SpaceBetween direction="vertical" gap={10} data-testid="condition-list">{conditions.map((cond, i) => {let ops = getValidOps(cond.field);@@ -942,7 +941,7 @@ function ConditionsList({}return (- <View key={i}>+ <View key={i} style={{ width: '100%' }}><ConditionEditoreditorStyle={editorStyle}ops={ops}@@ -957,7 +956,7 @@ function ConditionsList({</View>);})}- </Stack>+ </SpaceBetween>);}@@ -1303,7 +1302,7 @@ export function RuleEditor({<Trans>Stage of rule:</Trans></Text>- <Stack direction="row" align="center" spacing={1}>+ <SpaceBetween gap={5} style={{ alignItems: 'center' }}><StageButtonselected={stage === 'pre'}onSelect={() => onChangeStage('pre')}@@ -1324,7 +1323,7 @@ export function RuleEditor({</StageButton><StageInfo />- </Stack>+ </SpaceBetween></View><View@@ -1377,10 +1376,15 @@ export function RuleEditor({<Trans>Add action</Trans></Button>)}- <Stack spacing={2} data-testid="action-split-list">+ <SpaceBetween+ direction="vertical"+ gap={10}+ data-testid="action-split-list"+ >{actionSplits.map(({ id, actions }, splitIndex) => (<Viewkey={id}+ style={{ width: '100%' }}nativeStyle={actionSplits.length > 1? {@@ -1393,7 +1397,10 @@ export function RuleEditor({}>{actionSplits.length > 1 && (- <Stack direction="row" justify="space-between" spacing={1}>+ <SpaceBetween+ gap={5}+ style={{ justifyContent: 'space-between' }}+ ><Textstyle={{...styles.smallText,@@ -1423,11 +1430,15 @@ export function RuleEditor({/></Button>)}- </Stack>+ </SpaceBetween>)}- <Stack spacing={2} data-testid="action-list">+ <SpaceBetween+ direction="vertical"+ gap={10}+ data-testid="action-list"+ >{actions.map((action, actionIndex) => (- <View key={actionIndex}>+ <View key={actionIndex} style={{ width: '100%' }}><ActionEditoraction={action}editorStyle={styles.editorPill}@@ -1441,7 +1452,7 @@ export function RuleEditor({/></View>))}- </Stack>+ </SpaceBetween>{actions.length === 0 && (<Button@@ -1453,7 +1464,7 @@ export function RuleEditor({)}</View>))}- </Stack>+ </SpaceBetween>{showSplitButton && (<Buttonstyle={{ alignSelf: 'flex-start', marginTop: 15 }}@@ -1474,7 +1485,6 @@ export function RuleEditor({<SelectedProvider instance={selectedInst}><View style={{ padding: '20px', flex: 1 }}><SpaceBetween- direction="horizontal"gap={5}style={{flexDirection: 'row',diff --git a/packages/desktop-client/src/components/rules/RuleRow.tsx b/packages/desktop-client/src/components/rules/RuleRow.tsxindex e8f5ee5e3b..967482be0a 100644--- a/packages/desktop-client/src/components/rules/RuleRow.tsx+++ b/packages/desktop-client/src/components/rules/RuleRow.tsx@@ -6,7 +6,7 @@ import { Button } from '@actual-app/components/button';import { SvgRightArrow2 } from '@actual-app/components/icons/v0';import { Menu } from '@actual-app/components/menu';import { Popover } from '@actual-app/components/popover';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { styles } from '@actual-app/components/styles';import { Text } from '@actual-app/components/text';import { theme } from '@actual-app/components/theme';@@ -136,7 +136,7 @@ export const RuleRow = memo(</Cell><Field width="flex" style={{ padding: '15px 0' }} truncate={false}>- <Stack direction="row" align="center">+ <SpaceBetween style={{ alignItems: 'center' }}><Viewstyle={{ flex: 1, alignItems: 'flex-start' }}data-testid="conditions"@@ -207,7 +207,7 @@ export const RuleRow = memo(/>))}</View>- </Stack>+ </SpaceBetween></Field><Cell name="edit" plain style={{ padding: '0 15px', paddingLeft: 5 }}>diff --git a/packages/desktop-client/src/components/schedules/DiscoverSchedules.tsx b/packages/desktop-client/src/components/schedules/DiscoverSchedules.tsxindex 08e64a9a82..77270c6f20 100644--- a/packages/desktop-client/src/components/schedules/DiscoverSchedules.tsx+++ b/packages/desktop-client/src/components/schedules/DiscoverSchedules.tsx@@ -4,7 +4,7 @@ import { Trans, useTranslation } from 'react-i18next';import { ButtonWithLoading } from '@actual-app/components/button';import { Paragraph } from '@actual-app/components/paragraph';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { theme } from '@actual-app/components/theme';import { View } from '@actual-app/components/view';@@ -233,13 +233,12 @@ export function DiscoverSchedules() {<DiscoverSchedulesTable loading={isLoading} schedules={schedules} /></SelectedProvider>- <Stack- direction="row"- align="center"- justify="flex-end"+ <SpaceBetweenstyle={{paddingTop: 20,paddingBottom: 0,+ alignItems: 'center',+ justifyContent: 'flex-end',}}><ButtonWithLoading@@ -253,7 +252,7 @@ export function DiscoverSchedules() {><Trans>Create schedules</Trans></ButtonWithLoading>- </Stack>+ </SpaceBetween></>)}</Modal>diff --git a/packages/desktop-client/src/components/schedules/PostsOfflineNotification.tsx b/packages/desktop-client/src/components/schedules/PostsOfflineNotification.tsxindex 298421b9e5..8c87420768 100644--- a/packages/desktop-client/src/components/schedules/PostsOfflineNotification.tsx+++ b/packages/desktop-client/src/components/schedules/PostsOfflineNotification.tsx@@ -4,7 +4,7 @@ import { useLocation } from 'react-router';import { Button } from '@actual-app/components/button';import { Paragraph } from '@actual-app/components/paragraph';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { Text } from '@actual-app/components/text';import { theme } from '@actual-app/components/theme';@@ -87,11 +87,9 @@ export function PostsOfflineNotification() {today” in the action menu.</Trans></Paragraph>- <Stack- direction="row"- justify="flex-end"- style={{ marginTop: 20 }}- spacing={2}+ <SpaceBetween+ gap={10}+ style={{ marginTop: 20, justifyContent: 'flex-end' }}><Button onPress={close}><Trans>Decide later</Trans>@@ -106,7 +104,7 @@ export function PostsOfflineNotification() {><Trans>Post transactions</Trans></Button>- </Stack>+ </SpaceBetween></>)}</Modal>diff --git a/packages/desktop-client/src/components/schedules/ScheduleDetails.tsx b/packages/desktop-client/src/components/schedules/ScheduleDetails.tsxindex 198bb9d806..91f142e679 100644--- a/packages/desktop-client/src/components/schedules/ScheduleDetails.tsx+++ b/packages/desktop-client/src/components/schedules/ScheduleDetails.tsx@@ -4,7 +4,7 @@ import { Trans, useTranslation } from 'react-i18next';import { Button } from '@actual-app/components/button';import { InitialFocus } from '@actual-app/components/initial-focus';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { Text } from '@actual-app/components/text';import { theme } from '@actual-app/components/theme';import { View } from '@actual-app/components/view';@@ -616,7 +616,7 @@ export function ScheduleDetails({ id, transaction }: ScheduleDetailsProps) {}rightContent={<ModalCloseButton onPress={close} />}/>- <Stack direction="row" style={{ marginTop: 10 }}>+ <SpaceBetween style={{ marginTop: 10 }}><FormField style={{ flex: 1 }}><FormLabel title={t('Schedule Name')} htmlFor="name-field" /><InitialFocus>@@ -632,8 +632,8 @@ export function ScheduleDetails({ id, transaction }: ScheduleDetailsProps) {/></InitialFocus></FormField>- </Stack>- <Stack direction="row" style={{ marginTop: 20 }}>+ </SpaceBetween>+ <SpaceBetween style={{ marginTop: 20 }}><FormField style={{ flex: 1 }}><FormLabeltitle={t('Payee')}@@ -668,7 +668,7 @@ export function ScheduleDetails({ id, transaction }: ScheduleDetailsProps) {</FormField><FormField style={{ flex: 1 }}>- <Stack direction="row" align="center" style={{ marginBottom: 3 }}>+ <SpaceBetween style={{ marginBottom: 3, alignItems: 'center' }}><FormLabeltitle={t('Amount')}htmlFor="amount-field"@@ -704,7 +704,7 @@ export function ScheduleDetails({ id, transaction }: ScheduleDetailsProps) {})}/>- </Stack>+ </SpaceBetween>{state.fields.amountOp === 'isbetween' ? (<BetweenAmountInput// @ts-expect-error fix me@@ -732,13 +732,18 @@ export function ScheduleDetails({ id, transaction }: ScheduleDetailsProps) {/>)}</FormField>- </Stack>+ </SpaceBetween><View style={{ marginTop: 20 }}><FormLabel title={t('Date')} /></View>- <Stack direction="row" align="flex-start" justify="space-between">+ <SpaceBetween+ style={{+ alignItems: 'flex-start',+ justifyContent: 'space-between',+ }}+ ><View style={{ width: '13.44rem' }}>{repeats ? (<RecurringSchedulePicker@@ -764,17 +769,21 @@ export function ScheduleDetails({ id, transaction }: ScheduleDetailsProps) {<Text style={{ color: theme.pageTextLight, fontWeight: 600 }}><Trans>Upcoming dates</Trans></Text>- <Stack- direction="column"- spacing={1}- style={{ marginTop: 10, color: theme.pageTextLight }}+ <SpaceBetween+ direction="vertical"+ gap={5}+ style={{+ marginTop: 10,+ color: theme.pageTextLight,+ alignItems: 'flex-start',+ }}>{state.upcomingDates.map(date => (<View key={date}>{monthUtils.format(date, `${dateFormat} EEEE`, locale)}</View>))}- </Stack>+ </SpaceBetween></View>)}</View>@@ -799,7 +808,10 @@ export function ScheduleDetails({ id, transaction }: ScheduleDetailsProps) {</label></View>- <Stack align="flex-end">+ <SpaceBetween+ direction="vertical"+ style={{ alignItems: 'flex-end' }}+ ><Viewstyle={{marginTop: 5,@@ -845,7 +857,7 @@ export function ScheduleDetails({ id, transaction }: ScheduleDetailsProps) {</Text>{!adding && schedule.rule && (- <Stack direction="row" align="center" style={{ marginTop: 20 }}>+ <SpaceBetween style={{ marginTop: 20, alignItems: 'center' }}>{state.isCustom && (<Textstyle={{@@ -866,10 +878,10 @@ export function ScheduleDetails({ id, transaction }: ScheduleDetailsProps) {><Trans>Edit as rule</Trans></Button>- </Stack>+ </SpaceBetween>)}- </Stack>- </Stack>+ </SpaceBetween>+ </SpaceBetween><View style={{ marginTop: 30, flex: 1 }}><SelectedProvider instance={selectedInst}>@@ -956,11 +968,12 @@ export function ScheduleDetails({ id, transaction }: ScheduleDetailsProps) {</SelectedProvider></View>- <Stack- direction="row"- justify="flex-end"- align="center"- style={{ marginTop: 20 }}+ <SpaceBetween+ style={{+ marginTop: 20,+ justifyContent: 'flex-end',+ alignItems: 'center',+ }}>{state.error && (<Text style={{ color: theme.errorText }}>{state.error}</Text>@@ -976,7 +989,7 @@ export function ScheduleDetails({ id, transaction }: ScheduleDetailsProps) {>{adding ? t('Add') : t('Save')}</Button>- </Stack>+ </SpaceBetween></>)}</Modal>diff --git a/packages/desktop-client/src/components/select/RecurringSchedulePicker.tsx b/packages/desktop-client/src/components/select/RecurringSchedulePicker.tsxindex 250661b8f3..f83d988bed 100644--- a/packages/desktop-client/src/components/select/RecurringSchedulePicker.tsx+++ b/packages/desktop-client/src/components/select/RecurringSchedulePicker.tsx@@ -18,7 +18,6 @@ import { Menu } from '@actual-app/components/menu';import { Popover } from '@actual-app/components/popover';import { Select } from '@actual-app/components/select';import { SpaceBetween } from '@actual-app/components/space-between';-import { Stack } from '@actual-app/components/stack';import { Text } from '@actual-app/components/text';import { theme } from '@actual-app/components/theme';import { View } from '@actual-app/components/view';@@ -259,30 +258,34 @@ function SchedulePreview({content = <Text>{previewDates}</Text>;} else {content = (- <View>+ <View style={{ width: '100%' }}><Text style={{ fontWeight: 600 }}><Trans>Upcoming dates</Trans></Text>- <Stack direction="row" spacing={4} style={{ marginTop: 10 }}>+ <SpaceBetween gap={20} style={{ marginTop: 10 }}>{previewDates.map((d, idx) => (- <View key={idx}>+ <View key={idx} style={{ flex: 1 }}><Text>{monthUtils.format(d, dateFormat, locale)}</Text><Text>{monthUtils.format(d, 'EEEE', locale)}</Text></View>))}- </Stack>+ </SpaceBetween></View>);}return (- <Stack- direction="column"- spacing={1}- style={{ marginTop: 15, color: theme.tableText }}+ <SpaceBetween+ direction="vertical"+ gap={5}+ style={{+ marginTop: 15,+ color: theme.tableText,+ alignItems: 'flex-start',+ }}>{content}- </Stack>+ </SpaceBetween>);}@@ -302,13 +305,14 @@ function MonthlyPatterns({const { DAY_OF_WEEK_OPTIONS } = useDayOfWeekOptions();return (- <Stack spacing={2} style={{ marginTop: 10 }}>+ <SpaceBetween direction="vertical" gap={10} style={{ marginTop: 10 }}>{config.patterns.map((recurrence, idx) => (<Viewkey={idx}style={{display: 'flex',flexDirection: 'row',+ width: '100%',}}><Select@@ -368,7 +372,7 @@ function MonthlyPatterns({</Button></View>))}- </Stack>+ </SpaceBetween>);}@@ -480,7 +484,7 @@ function RecurringScheduleTooltip({/>)}</div>- <SpaceBetween direction="horizontal" style={{ marginTop: 10 }} gap={5}>+ <SpaceBetween style={{ marginTop: 10 }} gap={5}><Text style={{ whiteSpace: 'nowrap' }}><Trans>Repeat every</Trans></Text>@@ -518,7 +522,10 @@ function RecurringScheduleTooltip({config.patterns.length > 0 && (<MonthlyPatterns config={config} dispatch={dispatch} />)}- <Stack direction="column" style={{ marginTop: 5 }}>+ <SpaceBetween+ direction="vertical"+ style={{ marginTop: 5, alignItems: 'flex-start' }}+ ><Viewstyle={{marginTop: 5,@@ -567,7 +574,7 @@ function RecurringScheduleTooltip({</label></Trans></View>- </Stack>+ </SpaceBetween><SchedulePreview previewDates={previewDates} /><divstyle={{ display: 'flex', marginTop: 15, justifyContent: 'flex-end' }}diff --git a/packages/desktop-client/src/components/tags/ManageTags.tsx b/packages/desktop-client/src/components/tags/ManageTags.tsxindex 7b81c7dd00..2d16555846 100644--- a/packages/desktop-client/src/components/tags/ManageTags.tsx+++ b/packages/desktop-client/src/components/tags/ManageTags.tsx@@ -4,7 +4,7 @@ import { Trans, useTranslation } from 'react-i18next';import { Button } from '@actual-app/components/button';import { SvgAdd } from '@actual-app/components/icons/v1';import { SvgSearchAlternate } from '@actual-app/components/icons/v2';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { Text } from '@actual-app/components/text';import { theme } from '@actual-app/components/theme';import { View } from '@actual-app/components/view';@@ -69,12 +69,7 @@ export function ManageTags() {<Trans>User defined tags with color and description.</Trans></View></View>- <Stack- spacing={2}- direction="row"- align="center"- style={{ marginTop: 12 }}- >+ <SpaceBetween gap={10} style={{ marginTop: 12, alignItems: 'center' }}><Button variant="bare" onPress={() => setCreate(true)}><SvgAdd width={10} height={10} style={{ marginRight: 3 }} /><Trans>Add New</Trans>@@ -93,7 +88,7 @@ export function ManageTags() {value={filter}onChange={setFilter}/>- </Stack>+ </SpaceBetween><View style={{ flex: 1, marginTop: 12 }}><TagsHeader />{create && (@@ -127,7 +122,10 @@ export function ManageTags() {flexShrink: 0,}}>- <Stack direction="row" align="center" justify="flex-end" spacing={2}>+ <SpaceBetween+ gap={10}+ style={{ alignItems: 'center', justifyContent: 'flex-end' }}+ >{selectedInst.items.size > 0 && (<Button onPress={onDeleteSelected}><Trans count={selectedInst.items.size}>@@ -135,7 +133,7 @@ export function ManageTags() {</Trans></Button>)}- </Stack>+ </SpaceBetween></View></View></SelectedProvider>diff --git a/packages/desktop-client/src/components/tags/TagCreationRow.tsx b/packages/desktop-client/src/components/tags/TagCreationRow.tsxindex 21bb2e3853..e8519cec43 100644--- a/packages/desktop-client/src/components/tags/TagCreationRow.tsx+++ b/packages/desktop-client/src/components/tags/TagCreationRow.tsx@@ -10,7 +10,7 @@ import { Trans, useTranslation } from 'react-i18next';import { Button } from '@actual-app/components/button';import { ColorPicker } from '@actual-app/components/color-picker';-import { Stack } from '@actual-app/components/stack';+import { SpaceBetween } from '@actual-app/components/space-between';import { theme } from '@actual-app/components/theme';import { View } from '@actual-app/components/view';@@ -181,12 +181,13 @@ export const TagCreationRow = ({ onClose, tags }: TagCreationRowProps) => {#{tag}</Button></ColorPicker>- <Stack- direction="row"- align="center"- justify="flex-end"- style={{ marginLeft: 'auto' }}- spacing={2}+ <SpaceBetween+ gap={10}+ style={{+ marginLeft: 'auto',+ alignItems: 'center',+ justifyContent: 'flex-end',+ }}><Buttonvariant="normal"@@ -207,7 +208,7 @@ export const TagCreationRow = ({ onClose, tags }: TagCreationRowProps) => {><Trans>Add</Trans></Button>- </Stack>+ </SpaceBetween></Row></View>);diff --git a/upcoming-release-notes/6039.md b/upcoming-release-notes/6039.mdnew file mode 100644index 0000000000..e31d0c848a--- /dev/null+++ b/upcoming-release-notes/6039.md@@ -0,0 +1,7 @@+---+category: Maintenance+authors: [MatissJanis]+---++Refactored all `Stack` component usages to `SpaceBetween` component across the codebase for better consistency and simplified API.+