[PR #3093] [MERGED] Support type-checking on spreadsheet fields (part 1) #4674

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

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/3093
Author: @jfdoming
Created: 7/18/2024
Status: Merged
Merged: 8/3/2024
Merged by: @jfdoming

Base: masterHead: jfdoming/strict-binding-types-part-1


📝 Commits (10+)

  • 77b7978 Correct table usage of onBlur
  • a9194b0 Add basic spreadsheet typing structure
  • 4d5e5a2 Move to different module
  • f407b5d Add account typing
  • 3f2c467 Add release notes
  • 4831db2 Fix lint
  • 6d8b6f3 Remove unneeded diff
  • 8aad0d6 PR feedback
  • c94a5ce Merge branch 'master' into jfdoming/strict-binding-types-part-1
  • 0d6297b Merge branch 'master' into jfdoming/strict-binding-types-part-1

📊 Changes

5 files changed (+136 additions, -39 deletions)

View changed files

📝 packages/desktop-client/src/components/sidebar/Account.tsx (+5 -5)
📝 packages/desktop-client/src/components/spreadsheet/index.ts (+38 -2)
📝 packages/desktop-client/src/components/table.tsx (+36 -15)
📝 packages/loot-core/src/client/queries.ts (+51 -17)
upcoming-release-notes/3093.md (+6 -0)

📄 Description

This PR (along with the subsequent ones, see follow-up PRs for parts 2 and 3) adds stricter types to the "spreadsheet" utilities used in the app. The ultimate goal is to convert src/components/accounts/Account.jsx to Typescript (see previous attempt here along with comments). In terms of types being added, the approach taken is to add types field-by-field, and require field names to be present in a type map (see the SpreadsheetFieldTypes type added in this PR).

Since this is a large change, the approach taken for rollout is to add generic types in this PR, initially default them to any, and finally remove the defaults in the last PR. Please see this link for a collapsed version of all the PRs.

Feedback on the approach (rollout or typing) welcome!


🔄 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/3093 **Author:** [@jfdoming](https://github.com/jfdoming) **Created:** 7/18/2024 **Status:** ✅ Merged **Merged:** 8/3/2024 **Merged by:** [@jfdoming](https://github.com/jfdoming) **Base:** `master` ← **Head:** `jfdoming/strict-binding-types-part-1` --- ### 📝 Commits (10+) - [`77b7978`](https://github.com/actualbudget/actual/commit/77b797813f29281e09aab541116dcf410b64dea2) Correct table usage of `onBlur` - [`a9194b0`](https://github.com/actualbudget/actual/commit/a9194b0ad0334cc94271d719c29b63b9e2104e1d) Add basic spreadsheet typing structure - [`4d5e5a2`](https://github.com/actualbudget/actual/commit/4d5e5a2e29e102772ff77a904a0295f07f7a6832) Move to different module - [`f407b5d`](https://github.com/actualbudget/actual/commit/f407b5d16270bf6035b13ebe53f0daf63d5910c3) Add account typing - [`3f2c467`](https://github.com/actualbudget/actual/commit/3f2c46734eb84dc438e2cd30d5afc378e1085f97) Add release notes - [`4831db2`](https://github.com/actualbudget/actual/commit/4831db2661996fcf34ba3f09998c380976106b85) Fix lint - [`6d8b6f3`](https://github.com/actualbudget/actual/commit/6d8b6f3cc70c6372a537364d8659452ec44ef819) Remove unneeded diff - [`8aad0d6`](https://github.com/actualbudget/actual/commit/8aad0d667b20ab7085716066e5e99e3d4221e680) PR feedback - [`c94a5ce`](https://github.com/actualbudget/actual/commit/c94a5ce85a84f424a06eade4109a00029a04d748) Merge branch 'master' into jfdoming/strict-binding-types-part-1 - [`0d6297b`](https://github.com/actualbudget/actual/commit/0d6297bdaa58eb4de110da7b99e02e1b152be7fd) Merge branch 'master' into jfdoming/strict-binding-types-part-1 ### 📊 Changes **5 files changed** (+136 additions, -39 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/sidebar/Account.tsx` (+5 -5) 📝 `packages/desktop-client/src/components/spreadsheet/index.ts` (+38 -2) 📝 `packages/desktop-client/src/components/table.tsx` (+36 -15) 📝 `packages/loot-core/src/client/queries.ts` (+51 -17) ➕ `upcoming-release-notes/3093.md` (+6 -0) </details> ### 📄 Description This PR (along with the subsequent ones, see follow-up PRs for parts [2](https://github.com/actualbudget/actual/pull/3095) and [3](https://github.com/actualbudget/actual/pull/3097)) adds stricter types to the "spreadsheet" utilities used in the app. The ultimate goal is to convert `src/components/accounts/Account.jsx` to Typescript (see previous attempt [here](https://github.com/actualbudget/actual/pull/2329) along with comments). In terms of types being added, the approach taken is to add types field-by-field, and require field names to be present in a type map (see the `SpreadsheetFieldTypes` type added in this PR). Since this is a large change, the approach taken for rollout is to add generic types in this PR, initially default them to `any`, and finally remove the defaults in the last PR. Please see [this link](https://github.com/actualbudget/actual/compare/master...jfdoming:actual:jfdoming/strict-binding-types-demo) for a collapsed version of all the PRs. Feedback on the approach (rollout or typing) welcome! --- <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:59:29 -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#4674