Skip to content

Conversation

misu-dev
Copy link
Contributor

@misu-dev misu-dev commented Aug 10, 2025

This PR adds the currency display to the rules.
It also fixes #5476 as the AmountInput got updated to handle currency specifics.

Also it now uses the number specific InputField in the Account Filter modal:
image
This may break the visual of old field, but it is standardized for currency input and is already in use by the rules.

It also removes a lot of convertions like integerToAmount, amountToInteger, currencyToAmount

@actual-github-bot actual-github-bot bot changed the title feat(currency): add currency display to rules [WIP] feat(currency): add currency display to rules Aug 10, 2025
Copy link

netlify bot commented Aug 10, 2025

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit c96e8c9
🔍 Latest deploy log https://app.netlify.com/projects/actualbudget/deploys/68987eff2397a4000861d5ac
😎 Deploy Preview https://deploy-preview-5536.demo.actualbudget.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@misu-dev misu-dev force-pushed the feat/add-currency-to-rules branch from 189835e to c96e8c9 Compare August 10, 2025 11:14
Copy link
Contributor

Bundle Stats — desktop-client

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
22 10.67 MB → 10.67 MB (+265 B) +0.00%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/component-library/src/Input.tsx 📈 +357 B (+16.23%) 2.15 kB → 2.5 kB
src/components/util/AmountInput.tsx 📈 +472 B (+9.61%) 4.8 kB → 5.26 kB
src/components/rules/Value.tsx 📈 +32 B (+0.64%) 4.88 kB → 4.91 kB
src/components/filters/FiltersMenu.jsx 📈 +42 B (+0.29%) 14.38 kB → 14.43 kB
locale/uk.json 📈 +88 B (+0.07%) 125.36 kB → 125.45 kB
src/components/rules/RuleEditor.tsx 📈 +3 B (+0.01%) 39.5 kB → 39.5 kB
src/components/util/GenericInput.jsx 📉 -41 B (-0.67%) 6 kB → 5.96 kB
src/components/filters/FilterExpression.tsx 📉 -84 B (-2.28%) 3.6 kB → 3.52 kB
home/runner/work/actual/actual/packages/loot-core/src/shared/rules.ts 📉 -604 B (-6.79%) 8.68 kB → 8.09 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
static/js/index.js 7.87 MB → 7.87 MB (+261 B) +0.00%
static/js/uk.js 125.36 kB → 125.45 kB (+88 B) +0.07%

Smaller

Asset File Size % Changed
static/js/TransactionList.js 10.92 kB → 10.84 kB (-84 B) -0.75%

Unchanged

Asset File Size % Changed
static/js/de.js 138.92 kB 0%
static/js/en-GB.js 6.38 kB 0%
static/js/en.js 126.88 kB 0%
static/js/es.js 70.7 kB 0%
static/js/fr.js 147.67 kB 0%
static/js/it.js 140.93 kB 0%
static/js/nl.js 100.01 kB 0%
static/js/pl.js 84.52 kB 0%
static/js/pt-BR.js 138.82 kB 0%
static/js/sv.js 64.72 kB 0%
static/js/th.js 189.27 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 12.94 kB 0%
static/js/workbox-window.prod.es5.js 5.64 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/BackgroundImage.js 122.29 kB 0%
static/js/ReportRouter.js 830.01 kB 0%
static/js/narrow.js 405.54 kB 0%
static/js/wide.js 116.43 kB 0%
static/js/useAccountPreviewTransactions.js 3.15 kB 0%

Copy link
Contributor

Bundle Stats — loot-core

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
1 2.26 MB → 2.26 MB (-105 B) -0.00%
Changeset
File Δ Size
packages/loot-core/src/shared/rules.ts 📉 -914 B (-8.14%) 10.96 kB → 10.07 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

Asset File Size % Changed
kcab.worker.js 2.26 MB → 2.26 MB (-105 B) -0.00%

Unchanged

No assets were unchanged

@@ -56,6 +57,7 @@ export function Input({
onChangeValue,
onUpdate,
className,
useKeyDown = false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing changes to the base Input component has a very large blast radius. This addition poses significant risk. As such: it cannot be taken lightly.

Conceptually - I'm not a fan of this boolean flag that amends the existing logic. Why is this necessary? Are there other ways to achieve something similar without creating conditional logic for key up/down handling?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback. I agree. This was a fast idea as the AmountInput updates the value on keyUp, but the Popover closes already on keyDown. I will have another look at it.

Copy link
Contributor

👋 Hi! It looks like this PR has not had any changes for a week now. Would you like someone to review this PR? If so - please remove the "[WIP]" prefix from the PR title. That will let the community know that this PR is open for a review.

Copy link
Contributor

This PR was closed because it has been stalled for 5 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Crash when filtering by amount, then changing the filter condition
2 participants