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

Update Sidebar - Expanding Button Section #3621

Open
wants to merge 37 commits into
base: master
Choose a base branch
from

Conversation

tlesicka
Copy link
Contributor

Continuation of splitting #3457 into several PR's as requested by @MatissJanis.

This PR updates the expanding "More" section to keep all buttons in the same flow instead of being divided by the "More".
"Settings" is removed from the expanding buttons section as it can be accessed from the budget name drop down menu and does not need to be in two places.

Previous discussions can be found:
Issue #3414
PR #3457

tlesicka and others added 5 commits October 10, 2024 09:58
Updated PrimaryButtons.tsx to the new style expanding "More" section.
Added ui.expandPrimaryButtons to prefs.d.ts
Updated Sidebar.tsx to work with the new PrimaryButtons
Settings page is no longer on the expanding "More" section and must be accessed from the budget name drop down menu.
@actual-github-bot actual-github-bot bot changed the title Update Sidebar - Expanding Button Section [WIP] Update Sidebar - Expanding Button Section Oct 10, 2024
Copy link

netlify bot commented Oct 10, 2024

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit 1bae6a8
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/67240bd913c837000868504b
😎 Deploy Preview https://deploy-preview-3621.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 10, 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.32 MB → 5.32 MB (+483 B) +0.01%
Changeset
File Δ Size
src/components/sidebar/Sidebar.tsx 📈 +559 B (+9.04%) 6.04 kB → 6.59 kB
src/components/sidebar/PrimaryButtons.tsx 📉 -76 B (-3.75%) 1.98 kB → 1.9 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
static/js/narrow.js 82.57 kB → 82.96 kB (+404 B) +0.48%
static/js/index.js 3.33 MB → 3.33 MB (+79 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/usePreviewTransactions.js 1.64 kB 0%
static/js/AppliedFilters.js 21.3 kB 0%
static/js/BackgroundImage.js 122.29 kB 0%
static/js/wide.js 232.16 kB 0%
static/js/ReportRouter.js 1.5 MB 0%

Copy link
Contributor

github-actions bot commented Oct 10, 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%

Copy link
Contributor

coderabbitai bot commented Oct 10, 2024

Walkthrough

This pull request introduces significant modifications to the PrimaryButtons and Sidebar components within the desktop client application. The PrimaryButtons component has been restructured to define two new TypeScript types, PrimaryButtonItems and PrimaryButtonsProps, enhancing the handling of button items and their properties. The function signature has been updated to accept these props, including a default value for collapseSpeed. Additionally, state management has transitioned to a custom hook, useLocalPref, which manages the expanded state, allowing for dynamic rendering of buttons based on the buttons prop. The Sidebar component has been updated to incorporate new icons and a primaryButtonConfigs array for button configuration, replacing the previous hardcoded items. Furthermore, a new boolean property, 'ui.expandPrimaryButtons', has been added to the LocalPrefs type, allowing for additional configuration of UI behavior related to primary buttons.

Possibly related PRs

Suggested labels

:sparkles: Merged

Suggested reviewers

  • MatissJanis

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: 3

🧹 Outside diff range and nitpick comments (4)
packages/loot-core/src/types/prefs.d.ts (1)

58-58: LGTM! Consider adding a brief comment for clarity.

The addition of the 'ui.expandPrimaryButtons' property to the LocalPrefs type is appropriate and aligns with the PR objectives. The boolean type and naming convention are consistent with other UI-related properties.

Consider adding a brief comment above this property to explain its purpose, similar to other properties in this type. For example:

/** Whether to expand primary buttons in the UI */
'ui.expandPrimaryButtons': boolean;

This would improve code readability and maintainability.

packages/desktop-client/src/components/sidebar/Sidebar.tsx (1)

152-170: LGTM: PrimaryButtons updated with new dynamic configuration.

The PrimaryButtons component has been successfully updated to accept a 'buttons' prop, allowing for more flexible and dynamic button configuration. This change aligns well with the PR objectives of modifying the expanding "More" section.

A minor suggestion for improvement:

Consider extracting the button configurations into a separate constant or variable. This would improve readability and make it easier to manage these configurations in the future. For example:

const primaryButtonConfigs = [
  { title: t('Budget'), Icon: SvgWallet, to: '/budget' },
  { title: t('Reports'), Icon: SvgReports, to: '/reports' },
  { title: t('Schedules'), Icon: SvgCalendar, to: '/schedules' },
  { title: t('Payees'), Icon: SvgStoreFront, to: '/payees', hidable: true },
  { title: t('Rules'), Icon: SvgTuning, to: '/rules', hidable: true },
];

// Then in the JSX:
<PrimaryButtons buttons={primaryButtonConfigs} />

This approach would make the component more maintainable and easier to update in the future.

packages/desktop-client/src/components/sidebar/PrimaryButtons.tsx (2)

78-82: Simplify Conditional Style Logic for Better Readability

The current conditional styling in the style prop of the <Item> component is functional but can be simplified for better readability. By extracting the condition into a variable, the code becomes cleaner and easier to understand.

Refactor the style logic:

+            const shouldHide = item.hidable && !expanded && !isActive;
             return (
               <Item
                 key={item.title}
                 title={item.title}
                 Icon={item.Icon}
                 to={item.to}
                 style={{
-                  ...(item.hidable &&
-                    !expanded &&
-                    !isActive && { display: 'none' }),
+                  ...(shouldHide && { display: 'none' }),
                 }}
               />
             );

33-33: Consider Making 'collapseSpeed' a Constant or Context Value

The default collapseSpeed of 0.15 seconds is hardcoded. If this value is used in multiple components or might need adjustments in the future, consider defining it as a constant or retrieving it from a context or theme to maintain consistency across the application.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 23de23b and e4eb9e3.

⛔ Files ignored due to path filters (101)
  • 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-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/budget.test.js-snapshots/Budget-transfer-funds-to-another-category-1-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/budget.test.js-snapshots/Budget-transfer-funds-to-another-category-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/budget.test.js-snapshots/Budget-transfer-funds-to-another-category-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-custom-reports-Switches-to-Area-Graph-and-checks-the-visuals-1-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-custom-reports-Switches-to-Area-Graph-and-checks-the-visuals-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-custom-reports-Switches-to-Area-Graph-and-checks-the-visuals-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-custom-reports-Switches-to-Bar-Graph-and-checks-the-visuals-1-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-custom-reports-Switches-to-Bar-Graph-and-checks-the-visuals-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-custom-reports-Switches-to-Bar-Graph-and-checks-the-visuals-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-custom-reports-Switches-to-Data-Table-and-checks-the-visuals-1-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-custom-reports-Switches-to-Data-Table-and-checks-the-visuals-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-custom-reports-Switches-to-Data-Table-and-checks-the-visuals-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-custom-reports-Switches-to-Donut-Graph-and-checks-the-visuals-1-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-custom-reports-Switches-to-Donut-Graph-and-checks-the-visuals-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-custom-reports-Switches-to-Donut-Graph-and-checks-the-visuals-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-custom-reports-Switches-to-Line-Graph-and-checks-the-visuals-1-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-custom-reports-Switches-to-Line-Graph-and-checks-the-visuals-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-custom-reports-Switches-to-Line-Graph-and-checks-the-visuals-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-custom-reports-Validates-that-show-labels-button-shows-the-labels-1-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-custom-reports-Validates-that-show-labels-button-shows-the-labels-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-custom-reports-Validates-that-show-labels-button-shows-the-labels-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-custom-reports-Validates-that-show-legend-button-shows-the-legend-side-bar-1-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-custom-reports-Validates-that-show-legend-button-shows-the-legend-side-bar-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-custom-reports-Validates-that-show-legend-button-shows-the-legend-side-bar-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-custom-reports-Validates-that-show-summary-button-shows-the-summary-1-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-custom-reports-Validates-that-show-summary-button-shows-the-summary-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-custom-reports-Validates-that-show-summary-button-shows-the-summary-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-1-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-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/reports.test.js-snapshots/Reports-loads-net-worth-and-cash-flow-reports-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-net-worth-and-cash-flow-reports-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-net-worth-graph-and-checks-visuals-1-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-net-worth-graph-and-checks-visuals-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-net-worth-graph-and-checks-visuals-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/rules.test.js-snapshots/Rules-checks-the-page-visuals-1-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/rules.test.js-snapshots/Rules-checks-the-page-visuals-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/rules.test.js-snapshots/Rules-checks-the-page-visuals-3-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-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-2-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-3-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/schedules.test.js-snapshots/Schedules-checks-the-page-visuals-1-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-checks-the-page-visuals-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-checks-the-page-visuals-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-1-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-10-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-11-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-12-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-4-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-5-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-6-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-7-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-8-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/schedules.test.js-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-9-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/settings.test.js-snapshots/Settings-checks-the-page-visuals-1-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/settings.test.js-snapshots/Settings-checks-the-page-visuals-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/settings.test.js-snapshots/Settings-checks-the-page-visuals-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
📒 Files selected for processing (4)
  • packages/desktop-client/e2e/page-models/navigation.js (1 hunks)
  • packages/desktop-client/src/components/sidebar/PrimaryButtons.tsx (1 hunks)
  • packages/desktop-client/src/components/sidebar/Sidebar.tsx (2 hunks)
  • packages/loot-core/src/types/prefs.d.ts (1 hunks)
🧰 Additional context used
📓 Learnings (1)
packages/desktop-client/e2e/page-models/navigation.js (2)
Learnt from: tlesicka
PR: actualbudget/actual#3457
File: packages/desktop-client/e2e/page-models/navigation.js:50-50
Timestamp: 2024-09-25T22:11:14.624Z
Learning: In the e2e tests, the budget name is 'Test Budget', so when navigating to the 'Settings' page, references to the 'More' menu are now replaced with 'Test Budget' to reflect the new placement of the 'Settings' option under the budget name dropdown.
Learnt from: tlesicka
PR: actualbudget/actual#3457
File: packages/desktop-client/e2e/page-models/navigation.js:50-50
Timestamp: 2024-10-08T15:46:15.739Z
Learning: In the e2e tests, the budget name is 'Test Budget', so when navigating to the 'Settings' page, references to the 'More' menu are now replaced with 'Test Budget' to reflect the new placement of the 'Settings' option under the budget name dropdown.
🔇 Additional comments (4)
packages/desktop-client/e2e/page-models/navigation.js (1)

46-50: Changes align well with PR objectives and improve test accuracy.

The modifications to the goToSettingsPage method are well-implemented and consistent with the PR objectives:

  1. Changing settingsLink to a 'button' role (line 46) reflects the removal of the "Settings" button from the expanding buttons section.
  2. Updating the comment (line 48) to be more generic improves code clarity.
  3. Changing the button name from 'More' to 'Test Budget' (line 50) accurately represents the new UI structure in e2e tests.

These changes maintain the existing logic while adapting to the new UI layout, ensuring backwards compatibility and improving test accuracy.

packages/desktop-client/src/components/sidebar/Sidebar.tsx (2)

16-23: LGTM: New icon imports added correctly.

The new icon imports have been added consistently with the existing import style. These icons are likely used in the updated PrimaryButtons component, which aligns with the PR objectives of modifying the sidebar's expanding "More" section.


Line range hint 1-290: Overall changes align well with PR objectives.

The modifications to the Sidebar component successfully implement the intended changes outlined in the PR objectives:

  1. The expanding "More" section has been updated to ensure all buttons remain in a consistent flow.
  2. The "Settings" button has been removed from the PrimaryButtons component, as it's accessible through the budget name drop-down menu.
  3. The new dynamic button configuration in PrimaryButtons allows for more flexible management of sidebar items.

These changes improve the sidebar's functionality and user experience while maintaining the overall structure of the component. The implementation is clean and consistent with the existing codebase.

packages/desktop-client/src/components/sidebar/PrimaryButtons.tsx (1)

71-71: 🛠️ Refactor suggestion

Ensure Accurate Path Matching for Active State

Using location.pathname.startsWith(item.to) may lead to incorrect active states if one route's path is a prefix of another. For example, /settings would match /settings/profile. To ensure the active state is accurate, consider using useMatch from react-router-dom to perform an exact match.

Here's how you can adjust the code:

-import { useLocation } from 'react-router-dom';
+import { useLocation, useMatch } from 'react-router-dom';

 ...

 {buttons.map(item => {
-  const isActive = location.pathname.startsWith(item.to);
+  const match = useMatch({
+    path: item.to,
+    end: false,
+  });
+  const isActive = match !== null;

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 (3)
packages/desktop-client/src/components/sidebar/PrimaryButtons.tsx (3)

30-44: LGTM: Improved component flexibility and state management

The new function signature with props and default values enhances the component's flexibility. The use of refs and the custom hook useLocalPref improves state management and DOM manipulation.

A minor suggestion for improved readability:

Consider destructuring t from useTranslation() in the function parameters for consistency with the other hooks:

-export function PrimaryButtons({
+export function PrimaryButtons({
   collapseSpeed = 0.15,
   buttons,
-}: PrimaryButtonsProps) {
-  const { t } = useTranslation();
+}: PrimaryButtonsProps & { t: ReturnType<typeof useTranslation>['t'] }) {
+  const { t } = useTranslation();

This change would make the t function a required prop, ensuring type safety for translations throughout the component.


46-50: LGTM: Proper height adjustment for animations

The useEffect hook correctly adjusts the height based on the itemsRef's scroll height, allowing for smooth transition animations. This implementation aligns with the past learning about not setting the height to '0px' when collapsed.

For a minor performance optimization, consider memoizing the buttons prop if it's coming from a parent component and doesn't change frequently. This could prevent unnecessary re-renders:

const memoizedButtons = useMemo(() => buttons, [buttons]);

Then use memoizedButtons instead of buttons in your component.


52-85: LGTM: Flexible and reusable button rendering

The dynamic rendering of buttons based on the 'buttons' prop significantly improves the component's flexibility and reusability. The use of refs for managing transitions and the conditional styling for hidable items are implemented correctly.

Consider adding an aria-expanded attribute to improve accessibility:

 <View
   ref={divRef}
   style={{
     overflow: 'hidden',
     transition: 'height ' + collapseSpeed + 's ease-in-out',
   }}
+  aria-expanded={expanded}
 >

This change will help screen readers understand the expanded state of the component.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between e4eb9e3 and 0471661.

⛔ Files ignored due to path filters (1)
  • upcoming-release-notes/3621.md is excluded by !**/*.md
📒 Files selected for processing (1)
  • packages/desktop-client/src/components/sidebar/PrimaryButtons.tsx (1 hunks)
🧰 Additional context used
📓 Learnings (1)
packages/desktop-client/src/components/sidebar/PrimaryButtons.tsx (2)
Learnt from: tlesicka
PR: actualbudget/actual#3621
File: packages/desktop-client/src/components/sidebar/PrimaryButtons.tsx:49-52
Timestamp: 2024-10-10T02:22:54.491Z
Learning: In `PrimaryButtons.tsx`, setting `divRef`'s height to `itemsRef`'s scroll height allows the transition animations to work correctly because `itemsRef` changes size based on the number of items inside. Setting the height to '0px' when collapsed would prevent the buttons from showing.
Learnt from: tlesicka
PR: actualbudget/actual#3621
File: packages/desktop-client/src/components/sidebar/PrimaryButtons.tsx:11-11
Timestamp: 2024-10-10T02:17:31.654Z
Learning: In the codebase, the icons in `icons/v1` are named `SvgCheveronDown` and `SvgCheveronUp` with the spelling "Cheveron", and other components use the icons with this spelling. Therefore, when reviewing code in this codebase, maintain consistency with the existing icon naming, even if the spelling might seem incorrect.
🔇 Additional comments (3)
packages/desktop-client/src/components/sidebar/PrimaryButtons.tsx (3)

1-28: LGTM: Improved type definitions and imports

The new type definitions PrimaryButtonItems and PrimaryButtonsProps enhance type safety and code readability. The additional imports support the refactored component structure.


86-91: LGTM: Proper toggle implementation for expanded state

The SecondaryItem is correctly implemented to toggle the expanded state. The use of conditional icons and translated text for "Less" and "More" is appropriate and supports internationalization.


1-93: Overall: Excellent refactoring with improved flexibility and type safety

The changes to the PrimaryButtons component significantly enhance its flexibility, reusability, and type safety. The introduction of prop types, dynamic button rendering, and improved state management are all positive improvements. The minor suggestions provided for readability, performance, and accessibility can further refine this already well-implemented component.

Great job on this refactoring!

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 (5)
packages/desktop-client/src/components/sidebar/PrimaryButtons.tsx (3)

30-39: LGTM! Component setup looks good with a minor suggestion.

The new props structure and use of hooks enhance the component's flexibility and state management. The useLocalPref hook is a nice touch for persisting the expanded state locally.

Consider destructuring the t function from useTranslation in the function signature for consistency:

-export function PrimaryButtons({
+export function PrimaryButtons({
   collapseSpeed = 0.15,
   buttons,
-}: PrimaryButtonsProps) {
-  const { t } = useTranslation();
+}: PrimaryButtonsProps) {
+  const { t } = useTranslation();

42-50: LGTM! Toggle function and useEffect look good with a minor optimization suggestion.

The toggle function and useEffect hook are implemented correctly. The height adjustment based on itemsRef.scrollHeight allows for proper transition animations, as explained in the past comment.

Consider optimizing the useEffect hook by memoizing the location.pathname or using a more specific dependency:

-  useEffect(() => {
+  const currentPath = location.pathname;
+  useEffect(() => {
     if (divRef?.current && itemsRef?.current) {
       divRef.current.style.height = itemsRef.current.scrollHeight + 'px';
     }
-  }, [expanded, location.pathname]);
+  }, [expanded, currentPath]);

This change can help prevent unnecessary re-renders if other properties of the location object change.


52-85: LGTM! Rendering logic looks great with a minor accessibility suggestion.

The updated component structure with refs for animation and dynamic button rendering enhances flexibility and performance. The conditional styling for hiding buttons when collapsed is implemented correctly.

Consider adding an aria-label to the outer View component for better accessibility:

-    <View style={{ padding: '5px 0', flexShrink: 0 }}>
+    <View style={{ padding: '5px 0', flexShrink: 0 }} aria-label={t('Primary navigation buttons')}>

This change will provide more context for screen readers about the purpose of this section.

packages/desktop-client/src/components/sidebar/Sidebar.tsx (2)

82-88: LGTM: Well-structured primaryButtonConfigs array.

The primaryButtonConfigs array is well-organized and aligns with the PR objectives. The use of the translation function for titles supports internationalization, and the 'hidable' property allows for flexible UI management.

Consider extracting this configuration to a separate file if it grows larger in the future, to maintain the cleanliness of the Sidebar component.


160-162: LGTM: Updated PrimaryButtons component with dynamic configuration.

The PrimaryButtons component now accepts a buttons prop, which is populated with the primaryButtonConfigs array. This change implements a more flexible and dynamic sidebar button management system, consistent with the PR objectives.

To address the lint warning, consider updating the formatting as follows:

-          <PrimaryButtons
-            buttons={primaryButtonConfigs}
-          />
+          <PrimaryButtons buttons={primaryButtonConfigs} />

This change will improve code consistency and satisfy the linter.

🧰 Tools
🪛 GitHub Check: lint

[warning] 160-160:
Replace ⏎············buttons={primaryButtonConfigs}⏎········· with ·buttons={primaryButtonConfigs}

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 0471661 and 826a0e7.

⛔ Files ignored due to path filters (4)
  • packages/desktop-client/e2e/accounts.test.js-snapshots/Accounts-closes-an-account-6-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/budget.test.js-snapshots/Budget-renders-the-summary-information-available-funds-overspent-budgeted-and-for-next-month-1-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/budget.test.js-snapshots/Budget-renders-the-summary-information-available-funds-overspent-budgeted-and-for-next-month-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/budget.test.js-snapshots/Budget-renders-the-summary-information-available-funds-overspent-budgeted-and-for-next-month-3-chromium-linux.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • packages/desktop-client/src/components/sidebar/PrimaryButtons.tsx (1 hunks)
  • packages/desktop-client/src/components/sidebar/Sidebar.tsx (3 hunks)
🧰 Additional context used
📓 Learnings (1)
packages/desktop-client/src/components/sidebar/PrimaryButtons.tsx (2)
Learnt from: tlesicka
PR: actualbudget/actual#3621
File: packages/desktop-client/src/components/sidebar/PrimaryButtons.tsx:49-52
Timestamp: 2024-10-10T02:22:54.491Z
Learning: In `PrimaryButtons.tsx`, setting `divRef`'s height to `itemsRef`'s scroll height allows the transition animations to work correctly because `itemsRef` changes size based on the number of items inside. Setting the height to '0px' when collapsed would prevent the buttons from showing.
Learnt from: tlesicka
PR: actualbudget/actual#3621
File: packages/desktop-client/src/components/sidebar/PrimaryButtons.tsx:11-11
Timestamp: 2024-10-10T02:17:31.654Z
Learning: In the codebase, the icons in `icons/v1` are named `SvgCheveronDown` and `SvgCheveronUp` with the spelling "Cheveron", and other components use the icons with this spelling. Therefore, when reviewing code in this codebase, maintain consistency with the existing icon naming, even if the spelling might seem incorrect.
🪛 GitHub Check: lint
packages/desktop-client/src/components/sidebar/Sidebar.tsx

[warning] 160-160:
Replace ⏎············buttons={primaryButtonConfigs}⏎········· with ·buttons={primaryButtonConfigs}

🔇 Additional comments (4)
packages/desktop-client/src/components/sidebar/PrimaryButtons.tsx (2)

1-28: LGTM! Type definitions and imports look good.

The new type definitions PrimaryButtonItems and PrimaryButtonsProps enhance type safety and component flexibility. The Icon type has been correctly simplified as suggested in a past comment. The "Cheveron" spelling in the icon imports is intentional and consistent with the existing codebase.


86-91: LGTM! SecondaryItem implementation looks good.

The SecondaryItem for toggling the expanded state is implemented correctly. The use of the t() function for internationalization is a good practice. The "Cheveron" spelling in the icon components is intentional and consistent with the existing codebase.

packages/desktop-client/src/components/sidebar/Sidebar.tsx (2)

16-23: LGTM: New icon imports for updated sidebar.

The new icon imports are consistent with the PR objectives and correspond to the new buttons being added to the sidebar. This change enhances the visual representation of the navigation options.


Line range hint 1-280: Summary: Sidebar updates successfully implement new navigation structure.

The changes to the Sidebar component effectively implement the new navigation structure as outlined in the PR objectives. The code is well-organized, with clear separation of concerns between configuration and rendering. The use of internationalization and the 'hidable' property for buttons adds flexibility to the UI.

A few minor suggestions were made to further improve code quality:

  1. Consider extracting the primaryButtonConfigs to a separate file if it grows larger.
  2. Adjust the formatting of the PrimaryButtons component usage to satisfy the linter.

Overall, this implementation successfully enhances the sidebar functionality while maintaining code quality and consistency.

@tlesicka tlesicka changed the title [WIP] Update Sidebar - Expanding Button Section Update Sidebar - Expanding Button Section Oct 10, 2024
@Jonathan-Fang
Copy link
Contributor

Jonathan-Fang commented Oct 13, 2024

Having the Payees and Rules be in the More accordion looks good to me!

See my idea below for having a place for Settings to live because settings living as a dropdown underneath the budget name does seem odd to me.


Perhaps the below idea should be in another PR, as it could be considered an extension of scope.
@jfdoming 's #3648 gave me an idea for organizing the sidebar.

Although it's currently set to the top right, I proposed two ideas.

  1. Place the help button above the add account button, having tiny buttons for settings and help in the sidebar below the accounts
    unified help experience
    Please excuse my MS Paint 😅

So in order it would be

  • Accounts
  • then smaller font, settings, help
  • then the add account button.
  1. Either placing the help button under the More dropdown, along with Settings in the smaller font.
    In my opinion, settings can be grouped separately away from rules and payees.
    If rules and payees remain in the More accordion, then Settings and Help can be above the add account button.

Thoughts?

@youngcw youngcw added this to the v24.12.0 milestone Oct 24, 2024
@MatissJanis
Copy link
Member

👋 I don't quite understand why we would need to change this part of the UI? Personally the new proposal here seems a lot less polished than what we currently have in edge.

@tlesicka
Copy link
Contributor Author

Personally, I don't think there should be a "More" section on the sidebar. In both this PR and edge the "More" section disrupts the simple flow of the app. IMO, the items in the More section should be moved to the menu and the More section should be removed.
However, other people (as discussed in #3414) like having Payees and Rules in the More section. I see this as a potential future problem. As more things get added to AB, this More section is going to expand until it is too cluttered.
What should be placed in the More section vs what should be placed in the menu?
On edge, Settings is duplicated in both the menu and the More section. This should only be in one place. My thought is that it should be removed from the More section and left in the menu, as in this PR. Or placed as just a settings cog icon with a hover text, like the new help menu.
The other part that I'm working on (multi-currency) will require a page for Exchange Rates. I believe this as well as Payees and Rules should go under the menu, not under More. Is Exchange Rates less important than Rules or Payees? IMO, no, they are all the same. Are these three less important than Budget and Reports? Yes, so I agree that Budgets and Reports should always be visible. So, with the current layout, Exchange Rates would be added to the sidebar, which will add clutter. This is why I would prefer to remove the More section completely. (But, ultimately, where we put the Exchange Rates page is a discussion for another time. I'm just using it as an example.)

IMO the current More section disrupts the look and flow of the sidebar. While I agree that Payees, Rules, and Settings are not as important as Budget and Reports, I don't believe that they should be a smaller button size. That is why this PR uses the sliding/expanding More section to reveal more items. I am not suggesting this next part, but mentioning it as an example. If Reports was to be an expanding section, then yes, whatever is underneath Reports should be a smaller button style. But, Payees, Rules, and Settings are not underneath any other section, so IMO they should not be smaller than the rest.

I don't understand what you mean by this PR is less polished than edge.

On edge during a page refresh, the expanding More section acts different based on what is active. If Budget, Reports, or Schedules is active and More is expanded, during a page refresh the More section collapses. If Rules, Payees, or Settings is active and More is collapsed, then More expands on the page refresh.
In this PR, the state stays the same across page refresh. If More is expanded it stays expanded during refresh and if it is collapsed it stays collapsed.
On edge when Payees, Rules, or Settings is active and the More section is closed then More gets highlighted to show that something is active inside the More section. In this PR, that page button stays active and stays on the top level.

From a code level, currently, the Primary Buttons/expanding section are hardcoded into the PrimaryButtons component. For cleaner code and better maintainability, it would be better to have the PrimaryButtons component read a list of buttons that is given to it from the main Sidebar component. I know that the previous PR that I presented and that was merged separated the PrimaryButtons into it's own component and that was intentional. Yes, PrimaryButtons should be it's own component, but the actual content should be managed from the main Sidebar. This is the way that SecondaryButtons was merged. The main menu content should also be separated from the BudgetName component even though it is displayed on the BudgetName component (but, that's for a different PR). This allows easy maintainability by having menu items, primary buttons, and secondary buttons created as lists in the Sidebar component, while the actual code to display those items is generated from the individual components (ie modular design).

I understand that there are many people who have worked on this project in the past and all have strong opinions, which is not necessarily a bad thing. I highly appreciate and respect all of you for bringing AB to the place that it is. However, it still has a bit of a rugged and unfinished look to it. I think there are quite a few people moving from other software that are used to a more finished look and feel. I know that I am one of those people and while I don't want to clone those other apps, I think that seeing what works for other software is a good way to make this app better. Neither YNAB4 nor nYNAB use an expanding more section, and both have a better menu system.
So I would suggest changing this PR to remove the More section and incorporate those items into the menu.

@Jonathan-Fang
Copy link
Contributor

I agree with @tlesicka 's notes on wanting to get AB a more polished UI, and I think the "ruggedness" is more like the current misalignment of the More toggle and everything below it, it doesn't line up with the rest of the items in the sidebar.

A big question here is where to put Payees, Rules, and a pending Exchange Rates button. At this point I may even suggest adding them at the bottom of the sidebar in a slightly smaller font because they're only three buttons. And the top part of the sidebar can be the more prominent Budget, Reports, and Schedules, with a menu to rename the budget or even prepare for multi-user.

Another idea is to put the Payees, Rules, and the pending Exchange Rates button inside the menu dropdown when you click the Budget Name, and then everything is in one place. The proposed PR to create the react command bar would make accessibility quite easy, but even for click-only users, knowing that there's a smooth workflow to navigating the software is key to make Actual Budget appeal to everyone, not just developers.

@tlesicka
Copy link
Contributor Author

While this is well beyond the scope of this PR, here's an idea for a way to clean up the side bar and prepare for possible future additions.

top bar idea

Not all elements would be active when the topbar is new, but the idea is to have a plan in place to where future things will go. The center input box where Cmd-K will eventually live would not be visible until that feature is built. The budget name there was just to add initial text. I don't care if it's the budget name or "search" or whatever wording, that will be for whoever builds that component.

This would remove the menu dropdown from the budget name. (Some people have mentioned that it is odd to have the budget name as a dropdown menu.)
The File menu would have import/export, backup, close file, settings, etc. Possibly place Payees, Rules, Exchange Rates there too.
The Edit menu would have your standard undo/redo or possibly place Payees, Rules, Exchange Rates here.
Actual Logo would be a link to actualbudget.org

Again, this is just a quick thrown together idea, highly based off of VS Code and will need a lot of tweaks to get the visuals to look great. But, I think it would be good to have a plan of where the design is going instead of just putting the pieces together as someone develops a piece.

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.

4 participants