[PR #1029] [MERGED] Make number parsing agnostic to decimal and thousands separators (#894) #3475

Closed
opened 2026-02-28 20:42:12 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/1029
Author: @chylex
Created: 5/12/2023
Status: Merged
Merged: 5/20/2023
Merged by: @j-f1

Base: masterHead: decimal-separator


📝 Commits (2)

  • c2f3fa2 Fix E2E tests not clearing zeros in Payment & Deposit input fields
  • 47b0974 Make number parsing agnostic to decimal and thousands separators (#894)

📊 Changes

5 files changed (+134 additions, -11 deletions)

View changed files

📝 packages/desktop-client/e2e/page-models/account-page.js (+8 -0)
packages/loot-core/src/mocks/number-formats.ts (+25 -0)
📝 packages/loot-core/src/shared/arithmetic.test.ts (+75 -0)
📝 packages/loot-core/src/shared/arithmetic.ts (+20 -11)
upcoming-release-notes/1029.md (+6 -0)

📄 Description

From the discussion in #894, I made decimal separators agnostic for all number formats and added tests. Please let me know if it makes sense once you try it.

We could also check after imports to see if there was a mismatch in detected decimal separators and pop up a warning.

I haven't added any mismatch detection and warning in this PR, but if you'd like me to I can add a commit here or make a second PR for it.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/1029 **Author:** [@chylex](https://github.com/chylex) **Created:** 5/12/2023 **Status:** ✅ Merged **Merged:** 5/20/2023 **Merged by:** [@j-f1](https://github.com/j-f1) **Base:** `master` ← **Head:** `decimal-separator` --- ### 📝 Commits (2) - [`c2f3fa2`](https://github.com/actualbudget/actual/commit/c2f3fa2729a3b1dc52320a1a271f4d3689dabd50) Fix E2E tests not clearing zeros in Payment & Deposit input fields - [`47b0974`](https://github.com/actualbudget/actual/commit/47b097493e500f623f6d677da4d9cb0dece5ebf4) Make number parsing agnostic to decimal and thousands separators (#894) ### 📊 Changes **5 files changed** (+134 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/e2e/page-models/account-page.js` (+8 -0) ➕ `packages/loot-core/src/mocks/number-formats.ts` (+25 -0) 📝 `packages/loot-core/src/shared/arithmetic.test.ts` (+75 -0) 📝 `packages/loot-core/src/shared/arithmetic.ts` (+20 -11) ➕ `upcoming-release-notes/1029.md` (+6 -0) </details> ### 📄 Description From the discussion in #894, I made decimal separators agnostic for all number formats and added tests. Please let me know if it makes sense once you try it. > We could also check after imports to see if there was a mismatch in detected decimal separators and pop up a warning. I haven't added any mismatch detection and warning in this PR, but if you'd like me to I can add a commit here or make a second PR for it. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-02-28 20:42:12 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#3475