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

Dim categories hidden by their groups #2582

Merged
merged 9 commits into from
Apr 12, 2024

Conversation

psybers
Copy link
Contributor

@psybers psybers commented Apr 10, 2024

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).

dimmed-cats

@github-actions github-actions bot changed the title Dim categories hidden by their groups [WIP] Dim categories hidden by their groups Apr 10, 2024
Copy link

netlify bot commented Apr 10, 2024

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit 3b43550
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/6619590d4e74f20008de3fd1
😎 Deploy Preview https://deploy-preview-2582.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 Apr 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
10 4.62 MB → 4.62 MB (+502 B) +0.01%
Changeset
File Δ Size
src/components/budget/ExpenseCategory.tsx 📈 +67 B (+3.58%) 1.83 kB → 1.89 kB
src/components/modals/CategoryMenuModal.tsx 📈 +103 B (+2.06%) 4.89 kB → 4.99 kB
src/components/budget/SidebarCategory.tsx 📈 +66 B (+1.39%) 4.65 kB → 4.71 kB
src/components/mobile/budget/index.tsx 📈 +104 B (+1.15%) 8.83 kB → 8.93 kB
src/components/budget/BudgetCategories.jsx 📈 +56 B (+0.65%) 8.4 kB → 8.46 kB
src/components/Modals.tsx 📈 +48 B (+0.36%) 12.95 kB → 13 kB
src/components/mobile/budget/BudgetTable.jsx 📈 +58 B (+0.18%) 32.1 kB → 32.15 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
static/js/wide.js 371.33 kB → 371.51 kB (+189 B) +0.05%
static/js/narrow.js 202.51 kB → 202.67 kB (+162 B) +0.08%
static/js/index.js 2.56 MB → 2.56 MB (+151 B) +0.01%

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/BackgroundImage.js 122.29 kB 0%
static/js/AppliedFilters.js 20.35 kB 0%
static/js/real-module.js 22.09 kB 0%
static/js/import.js 118.98 kB 0%
static/js/ReportRouter.js 1.18 MB 0%

Copy link
Contributor

github-actions bot commented Apr 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.2 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.2 MB 0%

@@ -35,6 +39,7 @@ type ExpenseCategoryProps = {

export function ExpenseCategory({
cat,
catGroup,
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@psybers psybers changed the title [WIP] Dim categories hidden by their groups Dim categories hidden by their groups Apr 11, 2024
@psybers psybers changed the title Dim categories hidden by their groups [WIP] Dim categories hidden by their groups Apr 11, 2024
@psybers
Copy link
Contributor Author

psybers commented Apr 11, 2024

Putting this back as WIP while I figure out the mobile view.

@psybers psybers changed the title [WIP] Dim categories hidden by their groups Dim categories hidden by their groups Apr 11, 2024
@psybers
Copy link
Contributor Author

psybers commented Apr 11, 2024

Ok, I think I figured out the mobile views, so it should behave similarly.

joel-jeremy
joel-jeremy previously approved these changes Apr 11, 2024
Copy link
Contributor

@joel-jeremy joel-jeremy left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@joel-jeremy joel-jeremy left a comment

Choose a reason for hiding this comment

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

LGTM!

@joel-jeremy joel-jeremy merged commit edd34b7 into actualbudget:master Apr 12, 2024
19 checks passed
@trafico-bot trafico-bot bot added ✨ Merged Pull Request has been merged successfully and removed ✅ Approved labels Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Merged Pull Request has been merged successfully
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Dim categories belonging to a hidden group
2 participants