-
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
fix(react-components): adopt Cogs chips and fix 360 image details panel appearance #4651
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
haakonflatval-cognite
had a problem deploying
to
CI
July 1, 2024 12:29
— with
GitHub Actions
Failure
haakonflatval-cognite
changed the title
chore: adopt Cogs CounterChip in layers list
chore: adopt Cogs chips and fix 360 image details panel appearance
Jul 1, 2024
haakonflatval-cognite
changed the title
chore: adopt Cogs chips and fix 360 image details panel appearance
fix(react-components): adopt Cogs chips and fix 360 image details panel appearance
Jul 1, 2024
danpriori
reviewed
Jul 1, 2024
react-components/src/components/CadModelContainer/CadModelContainer.tsx
Outdated
Show resolved
Hide resolved
danpriori
approved these changes
Jul 1, 2024
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.
one comment but LGTM
danpriori
reviewed
Jul 1, 2024
@@ -44,7 +45,7 @@ export function CadModelContainer({ | |||
addModel(addModelOptions, transform) | |||
.then((model) => { | |||
onLoad?.(model); | |||
setRevealResourcesCount(viewer.models.length); | |||
setRevealResourcesCount(getViewerResourceCount(viewer)); |
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.
Super! Way better IMO :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of change
Jira ticket 📘
https://cognitedata.atlassian.net/browse/
Description 📝
Migrate components according to Cogs.js adoption plan.This grew a bit out of it's original plans, but the change seems sort-of necessary: The Image360 panel would not always show up when entering 360 panels because of some React re-rendering shenanigans - the 360 image container is temporarily unmounted after getting added, and we did not properly react to when it was added anew. This PR fixes the second problem - the 360 is still mounted twice, but we now correctly react to it (by using the
use360Collections
hook, and making sure the resource count includes 360 images).Aside from that, I've simplified two occurrences of cogs.js chips as part of the cogs-adaption.
How has this been tested? 🔍
Test instructions ℹ️
Checklist ☑️