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

feat(web-core/tree): enhance tree library #7534

Merged
merged 2 commits into from
May 22, 2024
Merged

Conversation

ByScripts
Copy link
Contributor

@ByScripts ByScripts commented Apr 5, 2024

Description

  • Context now stores the selected/expanded/active IDs instead of the TreeNode to allow easy manipulation and initial hydration.
  • Rename activable option to selectable
  • Rename labelClasses to statuses
  • Add hasChildren on Branch
  • predicate now takes the TreeNode as argument instead of TData
  • Add a meta option, to pass additional arbitrary data

Checklist

  • Commit
    • Title follows commit conventions
    • Reference the relevant issue (Fixes #007, See xoa-support#42, See https://...)
    • If bug fix, add Introduced by
  • Changelog
    • If visible by XOA users, add changelog entry
    • Update "Packages to release" in CHANGELOG.unreleased.md
  • PR
    • If UI changes, add screenshots
    • If not finished or not tested, open as Draft

@ByScripts ByScripts requested a review from OlivierFL April 5, 2024 08:15
@ByScripts ByScripts self-assigned this Apr 5, 2024
Base automatically changed from web-core/rename-collection-to-tree to master April 8, 2024 07:23
@ByScripts ByScripts marked this pull request as ready for review April 8, 2024 07:57
This commit changes the way the visibility of tree nodes is determined:
- Rename the `isVisible` property to `isExcluded` in `TreeNodeBase`, `Branch` and `Leaf` classes
- Add a new `failsFilterDownwards` property in `Branch` and `Leaf` to determine if a node should be excluded
- Update the `visibleNodes` computed property to filter out excluded nodes
- Modify the `toggleChildrenSelect` method in `Branch` to only toggle non-excluded child nodes
@ByScripts
Copy link
Contributor Author

@pdonias @MathieuRA Can you squash merge? Thanks.

@pdonias pdonias merged commit da9b941 into master May 22, 2024
1 check passed
@pdonias pdonias deleted the web-core/tree-enhancements branch May 22, 2024 15:07
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.

None yet

3 participants