-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat: add CheckboxTree component #1495
base: develop
Are you sure you want to change the base?
Conversation
7bacfa3
to
f23a4c0
Compare
ui/src/components/CheckboxTree/stories/CheckboxTree.stories.tsx
Outdated
Show resolved
Hide resolved
tests/testdata/test_addons/package_global_config_everything/globalConfig.json
Outdated
Show resolved
Hide resolved
ui/src/components/CheckboxTree/stories/CheckboxTree.stories.tsx
Outdated
Show resolved
Hide resolved
ahhh. miss-clicked into approval, unfortunately can't revoke it, pls address mentioned issues before proceeding. |
…unk/addonfactory-ucc-generator into feat/checkbox-tree-component
ui/src/components/table/stories/__images__/TableWrapper-ouath-basic-chromium.png
Outdated
Show resolved
Hide resolved
…unk/addonfactory-ucc-generator into feat/checkbox-tree-component
data-indeterminate={isIndeterminate} | ||
onChange={() => handleParentCheckboxForGroup(group.label, !isParentChecked)} | ||
disabled={disabled || group.options?.disabled} | ||
aria-label="custom checkbox for group" |
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.
The label is not correct since it does not reflect the real meaning for that checkbox
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 expect to see the explanation what is this checkbox for.
`Select all ${group.label}`
`Deselect all ${group.label}`
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.
In this, we have 3 state:
- select all
- deselect all
- indeterminate
but splunk don't have support for indeterminate, that's why I have added a custom checkbox so that we can use the upper 3 states for checkbox
data-indeterminate={isIndeterminate} | ||
onChange={() => handleParentCheckboxForGroup(group.label, !isParentChecked)} | ||
disabled={disabled || group.options?.disabled} | ||
aria-label="custom checkbox for group" |
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 expect to see the explanation what is this checkbox for.
`Select all ${group.label}`
`Deselect all ${group.label}`
prisma: variables.contentColorMuted, | ||
})}; | ||
} | ||
`; |
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.
the amount of CSS we have to support and sync with splunk-ui, dark and light themes + enterprise, prisma and upcoming Magneto theme drives me crazy. And it is just for indeterminate view
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.
Yes, as splunk don't have support for indeterminate, we need that long CSS styling.
If we don't want this indeterminate feature, then we could remove this feature and also the long CSS. wdyt?
Issue number: ADDON-76198
PR Type
What kind of change does this PR introduce?
Summary
Changes
A new component
CheckboxTree
has been introduced to define hierarchical checkbox structures with support of search functionality.User experience
User can use the new component for handling the list of checkboxes with better UI including the expanding/collapsing, grouping and searching within the checkbox list.
Checklist
If an item doesn't apply to your changes, leave it unchecked.