Skip to content

Commit

Permalink
Merge branch 'master' into devcontainer_https
Browse files Browse the repository at this point in the history
  • Loading branch information
jaarasys-henria authored Feb 2, 2024
2 parents 82dfbc6 + 6ae2047 commit 3d5bdea
Show file tree
Hide file tree
Showing 131 changed files with 681 additions and 942 deletions.
4 changes: 2 additions & 2 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ runs:
using: composite
steps:
- name: Install node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.16.0
- name: Cache
uses: actions/cache@v3
uses: actions/cache@v4
id: cache
with:
path: '**/node_modules'
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,50 +21,50 @@ jobs:
api:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up environment
uses: ./.github/actions/setup
- name: Build API
run: cd packages/api && yarn build
- name: Create package tgz
run: cd packages/api && yarn pack && mv package.tgz actual-api.tgz
- name: Upload Build
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: actual-api
path: packages/api/actual-api.tgz

crdt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up environment
uses: ./.github/actions/setup
- name: Build CRDT
run: cd packages/crdt && yarn build
- name: Create package tgz
run: cd packages/crdt && yarn pack && mv package.tgz actual-crdt.tgz
- name: Upload Build
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: actual-crdt
path: packages/crdt/actual-crdt.tgz

web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up environment
uses: ./.github/actions/setup
- name: Build Web
run: ./bin/package-browser
- name: Upload Build
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: actual-web
path: packages/desktop-client/build
- name: Upload Build Stats
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: build-stats
path: packages/desktop-client/build-stats
10 changes: 5 additions & 5 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up environment
uses: ./.github/actions/setup
- name: Lint
run: yarn lint
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up environment
uses: ./.github/actions/setup
- name: Typecheck
run: yarn typecheck
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up environment
uses: ./.github/actions/setup
- name: Test
Expand All @@ -40,8 +40,8 @@ jobs:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '19'
- name: Check migrations
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: javascript

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: '/language:javascript'
12 changes: 7 additions & 5 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
outputs:
netlify_url: ${{ steps.netlify.outputs.url }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up environment
uses: ./.github/actions/setup
- name: Wait for Netlify build to finish
Expand All @@ -33,36 +33,38 @@ jobs:
container:
image: mcr.microsoft.com/playwright:v1.41.1-jammy
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up environment
uses: ./.github/actions/setup
- name: Run E2E Tests on Netlify URL
run: yarn e2e
env:
E2E_START_URL: ${{ needs.netlify.outputs.netlify_url }}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: desktop-client-test-results
path: packages/desktop-client/test-results/
retention-days: 30
overwrite: true
vrt:
name: Visual regression
needs: netlify
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.41.1-jammy
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up environment
uses: ./.github/actions/setup
- name: Run VRT Tests on Netlify URL
run: yarn vrt
env:
E2E_START_URL: ${{ needs.netlify.outputs.netlify_url }}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: desktop-client-test-results
path: packages/desktop-client/test-results/
retention-days: 30
overwrite: true
4 changes: 2 additions & 2 deletions .github/workflows/electron-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- if: ${{ startsWith(matrix.os, 'windows') }}
run: pip.exe install setuptools
- if: ${{ ! startsWith(matrix.os, 'windows') }}
Expand All @@ -41,7 +41,7 @@ jobs:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
- name: Upload Build
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: actual-electron-${{ matrix.os }}
path: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/electron-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- if: ${{ startsWith(matrix.os, 'windows') }}
run: pip.exe install setuptools
- if: ${{ ! startsWith(matrix.os, 'windows') }}
Expand All @@ -34,7 +34,7 @@ jobs:
- name: Build Electron
run: ./bin/package-electron
- name: Upload Build
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: actual-electron-${{ matrix.os }}
path: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/issues-feature-implemented.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
runs-on: ubuntu-latest
steps:
# This is not a security concern because we have approved & merged the PR
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '19'
- name: Handle feature requests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Check release notes
if: startsWith(github.head_ref, 'release/') == false
uses: actualbudget/actions/release-notes/check@main
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/size-compare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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@v2
uses: dawidd6/action-download-artifact@v3
id: pr-build
with:
branch: ${{github.base_ref}}
Expand All @@ -55,7 +55,7 @@ jobs:
path: base

- name: Download build artifact from PR
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v3
with:
pr: ${{github.event.pull_request.number}}
workflow: build.yml
Expand Down
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@actual-app/api",
"version": "6.4.0",
"version": "6.5.0",
"license": "MIT",
"description": "An API for Actual",
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@actual-app/web",
"version": "24.1.0",
"version": "24.2.0",
"license": "MIT",
"files": [
"build"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export const MonthPicker = ({
}),
...(hovered &&
!selected && {
backgroundColor: 'rgba(100, 100, 100, .15)',
backgroundColor: theme.buttonBareBackgroundHover,
}),
...(hovered &&
selected && {
Expand Down
17 changes: 17 additions & 0 deletions packages/desktop-client/src/components/budget/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,24 @@ function BudgetInner(props: BudgetProps) {
}
};

const groupNameAlreadyExistsNotification = group => {
props.addNotification({
type: 'error',
message: `A ${group.hidden ? 'hidden ' : ''}${group.name}’ category group already exists.`,
});
};

const onSaveGroup = async group => {
const categories = await props.getCategories();
const matchingGroups = categories.grouped
.filter(g => g.name.toUpperCase() === group.name.toUpperCase())
.filter(g => group.id === 'new' || group.id !== g.id);

if (matchingGroups.length > 0) {
groupNameAlreadyExistsNotification(matchingGroups[0]);
return;
}

if (group.id === 'new') {
const id = await props.createGroup(group.name);
setIsAddingGroup(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export function BudgetSummary({
alignItems: 'center',
padding: '10px 20px',
justifyContent: 'space-between',
backgroundColor: theme.tableHeaderBackground,
backgroundColor: theme.tableBackground,
borderTop: '1px solid ' + theme.tableBorder,
}}
>
Expand Down
55 changes: 55 additions & 0 deletions packages/desktop-client/src/components/filters/AppliedFilters.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import React from 'react';

import { type RuleConditionEntity } from 'loot-core/types/models';

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

import { FilterExpression } from './FilterExpression';
import { CondOpMenu } from './SavedFilters';

type AppliedFiltersProps = {
filters: RuleConditionEntity[];
onUpdate: (
filter: RuleConditionEntity,
newFilter: RuleConditionEntity,
) => RuleConditionEntity;
onDelete: (filter: RuleConditionEntity) => void;
conditionsOp: string;
onCondOpChange: () => void;
};

export function AppliedFilters({
filters,
onUpdate,
onDelete,
conditionsOp,
onCondOpChange,
}: AppliedFiltersProps) {
return (
<View
style={{
flexDirection: 'row',
alignItems: 'flex-start',
flexWrap: 'wrap',
}}
>
<CondOpMenu
conditionsOp={conditionsOp}
onCondOpChange={onCondOpChange}
filters={filters}
/>
{filters.map((filter: RuleConditionEntity, i: number) => (
<FilterExpression
key={i}
customName={filter.customName}
field={filter.field}
op={filter.op}
value={filter.value}
options={filter.options}
onChange={newFilter => onUpdate(filter, newFilter)}
onDelete={() => onDelete(filter)}
/>
))}
</View>
);
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
// @ts-strict-ignore
import React from 'react';

import { SvgFilter } from '../../icons/v1';
import { Button } from '../common/Button';

type CompactFiltersButtonProps = {
onClick: (newValue) => void;
};

export function CompactFiltersButton({ onClick }: CompactFiltersButtonProps) {
export function CompactFiltersButton({ onClick }: { onClick: () => void }) {
return (
<Button type="bare" onClick={onClick}>
<SvgFilter width={15} height={15} />
Expand Down
Loading

0 comments on commit 3d5bdea

Please sign in to comment.