Counter badge for grid advanced props#6468
Merged
Merged
Conversation
Contributor
#14565 Bundle Size — 57.79MiB (~+0.01%).a6d3d2d(current) vs 916e8b9 master#14558(baseline) Warning Bundle contains 70 duplicate packages – View duplicate packages Bundle metrics
Bundle size by type
Bundle analysis report Branch feat/grid-advanced-menu-counter-... Project dashboard Generated by RelativeCI Documentation Report issue |
bkrmendy
approved these changes
Oct 3, 2024
gbalint
reviewed
Oct 3, 2024
|
|
||
| return advancedGridProps.reduce((acc, curr) => { | ||
| const attr = getSimpleAttributeAtPath(props, curr) | ||
| return isRight(attr) && attr.value != null ? acc + 1 : acc |
Contributor
There was a problem hiding this comment.
It would be nice to create a count function in array-utils for this (for the note, a filter + length could work too)
Contributor
There was a problem hiding this comment.
Could use an optic and lengthOf.
Contributor
Author
There was a problem hiding this comment.
factored out to array-utils.ts in f525303 (#6468), but then moved it element-metadata-utils.ts in a6d3d2d (#6468) because of a failing import loop
gbalint
approved these changes
Oct 3, 2024
liady
pushed a commit
that referenced
this pull request
Dec 13, 2024
**Problem:** The grid advanced menu should show a badge with a counter for the number of properties set. **Fix:** 1. Show a badge to the side of the grid subsection title, if the count is > 0 and the popup/menu are not open 2. Show a badge in the menu entry if the count is > 0 https://github.com/user-attachments/assets/1f58f8ba-7f27-442f-8a07-816f7474d9be Fixes #6467
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem:
The grid advanced menu should show a badge with a counter for the number of properties set.
Fix:
Kapture.2024-10-03.at.16.55.41.mp4
Fixes #6467