Skip to content
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

Add Reconcile button on the account page. #3684

Merged
merged 19 commits into from
Oct 20, 2024

Conversation

attyluccio
Copy link
Contributor

As mentioned on discord, it is a small quality of life feature that adds the Reconcile button directly on the account page instead of having to go to the menu.

reconcile button

@actual-github-bot actual-github-bot bot changed the title Add Reconcile button on the account page. [WIP] Add Reconcile button on the account page. Oct 16, 2024
Copy link

netlify bot commented Oct 16, 2024

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit 774a125
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/6714ec93d39a84000889174a
😎 Deploy Preview https://deploy-preview-3684.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.

Copy link
Contributor

github-actions bot commented Oct 16, 2024

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 5.31 MB → 5.31 MB (+1.28 kB) +0.02%
Changeset
File Δ Size
src/components/accounts/Header.tsx 📈 +1.28 kB (+7.47%) 17.07 kB → 18.34 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
static/js/wide.js 230.84 kB → 232.12 kB (+1.28 kB) +0.55%

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
static/js/indexeddb-main-thread-worker-e59fee74.js 13.5 kB 0%
static/js/usePreviewTransactions.js 1.64 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/BackgroundImage.js 122.29 kB 0%
static/js/AppliedFilters.js 21.3 kB 0%
static/js/narrow.js 82.57 kB 0%
static/js/ReportRouter.js 1.51 MB 0%
static/js/index.js 3.32 MB 0%

Copy link
Contributor

github-actions bot commented Oct 16, 2024

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.27 MB 0%

Changeset

No files were changed

View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
kcab.worker.js 1.27 MB 0%

@youngcw
Copy link
Member

youngcw commented Oct 17, 2024

Does the menu still need to have the reconcile option if there is a big button for it now?

@attyluccio
Copy link
Contributor Author

Does the menu still need to have the reconcile option if there is a big button for it now?

I guess not! :)

I will update code as soon I'm back from work

@youngcw
Copy link
Member

youngcw commented Oct 18, 2024

Seems good to me. Just need to get the conflicts taken care of. Could you add in the translation to the button? It looks like that file was ready for translation, so we need to keep that.

@jfdoming
Copy link
Contributor

jfdoming commented Oct 18, 2024

One quick question, any reason to have a big primary button instead of an icon button? Just thinking that not everyone uses reconciliation, and it fits better with the existing icon buttons. I could imagine a lock-and-key icon, for example?

Then it could also be inline with the other buttons instead of floating above

@attyluccio
Copy link
Contributor Author

Seems good to me. Just need to get the conflicts taken care of. Could you add in the translation to the button? It looks like that file was ready for translation, so we need to keep that.

I'll edit the translation as soon as possible and check for the conflicts

@attyluccio attyluccio changed the title [WIP] Add Reconcile button on the account page. Add Reconcile button on the account page. Oct 18, 2024
Copy link
Contributor

coderabbitai bot commented Oct 18, 2024

Walkthrough

The pull request introduces modifications to the AccountHeader component in Header.tsx. A new icon, SvgLockClosed, is added, and the type for the onReconcile prop is updated to reflect a new function signature, changing from AccountMenuProps['onReconcile'] to ComponentProps<typeof ReconcileMenu>['onReconcile']. A state variable named reconcileOpen is introduced to manage the visibility of a reconciliation menu, alongside a reference reconcileRef for the button that activates this menu. A new reconciliation button is added to the UI, which, when clicked, sets reconcileOpen to true, revealing a Popover that contains the ReconcileMenu. This menu is designed to receive the account and the updated onReconcile function. Additionally, the AccountMenu component is modified to remove the previous reconciliation tooltip and option from the menu items, thereby simplifying its logic and altering the reconciliation management approach within the component.

Possibly related PRs

Suggested labels

sparkles: Merged

Suggested reviewers

  • youngcw

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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

🧹 Outside diff range and nitpick comments (2)
packages/desktop-client/src/components/accounts/Header.jsx (2)

262-264: Enhance accessibility by managing focus within the Reconcile popover

When the Popover opens, setting the initial focus to the first interactive element within ReconcileMenu improves keyboard navigation and accessibility for users.

Ensure that the ReconcileMenu component handles focus appropriately, possibly by adding an InitialFocus wrapper:

<Popover
  /* existing props */
>
  <InitialFocus>
    <ReconcileMenu
      account={account}
      onClose={() => setReconcileOpen(false)}
      onReconcile={onReconcile}
    />
  </InitialFocus>
</Popover>

318-318: Maintain consistent styling by avoiding inline styles

The inline style={{ padding: 6 }} on the <Button> component may lead to inconsistent styling across the application.

Consider using a predefined style or class to maintain consistency:

-                style={{ padding: 6 }}
+                className="button-padding"

And define the style in your stylesheet:

.button-padding {
  padding: 6px;
}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 0d9528e and 2952956.

⛔ Files ignored due to path filters (44)
  • packages/desktop-client/e2e/accounts.test.js-snapshots/Accounts-Import-Transactions-import-csv-file-twice-1-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/accounts.test.js-snapshots/Accounts-Import-Transactions-import-csv-file-twice-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/accounts.test.js-snapshots/Accounts-Import-Transactions-import-csv-file-twice-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/accounts.test.js-snapshots/Accounts-Import-Transactions-imports-transactions-from-a-CSV-file-1-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/accounts.test.js-snapshots/Accounts-Import-Transactions-imports-transactions-from-a-CSV-file-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/accounts.test.js-snapshots/Accounts-Import-Transactions-imports-transactions-from-a-CSV-file-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/accounts.test.js-snapshots/Accounts-closes-an-account-1-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/accounts.test.js-snapshots/Accounts-closes-an-account-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/accounts.test.js-snapshots/Accounts-closes-an-account-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/accounts.test.js-snapshots/Accounts-closes-an-account-4-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/accounts.test.js-snapshots/Accounts-closes-an-account-5-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/accounts.test.js-snapshots/Accounts-closes-an-account-6-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/accounts.test.js-snapshots/Accounts-creates-a-new-account-and-views-the-initial-balance-transaction-1-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/accounts.test.js-snapshots/Accounts-creates-a-new-account-and-views-the-initial-balance-transaction-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/accounts.test.js-snapshots/Accounts-creates-a-new-account-and-views-the-initial-balance-transaction-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-net-worth-and-cash-flow-reports-1-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/rules.test.js-snapshots/Rules-creates-a-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-4-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/rules.test.js-snapshots/Rules-creates-a-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-5-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/rules.test.js-snapshots/Rules-creates-a-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-6-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/rules.test.js-snapshots/Rules-creates-a-split-transaction-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-1-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/rules.test.js-snapshots/Rules-creates-a-split-transaction-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/rules.test.js-snapshots/Rules-creates-a-split-transaction-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/transactions.test.js-snapshots/Transactions-checks-the-page-visuals-1-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/transactions.test.js-snapshots/Transactions-checks-the-page-visuals-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/transactions.test.js-snapshots/Transactions-checks-the-page-visuals-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/transactions.test.js-snapshots/Transactions-creates-a-split-test-transaction-1-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/transactions.test.js-snapshots/Transactions-creates-a-split-test-transaction-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/transactions.test.js-snapshots/Transactions-creates-a-split-test-transaction-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/transactions.test.js-snapshots/Transactions-creates-a-test-transaction-1-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/transactions.test.js-snapshots/Transactions-creates-a-test-transaction-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/transactions.test.js-snapshots/Transactions-creates-a-test-transaction-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/transactions.test.js-snapshots/Transactions-creates-a-transfer-test-transaction-1-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/transactions.test.js-snapshots/Transactions-creates-a-transfer-test-transaction-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/transactions.test.js-snapshots/Transactions-creates-a-transfer-test-transaction-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/transactions.test.js-snapshots/Transactions-creates-a-transfer-test-transaction-4-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/transactions.test.js-snapshots/Transactions-creates-a-transfer-test-transaction-5-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/transactions.test.js-snapshots/Transactions-creates-a-transfer-test-transaction-6-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/transactions.test.js-snapshots/Transactions-filters-transactions-by-category-7-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/transactions.test.js-snapshots/Transactions-filters-transactions-by-category-8-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/transactions.test.js-snapshots/Transactions-filters-transactions-by-category-9-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/transactions.test.js-snapshots/Transactions-filters-transactions-by-date-7-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/transactions.test.js-snapshots/Transactions-filters-transactions-by-date-8-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/transactions.test.js-snapshots/Transactions-filters-transactions-by-date-9-chromium-linux.png is excluded by !**/*.png
  • upcoming-release-notes/3684.md is excluded by !**/*.md
📒 Files selected for processing (1)
  • packages/desktop-client/src/components/accounts/Header.jsx (5 hunks)
🧰 Additional context used
🔇 Additional comments (1)
packages/desktop-client/src/components/accounts/Header.jsx (1)

274-279: Verify the onOpenChange handler in the Popover component

The onOpenChange prop may receive the new open state as an argument. To correctly update the reconcileOpen state, ensure the handler accounts for this.

Check the Popover component's API to confirm. If onOpenChange provides the new state, update the handler as follows:

-                  onOpenChange={() => setReconcileOpen(false)}
+                  onOpenChange={(open) => setReconcileOpen(open)}

This change ensures that the reconcileOpen state accurately reflects the popover's open status.

@@ -256,6 +259,31 @@ export function AccountHeader({
onChange={onSearch}
inputRef={searchInput}
/>
<View style={{ marginLeft: 16 }} title={t('Reconcile')}>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Move the title attribute to the Button component for correct tooltip display

The title attribute on the <View> component may not render a tooltip as expected. To ensure the tooltip appears when a user hovers over the button, move the title attribute to the <Button> component.

Apply this diff to fix the issue:

-              <View style={{ marginLeft: 16 }} title={t('Reconcile')}>
+              <View style={{ marginLeft: 16 }}>
                 <Button
+                  title={t('Reconcile')}
                   ref={reconcileRef}
                   variant="bare"
                   aria-label={t('Reconcile')}
                   onPress={() => {
                     setReconcileOpen(true);
                   }}
                 >
                   <SvgLockClosed width={13} height={13} />
                 </Button>

Alternatively, consider using a Tooltip component if available in your UI library for better consistency and flexibility.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<View style={{ marginLeft: 16 }} title={t('Reconcile')}>
<View style={{ marginLeft: 16 }}>
<Button
title={t('Reconcile')}
ref={reconcileRef}
variant="bare"
aria-label={t('Reconcile')}
onPress={() => {
setReconcileOpen(true);
}}
>
<SvgLockClosed width={13} height={13} />
</Button>

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
packages/loot-core/src/server/budget/actions.ts (1)

34-37: LGTM! Consider using template literals for SQL query.

The SQL query formatting improvement enhances readability. For consistency with other parts of the codebase, consider using template literals for the SQL query.

You could refactor the SQL query to use template literals like this:

- const budgetType = db.firstSync(
-   `SELECT value FROM preferences WHERE id = ?`,
-   ['budgetType'],
- );
+ const budgetType = db.firstSync(`
+   SELECT value FROM preferences WHERE id = ?
+ `, ['budgetType']);
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 6d921f7 and bd94fa3.

📒 Files selected for processing (1)
  • packages/loot-core/src/server/budget/actions.ts (1 hunks)
🧰 Additional context used

@attyluccio
Copy link
Contributor Author

Thanks for the icon refactor! Looks pretty good now. However, I noticed that the lock icon button is smaller than the other button right next to it (23x23 vs 26x26), and the icon itself is smaller (13x13 vs 14x14). For visual consistency, mind making them the same?

yes will do... sorry for the mistake

Absolutely no worries, just trying to make sure the submission is the best it can be! Looks much better now.

One thing I noticed is that the button is visible on the "All accounts" and "For budget" top-level pages, and crashes the app if clicked there. Is there any way we can hide the button on those pages? I think maybe we could just test for the presence of a valid account ID.

sorry for this other mistake! I don't use those pages often and totally missed it.

now should all be fixed :)

@jfdoming
Copy link
Contributor

Thanks for the icon refactor! Looks pretty good now. However, I noticed that the lock icon button is smaller than the other button right next to it (23x23 vs 26x26), and the icon itself is smaller (13x13 vs 14x14). For visual consistency, mind making them the same?

yes will do... sorry for the mistake

Absolutely no worries, just trying to make sure the submission is the best it can be! Looks much better now.
One thing I noticed is that the button is visible on the "All accounts" and "For budget" top-level pages, and crashes the app if clicked there. Is there any way we can hide the button on those pages? I think maybe we could just test for the presence of a valid account ID.

sorry for this other mistake! I don't use those pages often and totally missed it.

now should all be fixed :)

Looks great now!

@jfdoming
Copy link
Contributor

Oh, sorry one other thing I missed 😞 I think we probably want to keep the ordering of the "selected transactions" button right after the search bar, and make sure the padding is consistent. What do you think? Here's what it looks like on edge:
image

But in this PR:
image

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (2)
packages/desktop-client/src/components/accounts/Header.tsx (2)

372-403: Enhance accessibility for the Reconcile button

Ensure that the aria-label and title attributes for the Reconcile button use localized strings and provide clear descriptions for assistive technologies.

Consider updating the button as follows:

<Button
  ref={reconcileRef}
  variant="bare"
  aria-label={t('Reconcile account')}
  style={{ padding: 6, marginLeft: 10 }}
  onPress={() => {
    setReconcileOpen(true);
  }}
>
  <View title={t('Reconcile account')}>
    <SvgLockClosed width={14} height={14} />
  </View>
</Button>

412-412: Maintain consistency in inline styles

The inline style { padding: 6 } added to the button should be consistent with other style definitions in the component. Consider extracting this into a shared style or using theme variables for consistency.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between bd94fa3 and 774a125.

📒 Files selected for processing (1)
  • packages/desktop-client/src/components/accounts/Header.tsx (6 hunks)
🧰 Additional context used
🔇 Additional comments (8)
packages/desktop-client/src/components/accounts/Header.tsx (8)

185-185: Initialization of reconcileOpen state is appropriate

The state variable reconcileOpen is correctly initialized using useState(false). This manages the visibility of the reconciliation popover efficiently.


188-188: reconcileRef is properly set up

The reconcileRef is correctly initialized with useRef(null) to reference the reconciliation button trigger. This will help in associating the popover with the trigger element.


372-403: Update onOpenChange to accurately reflect popover state

The onOpenChange handler currently sets reconcileOpen to false regardless of the popover's new state. It's better to use the isOpen parameter provided by onOpenChange to keep reconcileOpen in sync with the popover.

-onOpenChange={() => setReconcileOpen(false)}
+onOpenChange={(isOpen) => setReconcileOpen(isOpen)}

This change ensures that reconcileOpen accurately reflects whether the popover is open or closed.


703-703: Ensure no unintended changes in AccountMenu rendering

At line 703, verify that the return statement in AccountMenu hasn't been altered unintentionally. Ensure that any modifications are intentional and do not affect the rendering logic.


706-706: onMenuSelect handler is correctly passed

The onMenuSelect function is properly passed down to the Menu component. This ensures that menu actions are handled appropriately.


96-96: Confirm the type of onReconcile prop

The onReconcile prop in AccountHeaderProps is typed as ComponentProps<typeof ReconcileMenu>['onReconcile']. Ensure that this type aligns with the expected function signature and that all usages match this type definition.

#!/bin/bash
# Description: Check the definition and usage of the onReconcile prop

# Find the type definition in ReconcileMenu
rg 'type.*ReconcileMenuProps' packages/desktop-client/src/components/accounts/Reconcile.tsx -A 10

# Search for all usages of onReconcile
rg 'onReconcile' packages/desktop-client/src/components/accounts/

372-403: Verify the Reconcile button does not appear on aggregate account views

While the Reconcile button is conditionally rendered with {account && (...)}, ensure that account is undefined or null for aggregate views like "All accounts" or "For budget". This prevents the button from appearing where it shouldn't.

#!/bin/bash
# Description: Ensure account prop is null on aggregate views

# Find where AccountHeader is used and check the account prop
rg '<AccountHeader' packages/desktop-client/src/ -A 5

# Verify that in aggregate views, the account prop is not passed or is null

27-27: Ensure imported icons are utilized

You've imported SvgLockClosed and SvgPencil1 from the icons module. Please verify that both icons are used within this component to avoid unnecessary imports.

✅ Verification successful

Imported icons are utilized as expected

Both SvgLockClosed and SvgPencil1 are used within Header.tsx.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify usage of SvgLockClosed and SvgPencil1 in Header.tsx

# Check for usage of SvgLockClosed
rg 'SvgLockClosed' packages/desktop-client/src/components/accounts/Header.tsx

# Check for usage of SvgPencil1
rg 'SvgPencil1' packages/desktop-client/src/components/accounts/Header.tsx

Length of output: 2674


Script:

#!/bin/bash
# Description: Verify usage of SvgLockClosed and SvgPencil1 in Header.tsx

# Check for usage of SvgLockClosed
rg 'SvgLockClosed' packages/desktop-client/src/components/accounts/Header.tsx

# Check for usage of SvgPencil1
rg 'SvgPencil1' packages/desktop-client/src/components/accounts/Header.tsx

Length of output: 268

@attyluccio
Copy link
Contributor Author

Oh, sorry one other thing I missed 😞 I think we probably want to keep the ordering of the "selected transactions" button right after the search bar, and make sure the padding is consistent. What do you think? Here's what it looks like on edge: image

But in this PR: image

ok did this edit... should be as you ask now :)

Copy link
Contributor

@jfdoming jfdoming left a comment

Choose a reason for hiding this comment

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

Great! Looks good to me now, will let @youngcw take a look before we merge

@youngcw youngcw merged commit 4e07357 into actualbudget:master Oct 20, 2024
20 checks passed
@attyluccio attyluccio deleted the reconcile-button branch October 21, 2024 21:44
matt-fidd pushed a commit to actualbudget/docs that referenced this pull request Dec 11, 2024
…560)

When I setup my actual account, I noticed that there was no
reconciliation button as described in documentation. Found out after
hunting, that the UI has changed resulting in this issue. I have created
this PR to update that.

Let me know if the language or images need to be changed.

Caused because of: actualbudget/actual#3684
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants