actual icon indicating copy to clipboard operation
actual copied to clipboard

[Feature] Make comma's and period interchangeable when entering figures

Open Wizmaster opened this issue 9 months ago • 5 comments

Implements #2318

It's only allowed for formats not using period or comma as a thousand separator. I don't think somebody using a format with comma and dot as decimal and thousand separator would have the issue in the first place.

I reworked the arithmetic parser to let currencyToAmount() handle number formatting with active format. I noticed it also made an exception for a leading currency symbol but not for a tailing one. I fixed it to allow that case. (actually in my implementation you could also put a currency symbol in the middle of a value but it would be ignored anyway, I don't think it's an issue)

Wizmaster avatar Apr 26 '24 23:04 Wizmaster

Deploy Preview for actualbudget ready!

Name Link
Latest commit b90402c340c92dabaec91ed2d397860761df66ff
Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/6643ba3aa0c6ba0008c163ec
Deploy Preview https://deploy-preview-2672.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 site configuration.

netlify[bot] avatar Apr 26 '24 23:04 netlify[bot]

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
9 4.72 MB → 4.72 MB (+44 B) +0.00%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/shared/util.ts 📈 +283 B (+4.55%) 6.07 kB → 6.35 kB
home/runner/work/actual/actual/packages/loot-core/src/shared/arithmetic.ts 📉 -239 B (-8.98%) 2.6 kB → 2.36 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
static/js/index.js 3 MB → 3 MB (+44 B) +0.00%

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
static/js/indexeddb-main-thread-worker-e59fee74.js 13.5 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/BackgroundImage.js 122.29 kB 0%
static/js/narrow.js 59.81 kB 0%
static/js/usePreviewTransactions.js 790 B 0%
static/js/AppliedFilters.js 20.54 kB 0%
static/js/wide.js 262.4 kB 0%
static/js/ReportRouter.js 1.23 MB 0%

github-actions[bot] avatar Apr 26 '24 23:04 github-actions[bot]

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 1.2 MB → 1.2 MB (+142 B) +0.01%
Changeset
File Δ Size
packages/loot-core/src/shared/util.ts 📈 +313 B (+3.07%) 9.97 kB → 10.28 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
kcab.worker.js 1.2 MB → 1.2 MB (+142 B) +0.01%

Smaller

No assets were smaller

Unchanged

No assets were unchanged

github-actions[bot] avatar Apr 26 '24 23:04 github-actions[bot]

@Wizmaster Can you provide some steps to test these changes out?

joel-jeremy avatar May 07 '24 16:05 joel-jeremy

@joel-jeremy You can use the test budget with the number formatting "1 000,33" (or "1 000.33").

The PR allow then to input amounts with "10.50" or "10,50" in transactions or budget values. It also allow to use arithmetic like "$10.50+$10.25" or "26€-5,25€" with the correct result (20.75 both).

Wizmaster avatar May 07 '24 22:05 Wizmaster