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 UI #3457

Closed
wants to merge 68 commits into from
Closed

Update Sidebar UI #3457

wants to merge 68 commits into from

Conversation

tlesicka
Copy link
Contributor


category: Features
authors: [tlesicka]

Updating Sidebar.
Added collapsible Budget and Off Budget account groups. Removed "Settings" from the "> More" expandible section. Cleaned up "> More" to an up/down chevron. Removed "Rename budget" from menu and added pencil icon next to budget name. Changed scrollable area to just accounts. Action Buttons and All accounts do not scroll.

Moved "More->Payees" and "More->Rules" into menu
Rearranged Menu Items
Anchored Budget, Reports, and Schedule above account list.
Anchored Add Account below account list
Now, only accounts scroll, everything else is in a fixed position.
Removed the word "More" and changed the layout of the extra features (scheduled, payees, rules)
Updated layout and file structure
Removed Edit Budget Name from menu and placed pencil Icon next to budget name.  Todo: Hide edit budget name icon when not hovering over budget name.
Moved code from Tools into ActionButtons.  Both ActionButtons and BottomButtons now use an array to map buttons.  To Do: Move array of buttons to sidebar.
ActionButtons and BottomButtons are now empty and reusable containers.
For budget and Off Budget account groups can expand and contract. Moved "All accounts" outside of scrollable area.
For Budget and Off Budget account groups can now collapse
Removed code that was commented out.
Added key prop to ActionItems and BottomsButtoms to remove console warning.
Fixed new budget creation error in collapsible account groups.
@actual-github-bot actual-github-bot bot changed the title Update Sidebar UI [WIP] Update Sidebar UI Sep 17, 2024
Copy link

netlify bot commented Sep 17, 2024

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit 2488c82
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/66fef838a7c973000860ae7d
😎 Deploy Preview https://deploy-preview-3457.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 Sep 17, 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.29 MB → 5.3 MB (+3.48 kB) +0.06%
Changeset
File Δ Size
src/components/sidebar/AccountGroupName.tsx 🆕 +3.46 kB 0 B → 3.46 kB
src/components/sidebar/AccountGroup.tsx 🆕 +1.69 kB 0 B → 1.69 kB
src/components/sidebar/ActionButtons.tsx 🆕 +1.59 kB 0 B → 1.59 kB
src/components/sidebar/BottomButtons.tsx 🆕 +351 B 0 B → 351 B
src/components/sidebar/Sidebar.tsx 📈 +158 B (+2.16%) 7.13 kB → 7.28 kB
src/components/sidebar/SecondaryItem.tsx 📉 -6 B (-0.46%) 1.28 kB → 1.27 kB
src/components/sidebar/Account.tsx 📉 -403 B (-8.32%) 4.73 kB → 4.33 kB
src/components/sidebar/Accounts.tsx 📉 -1.8 kB (-48.60%) 3.71 kB → 1.91 kB
src/components/sidebar/Tools.tsx 🔥 -1.54 kB (-100%) 1.54 kB → 0 B
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
static/js/index.js 3.32 MB → 3.32 MB (+3.8 kB) +0.11%
static/js/narrow.js 81.98 kB → 82.37 kB (+404 B) +0.48%

Smaller

Asset File Size % Changed
static/js/wide.js 225.26 kB → 224.55 kB (-727 B) -0.32%

Unchanged

Asset File Size % Changed
static/js/AppliedFilters.js 20.96 kB 0%
static/js/usePreviewTransactions.js 1.64 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.5 kB 0%
static/js/BackgroundImage.js 122.29 kB 0%
static/js/ReportRouter.js 1.5 MB 0%

Copy link
Contributor

github-actions bot commented Sep 17, 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.19 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.19 MB 0%

Added Release Notes MD file
@tlesicka
Copy link
Contributor Author

Started this PR in response to request from comment on #3414. Added Release Notes, but it is not showing in the checks.
This updated sidebar will look like this:
93qj4m

@tlesicka tlesicka mentioned this pull request Sep 17, 2024
2 tasks
Copy link
Contributor

coderabbitai bot commented Sep 17, 2024

Walkthrough

The changes in this pull request involve the introduction of the AccountGroupName and ActionButtons components, which enhance the sidebar interface by providing structured representations of account groups and action buttons. The Sidebar component has been restructured to incorporate these new components, improving navigation and user interaction. Additionally, new icons have been integrated, and styling adjustments have been made to enhance the overall user interface.

Changes

Files Change Summary
.../sidebar/AccountGroupName.tsx Introduced AccountGroupName component to render account group names with visual status indicators and expandable functionality.
.../sidebar/ActionButtons.tsx Added ActionButtons component to display a list of action buttons with icons, supporting conditional visibility based on the expanded state.
.../sidebar/Sidebar.tsx Updated Sidebar component to include new ActionButtons and BottomButtons, enhancing organization and navigation. Removed previous props for adding accounts in the Accounts component.
.../sidebar/EditableBudgetName.tsx Modified to include a new button for editing the account name with the SvgPencil1 icon.
.../icons/SvgStoreFront.tsx, .../icons/SvgTuning.tsx, .../icons/SvgAdd.tsx, .../icons/SvgPencil1.tsx Added new icons for use in the sidebar, improving visual representation of actions.

Possibly related PRs

  • Fix mobile page header buttons  #3491: The changes in the MobilePageHeader component may relate to the overall sidebar functionality and user interface improvements, as both involve enhancing user interactions within the mobile application.

Suggested labels

:sparkles: Merged


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 (6)
upcoming-release-notes/3457.md (1)

6-11: The release notes content looks good!

The body section provides a clear and concise overview of the key changes made to the sidebar UI. It aligns well with the PR objectives and effectively communicates the enhancements to the user experience.

Consider making the following minor grammatical improvements based on the static analysis hints:

  • Line 10: Add "the" before "menu" and "a" before "pencil icon".
  • Line 11: Add "the" before "scrollable area".

Here's a suggested diff:

-Removed "Rename budget" from menu and added pencil icon next to budget name.
+Removed "Rename budget" from the menu and added a pencil icon next to the budget name.
-Changed scrollable area to just accounts. Action Buttons and All accounts do not scroll.
+Changed the scrollable area to just accounts. Action Buttons and All accounts do not scroll.

These changes are not critical but can help improve the overall readability and grammatical correctness of the release notes.

Tools
LanguageTool

[uncategorized] ~10-~10: You might be missing the article “the” here.
Context: ...al estate. Removed "Rename budget" from menu and added pencil icon next to budget na...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[uncategorized] ~10-~10: You might be missing the article “a” here.
Context: ...ved "Rename budget" from menu and added pencil icon next to budget name. Changed scrol...

(AI_EN_LECTOR_MISSING_DETERMINER_A)


[uncategorized] ~10-~10: You might be missing the article “the” here.
Context: ...from menu and added pencil icon next to budget name. Changed scrollable area to just a...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

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

29-35: Consider extracting inline styles to a separate stylesheet.

The inline styles for the View component could be extracted to a separate stylesheet. This would improve the maintainability and readability of the component.

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

40-47: JSX structure and conditional rendering look good!

The JSX is correctly structured, and the conditional rendering of Item components based on hidable and isOpen is properly implemented.

Consider extracting the inline style on the View component into a separate style object for better readability and maintainability. For example:

+ const styles = {
+   container: {
+     padding: '10px 0',
+     flexShrink: 0,
+   },
+ };
+
return (
-  <View style={{ padding: '10px 0', flexShrink: 0}}>
+  <View style={styles.container}>
    {/* ... */}
  </View>
);

48-55: SecondaryItem rendering looks good, but reconsider the empty title prop.

The SecondaryItem component is correctly rendered with the appropriate props, and the conditional rendering of the Icon based on the isOpen state is a good practice.

Consider providing a more meaningful label for the title prop instead of an empty string. A descriptive label can improve accessibility and clarity for users. If the functionality is clear without a label, consider using an icon-only button.

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

17-21: Consider improving the type definition for AccountsProps.

The static analysis hints suggest the following improvements:

  1. Avoid using an empty object pattern ({}) for the AccountsProps type. Instead, explicitly define the object shape or use a more specific type.

  2. Avoid using {} as a type as it means "any non-nullable value". Prefer explicitly defining the object shape or using a more specific type.

Here's a suggestion to improve the type definition:

-type AccountsProps = {
-};
+type AccountsProps = Record<string, never>;

This explicitly defines AccountsProps as an object type with no properties.

Tools
Biome

[error] 20-21: Unexpected empty object pattern.

(lint/correctness/noEmptyPattern)


[error] 17-18: Don't use '{}' as a type.

Prefer explicitly define the object shape. '{}' means "any non-nullable value".

(lint/complexity/noBannedTypes)

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

71-77: Consider extracting inline styles for better maintainability.

The inline styles defined in the accountGroupStyle object may make it harder to maintain and reuse styles across components.

Consider extracting the inline styles into a separate styles object or using a CSS-in-JS library for better maintainability and reusability of styles.

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 17fd068 and 3d755bb.

Files selected for processing (10)
  • packages/desktop-client/src/components/sidebar/Account.tsx (0 hunks)
  • packages/desktop-client/src/components/sidebar/AccountGroup.tsx (1 hunks)
  • packages/desktop-client/src/components/sidebar/AccountGroupName.tsx (1 hunks)
  • packages/desktop-client/src/components/sidebar/Accounts.tsx (1 hunks)
  • packages/desktop-client/src/components/sidebar/ActionButtons.tsx (1 hunks)
  • packages/desktop-client/src/components/sidebar/BottomButtons.tsx (1 hunks)
  • packages/desktop-client/src/components/sidebar/Sidebar.tsx (6 hunks)
  • packages/desktop-client/src/components/sidebar/Tools.tsx (0 hunks)
  • packages/loot-core/src/types/prefs.d.ts (1 hunks)
  • upcoming-release-notes/3457.md (1 hunks)
Files not reviewed due to no reviewable changes (2)
  • packages/desktop-client/src/components/sidebar/Account.tsx
  • packages/desktop-client/src/components/sidebar/Tools.tsx
Additional context used
Learnings (1)
packages/loot-core/src/types/prefs.d.ts (1)
Learnt from: MatissJanis
PR: actualbudget/actual#3458
File: packages/loot-core/src/client/state-types/prefs.d.ts:5-5
Timestamp: 2024-09-17T20:04:47.663Z
Learning: In future reviews, ensure that changes related to `PrefsState` in `prefs.d.ts` do not incorrectly assume necessary updates in other parts of the codebase. Verify the impact thoroughly before making suggestions.
LanguageTool
upcoming-release-notes/3457.md

[uncategorized] ~10-~10: You might be missing the article “the” here.
Context: ...al estate. Removed "Rename budget" from menu and added pencil icon next to budget na...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[uncategorized] ~10-~10: You might be missing the article “a” here.
Context: ...ved "Rename budget" from menu and added pencil icon next to budget name. Changed scrol...

(AI_EN_LECTOR_MISSING_DETERMINER_A)


[uncategorized] ~10-~10: You might be missing the article “the” here.
Context: ...from menu and added pencil icon next to budget name. Changed scrollable area to just a...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

Biome
packages/loot-core/src/types/prefs.d.ts

[error] 62-62: Don't use 'Object' as a type.

Prefer explicitly define the object shape. This type means "any non-nullable value", which is slightly better than 'unknown', but it's still a broad type.

(lint/complexity/noBannedTypes)

packages/desktop-client/src/components/sidebar/Accounts.tsx

[error] 20-21: Unexpected empty object pattern.

(lint/correctness/noEmptyPattern)


[error] 17-18: Don't use '{}' as a type.

Prefer explicitly define the object shape. '{}' means "any non-nullable value".

(lint/complexity/noBannedTypes)

packages/desktop-client/src/components/sidebar/AccountGroup.tsx

[error] 55-55: Do not access Object.prototype method 'hasOwnProperty' from target object.

It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.

(lint/suspicious/noPrototypeBuiltins)


[error] 86-86: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 96-96: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 97-97: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

GitHub Check: lint
packages/loot-core/src/types/prefs.d.ts

[failure] 62-62:
Prefer using the primitive object as a type name, rather than the upper-cased Object

Additional comments not posted (19)
upcoming-release-notes/3457.md (1)

1-4: LGTM!

The header section is well-structured and contains appropriate metadata for the release notes.

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

23-41: LGTM!

The BottomButtons component implementation looks good. It correctly renders the buttons based on the provided buttons prop and uses the SecondaryItem component for each button.

packages/desktop-client/src/components/sidebar/ActionButtons.tsx (3)

1-19: LGTM!

The import statements are correctly defined and necessary for the component.


20-31: Great job defining the TypeScript types!

The ActionButtonItems and ActionButtonsProps types provide a clear contract for the component's props and allow for flexibility in the Icon property.


33-39: Excellent use of React hooks!

The component correctly uses the useTranslation, useState, and useCallback hooks to manage internationalization, state, and memoization.

packages/loot-core/src/types/prefs.d.ts (1)

62-62: Use a more specific type or the primitive object instead of Object.

The static analysis hints correctly flag the usage of Object as a type. Using a broad type like Object may lead to type-related issues and make the code harder to understand and maintain.

Consider defining a more specific type that represents the structure of the 'ui.collapsedAccountGroups' object or use the primitive object instead.

-'ui.collapsedAccountGroups': Object;
+'ui.collapsedAccountGroups': Record<string, boolean>;

Also, verify the impact of this change on other parts of the codebase that rely on the LocalPrefs type and ensure necessary updates are made.

Tools
Biome

[error] 62-62: Don't use 'Object' as a type.

Prefer explicitly define the object shape. This type means "any non-nullable value", which is slightly better than 'unknown', but it's still a broad type.

(lint/complexity/noBannedTypes)

GitHub Check: lint

[failure] 62-62:
Prefer using the primitive object as a type name, rather than the upper-cased Object

packages/desktop-client/src/components/sidebar/Accounts.tsx (6)

2-4: LGTM!

The imports are correctly used and necessary for the component.


7-7: LGTM!

The import is correctly used and necessary for the onReorder function.


14-15: LGTM!

The imports are correctly used and necessary for the refactored component structure.


23-24: LGTM!

The useDispatch and useAccounts hooks are correctly used and necessary for the component.


29-40: LGTM!

The refactored onReorder function is more streamlined and correctly dispatches the moveAccount action.


45-80: LGTM!

The refactored structure using the AccountGroup and AccountGroupName components improves readability and maintainability. The conditional rendering of account groups ensures that only non-empty groups are displayed.

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

1-145: LGTM!

The AccountGroupName component is well-structured, follows best practices, and enhances the sidebar functionality with its clear and interactive design. The use of TypeScript for prop types ensures type safety, and the modular design promotes maintainability and reusability.

The component's layout is nicely structured using nested View components, allowing for flexible styling and alignment. The conditional rendering of the SvgExpandArrow icon based on the presence of the toggleAccounts function is a good approach. The link styling reflects the account group's status effectively, with dynamic styles applied based on the updated, pending, and failed states.

The AlignedText component is used appropriately to display the group name alongside a potential financial value derived from the query prop.

Overall, the component improves the user experience with its visual cues and responsive design. Great job!

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

21-31: LGTM!

The new icon imports look good and are likely used in the updated sidebar UI.


43-45: LGTM!

The new component imports look good and are likely used to organize the sidebar buttons.


149-161: LGTM!

The styling changes to the sidebar header look good and are likely made to improve the UI and UX.


173-181: LGTM!

Using a separate ActionButtons component to render the navigation buttons is a good way to keep the Sidebar component clean and organized. The button data is passed as a prop, which makes it easy to modify the buttons if needed.


185-189: LGTM!

Using a separate BottomButtons component to render the "Add account" button is a good way to keep the Sidebar component clean and organized. The button data is passed as a prop, which makes it easy to modify the buttons if needed.


Line range hint 225-296: LGTM!

The changes to the EditableBudgetName component look good:

  • Removing the "Rename budget" option from the menu and replacing it with a pencil icon is a good way to simplify the UI and make the editing functionality more discoverable.
  • The new button uses the SvgPencil1 icon and is styled to be visible only on hover, which is a nice touch.

@Teprifer
Copy link

Thanks for putting this up, I've spotted a few minor things:

  • Budget name icon positioning
    Mouse not on side bar:
    image
    Mouse in side bar:
    image
    Mouse over budget name:
    image

Notice how the drop down arrow moves to the left and is replaced by the edit name pencil when the mouse is over the budget name? This means a user could be aiming to click the drop down, but when the mouse gets there, it's no longer the drop down menu in that position and this will create a negative experience.
Could be a case of switching the pencil to the left side of the drop down icon, or move it to a menu item again, either/or.

  • Top section:
  1. There's extra vertical space between budget name and menu items
  2. Menu items is showing less than before (schedules is hidden) - could add schedules back in by consuming the extra space above. This is mostly about keeping it consistent with the current behaviour and keeping them readily discoverable.
  3. The more items has different show/hide behaviour,
    • In Edge if you're viewing one of the pages under More, when reloading the page the more menu stays expanded and collapses if a non-more item is being viewed.
    • In this PR the more menu is always collapsed after a page reload
    • Could remain with the current Edge approach, or remember expanded or collapsed state regardless of page viewed.
  • Misc other thoughts...
    • de-prioritize closed accounts (less font weight/smaller size/other)
    • Adding 'more' back in and replace with 'less' when expanded, small font size so it doesn't take up more vertical than is already assigned for the toggle.
    • Bump 'all accounts' up a step font size to give it prominence over the below

Would also be good to get other opinions. :)

@Jonathan-Fang
Copy link
Contributor

Jonathan-Fang commented Sep 18, 2024

What I like:

  • collapsible Budget and Off Budget account groups. Removed "Settings" from the "> More" expandible section.
  • Removed "Rename budget" from menu and added pencil icon next to budget name. It's consistent with renaming accounts.

What I don't like:
image
image

As @Teprifer mentions, please re-add the More and Less as indicated, the chevron is kinda just lonely hanging out by itself.

image
A minor thing, would be great to minimize the whitespace here a little bit, it's just a little bit too big.

I agree with @Teprifer 's points on de-prioritizing closed accounts with less font-weight and make "all accounts" with more font-weight to give it a little bit more prominence over the accounts below.

Great work! An improvement I didn't know I needed but now that I see it, I can't unsee it.

@tlesicka
Copy link
Contributor Author

  • The "Closed" section should probably stay hidden until there are actually closed accounts

Updated. Now, if any account group is empty, it will not be shown.

  • The size of "More"/"Less" is now smaller than the rest of the menu items, which causes strange-looking jumping when the item is expanded. The "Less" item also jumps to the bottom, which is confusing if you don't know to look there. My preference would be that the "More"/"Less" item stays in the same location, and has the same size as the other elements for visual consistency.

I think we'll disagree on this one. I think keeping More in the middle disrupts the flow of the design. I was trying for an accordion style where clicking the more expands to show more items. If More stays in the middle, why not move those items to a menu for access? Now, with more expanded, all action items are in the same location. More itself is not an action item, so should not be the same size as the rest of the action items.

Does anyone else have any thoughts on the More/Less function?

  • The text in account sidebar items appears to be selectable now, which was not the case previously. Mind fixing that?

Fixed. Previously, the text in the buttons could be selected. Now, no text on the sidebar can be selected. Everything acts as a button.

  • Something about the chevrons on the side is odd to me, both visually (different chevron than "More", alignment seems off) and UX-wise (clicking on account groups now feels like it should expand them, but it doesn't). On the latter, normally with Accordion components, clicking the "main" part of the component expands/collapses it. I think getting this right will be tricky and probably requires some design work. In the interest of making this PR easier to merge, my thinking is to revert the chevron behaviour for now and keep account groups always-expanded (as they currently are).

Now that I look closely at the chevrons, yes, the alignment is off and I'll work on adjusting the margin/padding. I agree that the account groups should act as accordion components. If everyone agrees with removing the links from For budget/Off budget and making them more like accordion components, I will do that. This change would make it where aligning the chevrons will be easier and I believe this would be a good change for Custom Account Groups too. Personally, I would like the ability to expand/collapse account groups as I have around 15 For budget and another 15 Off budget accounts. Plus I don't look at For budget/Off budget transactions as a group, if I need to I'll use All accounts. Not sure how many people find this {current} feature useful vs losing this feature for expandable/collapsible account groups.

Can I get more feedback on whether to remove the links to For budget/Off budget and make the account groups act as accordion components?

@Teprifer
Copy link

more/less
I like the general idea of when showing more, the menu items are un-interupted. I always felt it weird having more in the middle.

Can I get more feedback on whether to remove the links to For budget/Off budget and make the account groups act as accordion components?

I'm not so sure about outright removing functionality, however, maybe (depending on feedback from others) it could be an option to move it elsewhere. Maybe a hover on for/off budget to have a -> widget to click instead? Dunno, just spit balling.

But I think that's stepping outside this PR a bit? Since that'd have to be discussed a bit about how that'd best work.

@Jonathan-Fang
Copy link
Contributor

More/less function

  • I'm fine with the way it is right now with the jumping. It's a bit abrupt but not sure what else other than like a quick animation where "more" is being pushed to the bottom and then becomes "less."
  • Another idea is you could put More to the top, above Budget and below Test Budget. Then it wouldn't jump. That would be more accordion-style.
    image

Chevrons @tlesicka and @jfdoming

  • I disagree with removing the links from "for budget" and "off budget" as I am a user who utilizes these links.
  • About making the account groups act as accordion components, right now the account groups are basically toggles; they work exactly the same as they would in an application like Notion. You click the toggle (chevron), and it expands by pointing downward. You click the toggle again, it goes back up, which collapses everything. If you want to make a UI change and make it like a darker background to make it look like a background was clicked, and the alignment can be exactly in the same place, I think it'd look better but it's not breaking the essentials of what this feature does.
    image
    image
    image

@tlesicka
Copy link
Contributor Author

Thank you @Jonathan-Fang

  • I disagree with removing the links from "for budget" and "off budget" as I am a user who utilizes these links.

I am glad to know that people use these links.

If you want to make a UI change and make it like a darker background to make it look like a background was clicked

I tried changing the background when it was clicked/expanded, but didn't really like it. Instead the chevrons now have a hover highlight.

@jfdoming, the Action Buttons now have a sliding transition and isn't jumpy.

@Jonathan-Fang
Copy link
Contributor

@tlesicka I wanted to share that the Chevron hover highlight looks great!

The action button sliding animation looks great! I'm wondering if we should speed it up to match the snappiness of the rest of the application. Most buttons are click and instant change, so if we made it like the animation 2x-3x as fast, then maybe it would fit better.

What does everyone else think about the speed of the animation?

Copy link
Contributor Author

@tlesicka tlesicka left a comment

Choose a reason for hiding this comment

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

Fixed all coderabbitai issues

@MatissJanis
Copy link
Member

👋 Hey! I don't mean to dogpile on this PR, but would you mind splitting up the proposed changes in smaller, more isolated PRs? There are some suggestions that I think are not controversial and would be quickly approved and merged (i.e. the move of "+ add account" to the bottom, budget file edit icon), but others either need more polish, discussion or unfortunately would not be approved entirely. Splitting the proposal up into smaller chunks would allow this to move much more effectively.

@tlesicka
Copy link
Contributor Author

tlesicka commented Oct 4, 2024

👋 Hey! I don't mean to dogpile on this PR, but would you mind splitting up the proposed changes in smaller, more isolated PRs?

Not a problem. Wasn't sure if I should make smaller but more numerous PRs or one PR that contains more changes.
Started another PR (#3554) to split this into multiple PRs. Once PR #3554 is merged, I'll start on another aspect of this update.

There are some suggestions that I think are not controversial and would be quickly approved and merged (i.e. the move of "+ add account" to the bottom, budget file edit icon), but others either need more polish, discussion or unfortunately would not be approved entirely.

@MatissJanis what things would not be approved? Asking so that I don't spend time working on something that won't be approved.

@MatissJanis
Copy link
Member

@MatissJanis what things would not be approved? Asking so that I don't spend time working on something that won't be approved.

These are the changes I noticed here (I might have missed some):

I have ranked them in order according to what I think will receive a lot of good feedback from the community (and thus be merged) to some that would require more fleshing out and/or would likely get a lot of resistance.

  1. moving "+ add account" to the bottom
  2. making the account list scrollable independently
  3. adding edit icon besides budget file name
  4. change of the "more/less" button
  5. chevrons to collapse account groups (IMO good idea, but visual execution will need more polish)
  6. visual hierarchy for account headings & underlines
  7. removal of separator (between accounts and main nav items) in sidenav
  8. removal of "settings" from the side nav
  9. "close budget file" move as the 1st item in the popover

@RubenOlsen
Copy link
Member

I am late to this party, and I have this very basic question: but what exactly are we trying to solve @tlesicka?

The original PR comment does not address this, so please explain this to me.

@tlesicka
Copy link
Contributor Author

tlesicka commented Oct 6, 2024

I am late to this party, and I have this very basic question: but what exactly are we trying to solve @tlesicka?

The original PR comment does not address this, so please explain this to me.

@RubenOlsen
This PR was requested in a comment on issue #3414. As stated in issue #3414:

When a budget has a lot of accounts, the whole sidebar scrolls.

I would suggest only the accounts should scroll and the "Budget", "Reports", and "Schedules" buttons should be fixed at the top. Additionally, the "+ Add Account" button should be fixed at the bottom. This separates the sidebar into four separate areas: Budget Name/Menu, Action Buttons, Account List, Add Account Button.

Settings is doubled in both the menu and the "> More" action button and should be removed from one location.

Remove "Rename budget" from the menu and instead put a pencil icon next to the name like on account view.

As I was working on these things, the scope of the whole PR increased and it was suggested to split this PR into smaller chunks. There are aspects of the side bar that are doubled (settings in two locations), not in line with other aspects of AB (rename budget as menu item instead of pencil icon), or could have a better look/feel when using AB (scrolling and expandable more section). This is what I was trying to solve.

This PR is now unused and will be closed soon in favor of smaller PR's with singular scope (such as #3554).

@MatissJanis
Copy link
Member

Just a very quick note: @tlesicka thank you for all the care and work you've put into this! It is truly APPRECIATED!

As you can see: a lot of us are very opinionated about the side-nav. Which is a good problem to have, but at the same time it can be quite annoying for the person driving the change (I just want to release my change! Stop sending me feedback! AAAhhhhh!!). Please take our feedback comments as positive indicators that people really care about the work you're doing here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants