Skip to content

Commit

Permalink
Merge branch 'actualbudget:master' into schedules_refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
shall0pass authored Jan 7, 2024
2 parents eee8c5c + e0d82fd commit 462faa7
Show file tree
Hide file tree
Showing 753 changed files with 3,158 additions and 3,615 deletions.
47 changes: 4 additions & 43 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ module.exports = {
'prefer-const': 'warn',
'prefer-spread': 'off',
'@typescript-eslint/no-empty-function': 'off',
'import/no-default-export': 'off',
'import/no-default-export': 'warn',
},
overrides: [
{
Expand Down Expand Up @@ -241,50 +241,11 @@ module.exports = {
},
{
files: [
'./packages/api/*',
'./packages/api/app/**/*',
'./packages/crdt/**/*',
'./packages/desktop-client/src/*',
'./packages/desktop-client/src/components/*',
// './packages/desktop-client/src/components/accounts/**/*',
// './packages/desktop-client/src/components/autocomplete/**/*',
// './packages/desktop-client/src/components/budget/**/*',
'./packages/desktop-client/src/components/common/Button.tsx',
// './packages/desktop-client/src/components/common/**/*',
// './packages/desktop-client/src/components/filters/**/*',
// './packages/desktop-client/src/components/gocardless/**/*',
// './packages/desktop-client/src/components/manager/**/*',
// './packages/desktop-client/src/components/mobile/**/*',
// './packages/desktop-client/src/components/modals/**/*',
// './packages/desktop-client/src/components/payees/**/*',
// './packages/desktop-client/src/components/reports/**/*',
// './packages/desktop-client/src/components/responsive/**/*',
// './packages/desktop-client/src/components/rules/**/*',
// './packages/desktop-client/src/components/schedules/**/*',
// './packages/desktop-client/src/components/select/**/*',
// './packages/desktop-client/src/components/settings/**/*',
// './packages/desktop-client/src/components/sidebar/**/*',
// './packages/desktop-client/src/components/spreadsheet/**/*',
// './packages/desktop-client/src/components/transactions/**/*',
// './packages/desktop-client/src/components/util/**/*',
// './packages/desktop-client/src/hooks/**/*',
// './packages/desktop-client/src/icons/**/*',
// './packages/desktop-client/src/style/**/*',
// './packages/desktop-client/src/types/**/*',
// './packages/desktop-client/src/util/**/*',
// './packages/desktop-electron/**/*',
// './packages/eslint-plugin-actual/**/*',
// './packages/loot-core/*',
// './packages/loot-core/src/client/**/*',
// './packages/loot-core/src/mocks/**/*',
// './packages/loot-core/src/platform/**/*',
// './packages/loot-core/src/server/**/*',
// './packages/loot-core/src/shared/**/*',
// './packages/loot-core/src/types/**/*',
// './packages/loot-core/webpack/**/*',
'./packages/api/migrations/*',
'./packages/loot-core/migrations/*',
],
rules: {
'import/no-default-export': 'warn',
'import/no-default-export': 'off',
},
},
],
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"watch": "cross-env BROWSER=none yarn start",
"build": "cross-env INLINE_RUNTIME_CHUNK=false craco build",
"build:browser": "cross-env ./bin/build-browser",
"generate:icons": "rm src/icons/*/*.tsx; cd src/icons && svgr --typescript --expand-props start -d . .",
"generate:icons": "rm src/icons/*/*.tsx; cd src/icons && svgr --template template.ts --index-template index-template.ts --typescript --expand-props start -d . .",
"test": "craco test",
"e2e": "npx playwright test --browser=chromium",
"vrt": "cross-env VRT=true npx playwright test --browser=chromium"
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ expect.extend({
},
});

// eslint-disable-next-line import/no-unused-modules
// eslint-disable-next-line import/no-unused-modules, import/no-default-export
export default defineConfig({
timeout: 20000, // 20 seconds
retries: 1,
Expand Down
6 changes: 3 additions & 3 deletions packages/desktop-client/src/components/AnimatedRefresh.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from 'react';

import { keyframes } from 'glamor';

import Refresh from '../icons/v1/Refresh';
import { SvgRefresh } from '../icons/v1';
import { type CSSProperties } from '../style';

import View from './common/View';
import { View } from './common/View';

const spin = keyframes({
'0%': { transform: 'rotateZ(0deg)' },
Expand All @@ -29,7 +29,7 @@ export function AnimatedRefresh({
<View
style={{ animation: animating ? `${spin} 1s infinite linear` : null }}
>
<Refresh
<SvgRefresh
width={width ? width : 14}
height={height ? height : 14}
style={iconStyle}
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop-client/src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import { ResponsiveProvider } from '../ResponsiveProvider';
import { styles, hasHiddenScrollbars, ThemeStyle } from '../style';

import { AppBackground } from './AppBackground';
import View from './common/View';
import { View } from './common/View';
import { DevelopmentTopBar } from './DevelopmentTopBar';
import { FatalError } from './FatalError';
import { FinancesApp } from './FinancesApp';
import ManagementApp from './manager/ManagementApp';
import { ManagementApp } from './manager/ManagementApp';
import { MobileWebMessage } from './MobileWebMessage';
import { UpdateNotification } from './UpdateNotification';

Expand Down
6 changes: 3 additions & 3 deletions packages/desktop-client/src/components/AppBackground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import React from 'react';

import { css } from 'glamor';

import AnimatedLoading from '../icons/AnimatedLoading';
import { AnimatedLoading } from '../icons/AnimatedLoading';
import { theme } from '../style';

import { Background } from './Background';
import Block from './common/Block';
import View from './common/View';
import { Block } from './common/Block';
import { View } from './common/View';

type AppBackgroundProps = {
initializing?: boolean;
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop-client/src/components/BankSyncStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { useTransition, animated } from 'react-spring';
import { theme, styles } from '../style';

import { AnimatedRefresh } from './AnimatedRefresh';
import Text from './common/Text';
import View from './common/View';
import { Text } from './common/Text';
import { View } from './common/View';

export function BankSyncStatus() {
const accountsSyncing = useSelector(state => state.account.accountsSyncing);
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop-client/src/components/DevelopmentTopBar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { theme } from '../style';

import ExternalLink from './common/ExternalLink';
import View from './common/View';
import { ExternalLink } from './common/ExternalLink';
import { View } from './common/View';

export function DevelopmentTopBar() {
return (
Expand Down
16 changes: 8 additions & 8 deletions packages/desktop-client/src/components/FatalError.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React, { useState } from 'react';

import Block from './common/Block';
import { Block } from './common/Block';
import { Button } from './common/Button';
import ExternalLink from './common/ExternalLink';
import LinkButton from './common/LinkButton';
import Modal from './common/Modal';
import Paragraph from './common/Paragraph';
import Stack from './common/Stack';
import Text from './common/Text';
import View from './common/View';
import { ExternalLink } from './common/ExternalLink';
import { LinkButton } from './common/LinkButton';
import { Modal } from './common/Modal';
import { Paragraph } from './common/Paragraph';
import { Stack } from './common/Stack';
import { Text } from './common/Text';
import { View } from './common/View';
import { Checkbox } from './forms';

type AppError = Error & {
Expand Down
12 changes: 6 additions & 6 deletions packages/desktop-client/src/components/FinancesApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import hotkeys from 'hotkeys-js';
import { AccountsProvider } from 'loot-core/src/client/data-hooks/accounts';
import { PayeesProvider } from 'loot-core/src/client/data-hooks/payees';
import { SpreadsheetProvider } from 'loot-core/src/client/SpreadsheetProvider';
import checkForUpdateNotification from 'loot-core/src/client/update-notification';
import { checkForUpdateNotification } from 'loot-core/src/client/update-notification';
import * as undo from 'loot-core/src/platform/client/undo';

import { useActions } from '../hooks/useActions';
Expand All @@ -27,18 +27,18 @@ import { getIsOutdated, getLatestVersion } from '../util/versions';

import { BankSyncStatus } from './BankSyncStatus';
import { BudgetMonthCountProvider } from './budget/BudgetMonthCountContext';
import View from './common/View';
import { View } from './common/View';
import { GlobalKeys } from './GlobalKeys';
import { ManageRulesPage } from './ManageRulesPage';
import MobileNavTabs from './mobile/MobileNavTabs';
import { MobileNavTabs } from './mobile/MobileNavTabs';
import { Modals } from './Modals';
import { Notifications } from './Notifications';
import { ManagePayeesPage } from './payees/ManagePayeesPage';
import Reports from './reports';
import { Reports } from './reports';
import { NarrowAlternate, WideComponent } from './responsive';
import { ScrollProvider } from './ScrollProvider';
import Settings from './settings';
import FloatableSidebar, { SidebarProvider } from './sidebar';
import { Settings } from './settings';
import { FloatableSidebar, SidebarProvider } from './sidebar';
import { Titlebar, TitlebarProvider } from './Titlebar';
import { TransactionEdit } from './transactions/MobileTransaction';

Expand Down
4 changes: 2 additions & 2 deletions packages/desktop-client/src/components/FixedSizeList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import {

import memoizeOne from 'memoize-one';

import useResizeObserver from '../hooks/useResizeObserver';
import { useResizeObserver } from '../hooks/useResizeObserver';
import { type CSSProperties } from '../style';

import View from './common/View';
import { View } from './common/View';

const IS_SCROLLING_DEBOUNCE_INTERVAL = 150;

Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/GlobalKeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useEffect } from 'react';

import * as Platform from 'loot-core/src/client/platform';

import useNavigate from '../hooks/useNavigate';
import { useNavigate } from '../hooks/useNavigate';

export function GlobalKeys() {
const navigate = useNavigate();
Expand Down
6 changes: 3 additions & 3 deletions packages/desktop-client/src/components/LoggedInUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { useActions } from '../hooks/useActions';
import { theme, styles, type CSSProperties } from '../style';

import { Button } from './common/Button';
import Menu from './common/Menu';
import Text from './common/Text';
import View from './common/View';
import { Menu } from './common/Menu';
import { Text } from './common/Text';
import { View } from './common/View';
import { useServerURL } from './ServerContext';
import { Tooltip } from './tooltips';

Expand Down
20 changes: 10 additions & 10 deletions packages/desktop-client/src/components/ManageRules.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ import { mapField, friendlyOp } from 'loot-core/src/shared/rules';
import { describeSchedule } from 'loot-core/src/shared/schedules';
import { type RuleEntity } from 'loot-core/src/types/models';

import useCategories from '../hooks/useCategories';
import useSelected, { SelectedProvider } from '../hooks/useSelected';
import { useCategories } from '../hooks/useCategories';
import { useSelected, SelectedProvider } from '../hooks/useSelected';
import { theme } from '../style';

import { Button } from './common/Button';
import ExternalLink from './common/ExternalLink';
import Search from './common/Search';
import Stack from './common/Stack';
import Text from './common/Text';
import View from './common/View';
import RulesHeader from './rules/RulesHeader';
import RulesList from './rules/RulesList';
import { ExternalLink } from './common/ExternalLink';
import { Search } from './common/Search';
import { Stack } from './common/Stack';
import { Text } from './common/Text';
import { View } from './common/View';
import { RulesHeader } from './rules/RulesHeader';
import { RulesList } from './rules/RulesList';
import { SchedulesQuery } from './rules/SchedulesQuery';
import SimpleTable from './rules/SimpleTable';
import { SimpleTable } from './rules/SimpleTable';

function mapValue(field, value, { payees, categories, accounts }) {
if (!value) return '';
Expand Down
8 changes: 4 additions & 4 deletions packages/desktop-client/src/components/MobileBackButton.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';

import useNavigate from '../hooks/useNavigate';
import CheveronLeft from '../icons/v1/CheveronLeft';
import { useNavigate } from '../hooks/useNavigate';
import { SvgCheveronLeft } from '../icons/v1';
import { type CSSProperties, styles, theme } from '../style';

import { Button } from './common/Button';
import Text from './common/Text';
import { Text } from './common/Text';

type MobileBackButtonProps = {
style?: CSSProperties;
Expand All @@ -30,7 +30,7 @@ export function MobileBackButton({ style }: MobileBackButtonProps) {
}}
onPointerUp={() => navigate(-1)}
>
<CheveronLeft
<SvgCheveronLeft
style={{ width: 30, height: 30, margin: -10, marginLeft: -5 }}
/>
<Text
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop-client/src/components/MobileWebMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { useResponsive } from '../ResponsiveProvider';
import { theme, styles } from '../style';

import { Button } from './common/Button';
import Text from './common/Text';
import View from './common/View';
import { Text } from './common/Text';
import { View } from './common/View';
import { Checkbox } from './forms';

const buttonStyle = { border: 0, fontSize: 15, padding: '10px 13px' };
Expand Down
60 changes: 30 additions & 30 deletions packages/desktop-client/src/components/Modals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,38 @@ import { useLocation } from 'react-router-dom';
import { send } from 'loot-core/src/platform/client/fetch';

import { useActions } from '../hooks/useActions';
import useCategories from '../hooks/useCategories';
import useSyncServerStatus from '../hooks/useSyncServerStatus';
import { useCategories } from '../hooks/useCategories';
import { useSyncServerStatus } from '../hooks/useSyncServerStatus';
import { type CommonModalProps } from '../types/modals';

import CategoryGroupMenu from './modals/CategoryGroupMenu';
import CategoryMenu from './modals/CategoryMenu';
import CloseAccount from './modals/CloseAccount';
import ConfirmCategoryDelete from './modals/ConfirmCategoryDelete';
import ConfirmTransactionEdit from './modals/ConfirmTransactionEdit';
import CreateAccount from './modals/CreateAccount';
import CreateEncryptionKey from './modals/CreateEncryptionKey';
import CreateLocalAccount from './modals/CreateLocalAccount';
import EditField from './modals/EditField';
import EditRule from './modals/EditRule';
import FixEncryptionKey from './modals/FixEncryptionKey';
import GoCardlessExternalMsg from './modals/GoCardlessExternalMsg';
import GoCardlessInitialise from './modals/GoCardlessInitialise';
import ImportTransactions from './modals/ImportTransactions';
import LoadBackup from './modals/LoadBackup';
import ManageRulesModal from './modals/ManageRulesModal';
import MergeUnusedPayees from './modals/MergeUnusedPayees';
import Notes from './modals/Notes';
import PlaidExternalMsg from './modals/PlaidExternalMsg';
import ReportBudgetSummary from './modals/ReportBudgetSummary';
import RolloverBudgetSummary from './modals/RolloverBudgetSummary';
import SelectLinkedAccounts from './modals/SelectLinkedAccounts';
import SingleInput from './modals/SingleInput';
import SwitchBudgetType from './modals/SwitchBudgetType';
import DiscoverSchedules from './schedules/DiscoverSchedules';
import ScheduleDetails from './schedules/EditSchedule';
import ScheduleLink from './schedules/LinkSchedule';
import PostsOfflineNotification from './schedules/PostsOfflineNotification';
import { CategoryGroupMenu } from './modals/CategoryGroupMenu';
import { CategoryMenu } from './modals/CategoryMenu';
import { CloseAccount } from './modals/CloseAccount';
import { ConfirmCategoryDelete } from './modals/ConfirmCategoryDelete';
import { ConfirmTransactionEdit } from './modals/ConfirmTransactionEdit';
import { CreateAccount } from './modals/CreateAccount';
import { CreateEncryptionKey } from './modals/CreateEncryptionKey';
import { CreateLocalAccount } from './modals/CreateLocalAccount';
import { EditField } from './modals/EditField';
import { EditRule } from './modals/EditRule';
import { FixEncryptionKey } from './modals/FixEncryptionKey';
import { GoCardlessExternalMsg } from './modals/GoCardlessExternalMsg';
import { GoCardlessInitialise } from './modals/GoCardlessInitialise';
import { ImportTransactions } from './modals/ImportTransactions';
import { LoadBackup } from './modals/LoadBackup';
import { ManageRulesModal } from './modals/ManageRulesModal';
import { MergeUnusedPayees } from './modals/MergeUnusedPayees';
import { Notes } from './modals/Notes';
import { PlaidExternalMsg } from './modals/PlaidExternalMsg';
import { ReportBudgetSummary } from './modals/ReportBudgetSummary';
import { RolloverBudgetSummary } from './modals/RolloverBudgetSummary';
import { SelectLinkedAccounts } from './modals/SelectLinkedAccounts';
import { SingleInput } from './modals/SingleInput';
import { SwitchBudgetType } from './modals/SwitchBudgetType';
import { DiscoverSchedules } from './schedules/DiscoverSchedules';
import { PostsOfflineNotification } from './schedules/PostsOfflineNotification';
import { ScheduleDetails } from './schedules/ScheduleDetails';
import { ScheduleLink } from './schedules/ScheduleLink';

export function Modals() {
const modalStack = useSelector(state => state.modals.modalStack);
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/Notes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { useResponsive } from '../ResponsiveProvider';
import { type CSSProperties, theme } from '../style';
import { remarkBreaks, sequentialNewlinesPlugin } from '../util/markdown';

import Text from './common/Text';
import { Text } from './common/Text';

const remarkPlugins = [sequentialNewlinesPlugin, remarkGfm, remarkBreaks];

Expand Down
Loading

0 comments on commit 462faa7

Please sign in to comment.