-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Dim categories hidden by their groups #2582
Conversation
✅ Deploy Preview for actualbudget ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Bundle Stats — desktop-clientHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger
Smaller No assets were smaller Unchanged
|
Bundle Stats — loot-coreHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset No files were changed View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller No assets were smaller Unchanged
|
@@ -35,6 +39,7 @@ type ExpenseCategoryProps = { | |||
|
|||
export function ExpenseCategory({ | |||
cat, | |||
catGroup, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest accepting an isHidden prop instead. Same with the sidebar category.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually had it that way originally and decided to go this route instead. That other way, the logic winds up having to be the same 'above' anywhere that uses that component. It seemed to make more sense to keep it 'low' to avoid possible duplication.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, actually there was another problem with it. There is one place where we need to know if the category group itself is hidden, and that is regardless of the current category being hidden or not. This was to hide the 'hide/show' menu items. So for that, you need to know two hidden statuses.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Putting this back as WIP while I figure out the mobile view. |
Ok, I think I figured out the mobile views, so it should behave similarly. |
packages/desktop-client/src/components/budget/SidebarCategory.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
packages/desktop-client/src/components/modals/CategoryMenuModal.tsx
Outdated
Show resolved
Hide resolved
packages/desktop-client/src/components/budget/BudgetCategories.jsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Closes #2578.
This dims the categories if the parent group is hidden. It also does not show the 'hide'/'show' menu items if the category is hidden (as that would not actually change their hidden status anyway).