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

Add count prop to OuiTreeView #934 #1138

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

keskami
Copy link
Contributor

@keskami keskami commented Nov 2, 2023

Description

Added count prop to display the number of children components in TreeView with an OuiFacetButton

Issues Resolved

Fixes #934

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • All tests pass
    • yarn lint
    • yarn test-unit
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: keskami <kkak808@gmail.com>
Signed-off-by: keskami <kkak808@gmail.com>
Signed-off-by: keskami <kkak808@gmail.com>
Signed-off-by: keskami <kkak808@gmail.com>
Signed-off-by: keskami <kkak808@gmail.com>
Signed-off-by: keskami <kkak808@gmail.com>
@BSFishy
Copy link
Contributor

BSFishy commented Nov 2, 2023

Could you add a before and after screenshot for this change?

@keskami
Copy link
Contributor Author

keskami commented Nov 2, 2023

sure!
Screen Shot 2023-11-02 at 2 50 08 PM
Screen Shot 2023-11-02 at 2 51 27 PM

@BSFishy BSFishy added the OSCI label Nov 2, 2023
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
src/components/tree_view/tree_view.scss Outdated Show resolved Hide resolved
Signed-off-by: keskami <kkak808@gmail.com>
Signed-off-by: keskami <kkak808@gmail.com>
@willie-hung
Copy link
Contributor

willie-hung commented Nov 3, 2023

@keskami According to the issue description: "Count prop should reflect the number of OuiTreeNode children, and should be optional to include". It seems like you need to modify the props that sent into the OuiTreeView component. For example:

<OuiTreeView items={items} showCount={true} aria-label="Sample Folder Tree" />

@willie-hung
Copy link
Contributor

Some suggestions:

  1. Add some unit tests for this new functionality
  2. (Maybe?) Add a toggle for the Tree view demo to demonstrate that this is an optional feature
Screenshot 2023-11-02 at 11 48 25 PM

Signed-off-by: Josh Romero <rmerqg@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add count prop to OuiTreeView
4 participants