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(tree, tree-select): simplify managing item properties in TreeManager with TreeNode #1133

Merged

Conversation

wattachai-lseg
Copy link
Collaborator

@wattachai-lseg wattachai-lseg commented Mar 26, 2024

Description

  • feat(tree, tree-select): simplify managing item properties in TreeManager with TreeNode
  • chore(tree): add Tree component performance benchmark for item rendering

Fixes https://jira.refinitiv.com/browse/DME-2107

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have checked my code and corrected any misspellings

@wattachai-lseg wattachai-lseg marked this pull request as ready for review March 28, 2024 07:51
@wattachai-lseg wattachai-lseg self-assigned this Mar 29, 2024
@wattachai-lseg wattachai-lseg force-pushed the feat/tree-node/implementation-unit-test branch from 722de2d to a4e497f Compare March 29, 2024 09:54
@wattachai-lseg wattachai-lseg changed the title Feat/tree-node/implementation-unit-test feat(tree, tree-select): simplify managing item properties in TreeManager with TreeNode Mar 29, 2024
Copy link

sonarqubecloud bot commented Apr 2, 2024

@wattachai-lseg wattachai-lseg merged commit 82050c0 into feat/tree-node/main Apr 11, 2024
14 checks passed
@wattachai-lseg wattachai-lseg deleted the feat/tree-node/implementation-unit-test branch April 11, 2024 04:54
wattachai-lseg added a commit that referenced this pull request May 7, 2024
…ode (#1149)

* fix(tree): fix implicit type on renderer (#1136)

* feat(tree, tree-select, combo-box): allow filtering latest value of items (#1134)

* feat(tree, tree-select, combo-box): allow filtering latest value of items

* refactor(tree): filter function accepts TreeManager instead of CollectionComposer

* refactor(combo-box, tree-select): filter function accepts both TreeManager and CollectionComposer

* docs(combo-box): revert change of filter section

* refactor: improve default filter function factory naming

* feat(tree, tree-select): simplify managing item properties in TreeManager with TreeNode (#1133)

* feat(tree,tree-select): introduce TreeNode

* feat(tree): add performance benchmark

* feat(tree): add new TreeManager & TreeNode APIs

* chore(tree): add benchmarks for TreeManager & TreeNode

* refactor: set treeManager of Tree & TreeSelect to public

* feat(tree): filter latest value of label instead of initial one

* refactor(tree): use createRenderer

* feat(tree, tree-select): filter latest value of label instead of initial one

* refactor: remove hidden setter & hide related APIs from doc

* refactor: use Proxy object instead of Object.defineProperty()

* chore: add todo describing issue of addItem() & isItemParent() in CollectionComposer

* refactor: comment out add/remove item APIs

* refactor: improve typing

* refactor: scope TreeNode support to TreeDataItem

* test(tree): organize mock data in its own folder

* fix: make getTreeNode return null for non-existing items

* test: add Tree Manager unit test

* test: add tree node unit testing

* test: add method unit testing for TreeNode

* test: add unit test  for prop update with change rendering

* test: add unit test for label prop update with change rendering

* test: add unit test for expand prop

* test: add unit test for hidden prop

* test: add unit test for readonly prop

* test: add unit test for highlighted prop

* test: add unit test for selected & selectedAt prop

* test: add unit test for disabled prop

* refactor: fix typo

* test: add unit test for TreeNode prop updates to Tree Select component

* refactor: revise TODO comment

* refactor: remove unused code

* refactor: improve TreeManager jsdoc

* chore: add jsdoc to TreeNode

* test: fix TreeNode import in unit test

* chore: update SonarCloud coverage exclusion

* fix(tree-item): fix incorrect type of icon

* fix: getTreeNode existence check

* feat: add getDepth() method to TreeNode for custom renderer usage

* test: add a test case using TreeNode with custom renderer

* feat: revert latest value support for filter

* chore: clarify comment & jsdoc

* refactor: reduce magic value usage

* test: add test case for filtering items with updated label value

* test: replace to.be.equal with to.equal for brevity

* test: rename test file for clarity

* test: enable test case for filtering items with updated label value

* feat(tree-select): expose persistSelection supporting programmatic selected state update

* refactor: improve TreeManager's getTreeNodes() & getTreeNode() perf

* refactor(tree, tree-select): simplify createTreeRender

* docs: add Tree Node doc and its API reference (#1145)

* feat(tree,tree-select): introduce TreeNode

* feat(tree): add performance benchmark

* feat(tree): add new TreeManager & TreeNode APIs

* chore(tree): add benchmarks for TreeManager & TreeNode

* refactor: set treeManager of Tree & TreeSelect to public

* feat(tree): filter latest value of label instead of initial one

* refactor(tree): use createRenderer

* feat(tree, tree-select): filter latest value of label instead of initial one

* refactor: remove hidden setter & hide related APIs from doc

* refactor: use Proxy object instead of Object.defineProperty()

* chore: add todo describing issue of addItem() & isItemParent() in CollectionComposer

* refactor: comment out add/remove item APIs

* refactor: improve typing

* refactor: scope TreeNode support to TreeDataItem

* test(tree): organize mock data in its own folder

* fix: make getTreeNode return null for non-existing items

* test: add Tree Manager unit test

* test: add tree node unit testing

* test: add method unit testing for TreeNode

* test: add unit test  for prop update with change rendering

* test: add unit test for label prop update with change rendering

* test: add unit test for expand prop

* test: add unit test for hidden prop

* test: add unit test for readonly prop

* test: add unit test for highlighted prop

* test: add unit test for selected & selectedAt prop

* test: add unit test for disabled prop

* refactor: fix typo

* test: add unit test for TreeNode prop updates to Tree Select component

* refactor: revise TODO comment

* refactor: remove unused code

* refactor: improve TreeManager jsdoc

* chore: add jsdoc to TreeNode

* test: fix TreeNode import in unit test

* chore: update SonarCloud coverage exclusion

* fix(tree-item): fix incorrect type of icon

* fix: getTreeNode existence check

* feat: add getDepth() method to TreeNode for custom renderer usage

* test: add a test case using TreeNode with custom renderer

* feat: revert latest value support for filter

* chore: clarify comment & jsdoc

* refactor: reduce magic value usage

* test: add test case for filtering items with updated label value

* test: replace to.be.equal with to.equal for brevity

* test: rename test file for clarity

* test: enable test case for filtering items with updated label value

* docs: add Tree Node & Tree Manager to navigation menu

* docs(tree): add @type to jsdoc of TreeManager

* docs: add TreeNode doc

* docs(tree-node): add more content

* refactor: handle optional context param when it's not provided

* docs: revise overall content of Tree Node

* docs: complete custom render example for Tree Node

* refactor: keep method name concise

* refactor: prevent composer & tree manager reassignment with public getter

* refactor: add missing comments to Tree Node

* refactor: add public commit() instead of publicizing persistSelection()

* refactor: improve json2md trimming

* refactor(tree-item): mark property as optional instead of using union type with undefined

* refactor(tree-select): use nullish coalescing operator instead

* docs: fix description of treemanager api (#1135)

* refactor: prevent functions from ostensibly returning the same value

* docs: rewrite Tree Manager doc

* docs: fix grammar and clean example

* refactor: fix broken buttons on Tree's demo page

---------

Co-authored-by: Theeraphat-Sorasetsakul <86758473+Theeraphat-Sorasetsakul@users.noreply.github.com>
Co-authored-by: Theeraphat Sorasetsakul <Theeraphat.Sorasetsakul@refinitiv.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v7 EF version 7
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants