-
Notifications
You must be signed in to change notification settings - Fork 20
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 support for node data fetching in React Components #3518
Conversation
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.
Looks good, a few questions but nothing major. Only thing is that I think we should add an example in the storybook in the same way as I did with styling capabilities. It will allow to easily test this functionality now and later on. So, just expanding Reveal3DResources
story should be fine.
react-components/src/components/Reveal3DResources/Reveal3DResources.tsx
Outdated
Show resolved
Hide resolved
react-components/src/components/Reveal3DResources/queryMappedData.ts
Outdated
Show resolved
Hide resolved
react-components/src/components/Reveal3DResources/queryMappedData.ts
Outdated
Show resolved
Hide resolved
react-components/src/components/Reveal3DResources/queryMappedData.ts
Outdated
Show resolved
Hide resolved
react-components/src/components/Reveal3DResources/Reveal3DResources.tsx
Outdated
Show resolved
Hide resolved
6a97f8e
to
5762b1a
Compare
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.
Prop on Reveal3DResources
works good but query feels a little too slow. I think when we will be highlighting clicked objects it will feel quite bad for the user, so we need to think how to speed it up a little bit.
react-components/src/components/Reveal3DResources/queryMappedData.ts
Outdated
Show resolved
Hide resolved
react-components/src/components/Reveal3DResources/queryMappedData.ts
Outdated
Show resolved
Hide resolved
d16dce9
to
8e15211
Compare
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.
Looks good! We will probably need to do something regarding the time of all requests but can fix it in future PRs.
Type of change
Jira ticket 📘
https://cognitedata.atlassian.net/browse/UX-1136
Description 📝
Implement FDM node data query and expose it.
How has this been tested? 🔍
Test instructions ℹ️
Given a proper FDM setup, you should now be able to register a callback in
onNodeClicked
that receives the clicked node data.Checklist ☑️