-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: reconcile on context menu #4252
base: master
Are you sure you want to change the base?
Conversation
UnderKoen
commented
Jan 28, 2025
•
edited
Loading
edited
Bundle Stats — desktop-clientHey 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
Changeset
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger
Smaller No assets were smaller Unchanged
|
Bundle Stats — loot-coreHey 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
Changeset No files were changed View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller No assets were smaller Unchanged
|
✅ Deploy Preview for actualbudget ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
WalkthroughThe pull request introduces changes to two files in the Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (3)
packages/desktop-client/src/components/sidebar/Account.tsx (1)
Line range hint
198-224
: Consider enhancing error feedback for name editing.While the implementation handles validation correctly, it would be beneficial to provide visual feedback to users when validation fails.
Consider adding error state handling:
<InitialFocus> <Input style={{ padding: 0, width: '100%', + borderColor: nameError ? theme.errorText : undefined, }} onBlur={() => setIsEditingName(false)} onEnter={e => { const inputEl = e.target as HTMLInputElement; const newAccountName = inputEl.value; if (newAccountName.trim() !== '') { dispatch( updateAccount({ account: { ...account, name: newAccountName, }, }), ); } setIsEditingName(false); }} onEscape={() => setIsEditingName(false)} defaultValue={name} /> + {nameError && ( + <Text style={{ color: theme.errorText, fontSize: 12 }}> + {nameError} + </Text> + )} </InitialFocus>packages/desktop-client/src/components/accounts/Account.tsx (2)
372-372
: Consider adding type annotation for reconcileAmount initialization.While the initialization is correct, adding a type annotation would improve type safety.
- reconcileAmount: props.reconcileAmount, + reconcileAmount: props.reconcileAmount as number | null,
477-480
: Consider simplifying the reconcileAmount update.The update logic could be more concise by directly updating the state.
- if (this.props.reconcileAmount !== prevProps.reconcileAmount) { - this.setState({ reconcileAmount: this.props.reconcileAmount }); - } + this.props.reconcileAmount !== prevProps.reconcileAmount && + this.setState({ reconcileAmount: this.props.reconcileAmount });
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
upcoming-release-notes/4252.md
is excluded by!**/*.md
📒 Files selected for processing (2)
packages/desktop-client/src/components/accounts/Account.tsx
(4 hunks)packages/desktop-client/src/components/sidebar/Account.tsx
(9 hunks)
🧰 Additional context used
📓 Learnings (3)
📓 Common learnings
Learnt from: joel-jeremy
PR: actualbudget/actual#3685
File: packages/desktop-client/src/components/accounts/Account.tsx:655-665
Timestamp: 2024-11-10T16:45:31.225Z
Learning: The Account component in 'packages/desktop-client/src/components/accounts/Account.tsx' is being rewritten in a separate PR.
packages/desktop-client/src/components/accounts/Account.tsx (1)
Learnt from: joel-jeremy
PR: actualbudget/actual#3685
File: packages/desktop-client/src/components/accounts/Account.tsx:655-665
Timestamp: 2024-11-10T16:45:31.225Z
Learning: The Account component in 'packages/desktop-client/src/components/accounts/Account.tsx' is being rewritten in a separate PR.
packages/desktop-client/src/components/sidebar/Account.tsx (1)
Learnt from: joel-jeremy
PR: actualbudget/actual#3685
File: packages/desktop-client/src/components/accounts/Account.tsx:655-665
Timestamp: 2024-11-10T16:45:31.225Z
Learning: The Account component in 'packages/desktop-client/src/components/accounts/Account.tsx' is being rewritten in a separate PR.
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: build (macos-latest)
- GitHub Check: build (windows-latest)
- GitHub Check: build (ubuntu-latest)
- GitHub Check: Wait for Netlify build to finish
- GitHub Check: Analyze
🔇 Additional comments (5)
packages/desktop-client/src/components/sidebar/Account.tsx (3)
3-3
: LGTM! Well-organized imports and hooks.The new imports and hooks provide necessary functionality for internationalization, currency handling, and value formatting.
Also applies to: 13-13, 40-41
114-115
: LGTM! Clear separation of editing states.The split between
isEditingName
andisEditingBalance
improves code clarity and maintainability by separating concerns.
292-293
: LGTM! Well-implemented menu internationalization.The menu items are properly internationalized using the translation hook, and the reconcile functionality is well-integrated.
packages/desktop-client/src/components/accounts/Account.tsx (2)
310-310
: LGTM! Well-typed reconcileAmount property.The reconcileAmount property is properly typed with null union type for optional values.
2029-2029
: LGTM! Proper props passing with null fallback.The reconcileAmount prop is correctly passed with a null fallback using the nullish coalescing operator.
The cleared/locked column disappears after reconciling via the context menu. |