Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
UnderKoen authored Oct 8, 2024
2 parents 05db1aa + 464d987 commit b5448c1
Show file tree
Hide file tree
Showing 71 changed files with 1,462 additions and 601 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/size-compare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ jobs:
pull-requests: write
steps:
- name: Wait for ${{github.base_ref}} build to succeed
uses: fountainhead/action-wait-for-check@v1.1.0
uses: fountainhead/action-wait-for-check@v1.2.0
id: master-build
with:
token: ${{ secrets.GITHUB_TOKEN }}
checkName: web
ref: ${{github.base_ref}}

- name: Wait for PR build to succeed
uses: fountainhead/action-wait-for-check@v1.1.0
uses: fountainhead/action-wait-for-check@v1.2.0
id: wait-for-build
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -46,7 +46,7 @@ jobs:
echo "Build failed on PR branch or ${{github.base_ref}}"
exit 1
- name: Download build artifact from ${{github.base_ref}}
uses: dawidd6/action-download-artifact@v3
uses: dawidd6/action-download-artifact@v6
id: pr-build
with:
branch: ${{github.base_ref}}
Expand All @@ -55,12 +55,13 @@ jobs:
path: base

- name: Download build artifact from PR
uses: dawidd6/action-download-artifact@v3
uses: dawidd6/action-download-artifact@v6
with:
pr: ${{github.event.pull_request.number}}
workflow: build.yml
name: build-stats
path: head
allow_forks: true

- name: Strip content hashes from stats files
run: |
Expand All @@ -70,14 +71,14 @@ jobs:
sed -i -E 's/index\.[0-9a-zA-Z_-]{8,}\./index./g' ./base/web-stats.json
sed -i -E 's/\.[0-9a-zA-Z_-]{8,}\.chunk\././g' ./base/web-stats.json
sed -i -E 's/\.[0-9a-f]{8,}\././g' ./base/*.json
- uses: twk3/rollup-size-compare-action@v1.0.0
- uses: twk3/rollup-size-compare-action@v1.1.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
current-stats-json-path: ./head/web-stats.json
base-stats-json-path: ./base/web-stats.json
title: desktop-client

- uses: github/webpack-bundlesize-compare-action@v1.8.2
- uses: github/webpack-bundlesize-compare-action@v2.1.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
current-stats-json-path: ./head/loot-core-stats.json
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ bundle.mobile.js.map

# Local Netlify folder
.netlify

# build output
package.tgz
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed packages/desktop-client/package.tgz
Binary file not shown.
2 changes: 2 additions & 0 deletions packages/desktop-client/src/browser-preload.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ global.Actual = {
setTheme: theme => {
window.__actionsForMenu.saveGlobalPrefs({ theme });
},

moveBudgetDirectory: () => {},
};

function inputFocused(e) {
Expand Down
89 changes: 89 additions & 0 deletions packages/desktop-client/src/components/EditablePageHeaderTitle.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
import React, { useCallback, useEffect, useState } from 'react';

import { SvgPencil1 } from '../icons/v2';
import { theme } from '../style';

import { Button } from './common/Button2';
import { InitialFocus } from './common/InitialFocus';
import { Input } from './common/Input';
import { View } from './common/View';

type EditablePageHeaderTitleProps = {
title: string;
onSave: (newValue: string) => void;
};

export function EditablePageHeaderTitle({
title: initialTitle,
onSave,
}: EditablePageHeaderTitleProps) {
const [isEditing, setIsEditing] = useState(false);
const [title, setTitle] = useState(initialTitle);

useEffect(() => setTitle(initialTitle), [initialTitle]);

const onSaveValue = useCallback(
(newValue: string) => {
onSave(newValue);
setTitle(newValue);
setIsEditing(false);
},
[onSave],
);

if (isEditing) {
return (
<InitialFocus>
<Input
defaultValue={title}
onEnter={e => onSaveValue(e.currentTarget.value)}
onBlur={e => onSaveValue(e.target.value)}
onEscape={() => setIsEditing(false)}
style={{
fontSize: 25,
fontWeight: 500,
marginTop: -3,
marginBottom: -3,
marginLeft: -6,
paddingTop: 2,
paddingBottom: 2,
width: Math.max(20, title.length) + 'ch',
}}
/>
</InitialFocus>
);
}

return (
<View
style={{
flexDirection: 'row',
alignItems: 'center',
gap: 3,
'& .hover-visible': {
opacity: 0,
transition: 'opacity .25s',
},
'&:hover .hover-visible': {
opacity: 1,
},
}}
>
{title}

<Button
variant="bare"
className="hover-visible"
onPress={() => setIsEditing(true)}
>
<SvgPencil1
style={{
width: 11,
height: 11,
color: theme.pageTextSubdued,
}}
/>
</Button>
</View>
);
}
12 changes: 12 additions & 0 deletions packages/desktop-client/src/components/Modals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ import { HoldBufferModal } from './modals/HoldBufferModal';
import { ImportTransactionsModal } from './modals/ImportTransactionsModal';
import { KeyboardShortcutModal } from './modals/KeyboardShortcutModal';
import { LoadBackupModal } from './modals/LoadBackupModal';
import { ConfirmChangeDocumentDirModal } from './modals/manager/ConfirmChangeDocumentDir';
import { DeleteFileModal } from './modals/manager/DeleteFileModal';
import { FilesSettingsModal } from './modals/manager/FilesSettingsModal';
import { ImportActualModal } from './modals/manager/ImportActualModal';
import { ImportModal } from './modals/manager/ImportModal';
import { ImportYNAB4Modal } from './modals/manager/ImportYNAB4Modal';
Expand Down Expand Up @@ -573,6 +575,16 @@ export function Modals() {
return <DeleteFileModal key={name} file={options.file} />;
case 'import':
return <ImportModal key={name} />;
case 'files-settings':
return <FilesSettingsModal key={name} />;
case 'confirm-change-document-dir':
return (
<ConfirmChangeDocumentDirModal
key={name}
currentBudgetDirectory={options.currentBudgetDirectory}
newDirectory={options.newDirectory}
/>
);
case 'import-ynab4':
return <ImportYNAB4Modal key={name} />;
case 'import-ynab5':
Expand Down
9 changes: 7 additions & 2 deletions packages/desktop-client/src/components/accounts/Account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,12 @@ class AccountInternal extends PureComponent<
this.paged.unsubscribe();
}

// Filter out reconciled transactions if necessary.
if (!this.state.showReconciled) {
// Filter out reconciled transactions if they are hidden
// and we're not showing balances.
if (
!this.state.showReconciled &&
(!this.state.showBalances || !this.canCalculateBalance())
) {
query = query.filter({ reconciled: { $eq: false } });
}

Expand Down Expand Up @@ -1746,6 +1750,7 @@ class AccountInternal extends PureComponent<
payees={payees}
balances={allBalances}
showBalances={!!allBalances}
showReconciled={showReconciled}
showCleared={showCleared}
showAccount={
!accountId ||
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/alerts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ export const Information = ({ style, children }: ScopedAlertProps) => {
color={theme.pageTextLight}
backgroundColor="transparent"
style={{
...style,
boxShadow: 'none',
padding: 5,
...style,
}}
>
{children}
Expand Down
Loading

0 comments on commit b5448c1

Please sign in to comment.