reveal
reveal copied to clipboard
feat(react-components): add hybrid cad mappings support - (part 9)
Type of change
This is a stacked PR:
- #5107
- #5106
- #5105
- #5104
- #5103
- #5102
- #5101
- #5100
- #5099 (This PR)
Jira ticket :blue_book:
https://cognitedata.atlassian.net/browse/BND3D-4989 https://cognitedata.atlassian.net/browse/BND3D-5576
https://cognitedata.atlassian.net/browse/
Description :pencil:
This PR changes:
- Avoiding empty array runtime mutations that might affect different asset mappings. It returns to the standard new empty array instead of using the shared constant.
- Move to getNodeData function
- adapt useSearchMappedEquipmentAssetMappings hooks for hybrid cad mappings
- move the classic asset mappings getter into a separated utility and other adjustments and query types
Note: it goes along with the Fusion stacked PR: https://github.com/cognitedata/fusion/pull/12745
How has this been tested? :mag:
Test instructions :information_source:
- In cog-demo/lervik project (which has hybrid asset mappings) go the Browser 3D
- In Category, select the Cognite Asset category
- Observe the hybrid asset mappings showing up.
- Search based on query.
- Click on the asset mappings in 3d viewer to open the preview panel or select from the search results.
Visual aids
Checklist :ballot_box_with_check:
- [X] I am happy with this implementation.
- [X] I have performed a self-review of my own code.
- [X] I have added unit and visuals tests to prove that my feature works to the best of my ability.
- [ ] I have added documentation to new and changed elements; both public and internally shared ones
- [X] I have refactored the code for testability, readability and extendibility to the best of my ability.
- [X] I have listed the JIRA tasks covering remaining work or tech debt related to this PR in the description.