-
Notifications
You must be signed in to change notification settings - Fork 605
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 point cloud bugs #4401
fix point cloud bugs #4401
Conversation
Important Review SkippedReview was skipped due to path filters Files ignored due to path filters (2)
You can disable this status message by setting the WalkthroughThe recent updates introduce significant enhancements to the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 0
Review Details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (9)
- app/packages/components/src/components/PopoutSectionTitle/PopoutSectionTitle.tsx (1 hunks)
- app/packages/looker-3d/src/action-bar/ToggleGridHelper.tsx (1 hunks)
- app/packages/looker-3d/src/action-bar/shared.tsx (1 hunks)
- app/packages/looker-3d/src/action-bar/style.module.css (1 hunks)
- app/packages/looker-3d/src/fo3d/Gizmos.tsx (3 hunks)
- app/packages/looker-3d/src/fo3d/point-cloud/Pcd.tsx (2 hunks)
- app/packages/looker-3d/src/fo3d/point-cloud/use-pcd-material.tsx (1 hunks)
- app/packages/looker-3d/src/hooks/use-pcd-material-controls.ts (1 hunks)
- app/packages/looker-3d/src/state.ts (1 hunks)
Files skipped from review due to trivial changes (1)
- app/packages/components/src/components/PopoutSectionTitle/PopoutSectionTitle.tsx
Additional Context Used
Path-based Instructions (7)
app/packages/looker-3d/src/action-bar/shared.tsx (1)
Pattern
**/*.{ts,tsx}
: Review the Typescript and React code for conformity with best practices in React, Recoil, Graphql, and Typescript. Highlight any deviations.app/packages/looker-3d/src/fo3d/point-cloud/Pcd.tsx (1)
Pattern
**/*.{ts,tsx}
: Review the Typescript and React code for conformity with best practices in React, Recoil, Graphql, and Typescript. Highlight any deviations.app/packages/looker-3d/src/hooks/use-pcd-material-controls.ts (1)
Pattern
**/*.{ts,tsx}
: Review the Typescript and React code for conformity with best practices in React, Recoil, Graphql, and Typescript. Highlight any deviations.app/packages/looker-3d/src/state.ts (1)
Pattern
**/*.{ts,tsx}
: Review the Typescript and React code for conformity with best practices in React, Recoil, Graphql, and Typescript. Highlight any deviations.app/packages/looker-3d/src/fo3d/Gizmos.tsx (1)
Pattern
**/*.{ts,tsx}
: Review the Typescript and React code for conformity with best practices in React, Recoil, Graphql, and Typescript. Highlight any deviations.app/packages/looker-3d/src/fo3d/point-cloud/use-pcd-material.tsx (1)
Pattern
**/*.{ts,tsx}
: Review the Typescript and React code for conformity with best practices in React, Recoil, Graphql, and Typescript. Highlight any deviations.app/packages/looker-3d/src/action-bar/ToggleGridHelper.tsx (1)
Pattern
**/*.{ts,tsx}
: Review the Typescript and React code for conformity with best practices in React, Recoil, Graphql, and Typescript. Highlight any deviations.
Learnings (1)
app/packages/looker-3d/src/fo3d/Gizmos.tsx (1)
User: sashankaryal PR: voxel51/fiftyone#4310 File: app/packages/looker-3d/src/fo3d/Gizmos.tsx:110-0 Timestamp: 2024-04-25T21:03:45.341Z Learning: The grid rendering logic in `Gizmos.tsx` is part of an external component and not directly modifiable within the project's codebase.
Additional comments not posted (8)
app/packages/looker-3d/src/action-bar/shared.tsx (1)
2-15
: Ref forwarding implementation inActionPopOver
looks good and follows React best practices.app/packages/looker-3d/src/action-bar/style.module.css (1)
38-64
: CSS changes for grid configuration UI are consistent and well-structured.app/packages/looker-3d/src/fo3d/point-cloud/Pcd.tsx (1)
35-47
: Implementation of point cloud data manipulation usinguseEffect
anduseMemo
is appropriate. Verify the dependencies to ensure there are no unnecessary re-renders.Verification successful
The dependencies for
useEffect
anduseMemo
inPcd.tsx
appear to be correctly specified. TheuseMemo
hook depends onpoints_
, and theuseEffect
hook depends onpoints
, which aligns with the expected usage to avoid unnecessary re-renders.
useMemo
dependency:[points_]
useEffect
dependency:[points]
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the dependencies of useEffect and useMemo in Pcd.tsx to ensure optimal performance. # Test: Search for the useEffect and useMemo usage. Expect: Correct dependencies specified. rg --type typescript $'useEffect|useMemo' app/packages/looker-3d/src/fo3d/point-cloud/Pcd.tsxLength of output: 129
Script:
#!/bin/bash # Description: Verify the dependencies of useEffect and useMemo in Pcd.tsx to ensure optimal performance. # Test: Search for the useEffect and useMemo usage. Expect: Correct dependencies specified. rg --type tsx $'useEffect|useMemo' app/packages/looker-3d/src/fo3d/point-cloud/Pcd.tsxLength of output: 115
Script:
#!/bin/bash # Description: Verify the dependencies of useEffect and useMemo in Pcd.tsx to ensure optimal performance. # Test: Search for the useEffect and useMemo usage. Expect: Correct dependencies specified. rg 'useEffect|useMemo' app/packages/looker-3d/src/fo3d/point-cloud/Pcd.tsxLength of output: 239
app/packages/looker-3d/src/hooks/use-pcd-material-controls.ts (1)
37-37
: Increase of maximum point size to 50 is a useful enhancement for flexibility in visualizations. Consider verifying the performance impact on different devices.app/packages/looker-3d/src/state.ts (1)
60-96
: Introduction of new atoms for grid settings enhances state management capabilities. Ensure consistent usage across components.app/packages/looker-3d/src/fo3d/Gizmos.tsx (1)
109-137
: Use of new grid-related atoms for dynamic grid calculations is appropriate. Verify the correctness of these calculations to ensure accurate grid rendering.Verification successful
The grid-related atoms (
gridCellSizeAtom
,gridSectionSizeAtom
,gridSizeAtom
,isGridInfinitelyLargeAtom
,shouldGridFadeAtom
) are correctly defined inapp/packages/looker-3d/src/state.ts
and are appropriately used inGizmos.tsx
. This ensures accurate grid calculations and rendering.
gridCellSizeAtom
is defined as a number atom.gridSectionSizeAtom
is defined as a number atom.isGridInfinitelyLargeAtom
is defined as a boolean atom.gridSizeAtom
is defined as a number atom.shouldGridFadeAtom
is defined as a boolean atom.These definitions align with their usage in
Gizmos.tsx
.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correctness of grid calculations in Gizmos.tsx to ensure accurate grid rendering. # Test: Check the grid rendering logic. Expect: Accurate grid calculations and rendering. rg --type typescript $'gridCellSizeAtom|gridSectionSizeAtom|gridSizeAtom|isGridInfinitelyLargeAtom|shouldGridFadeAtom' app/packages/looker-3d/src/fo3d/Gizmos.tsxLength of output: 197
Script:
#!/bin/bash # Description: Verify the correctness of grid calculations in Gizmos.tsx to ensure accurate grid rendering. # Test: Check the grid rendering logic. Expect: Accurate grid calculations and rendering. rg --type ts 'gridCellSizeAtom|gridSectionSizeAtom|gridSizeAtom|isGridInfinitelyLargeAtom|shouldGridFadeAtom' app/packages/looker-3d/src/fo3d/Gizmos.tsxLength of output: 557
Script:
#!/bin/bash # Description: Verify the definitions of grid-related atoms to ensure accurate grid rendering. # Test: Check the definitions of grid-related atoms. Expect: Correct definitions and usage. rg 'const gridCellSizeAtom|const gridSectionSizeAtom|const gridSizeAtom|const isGridInfinitelyLargeAtom|const shouldGridFadeAtom' --glob '*.ts' --glob '*.tsx'Length of output: 587
app/packages/looker-3d/src/fo3d/point-cloud/use-pcd-material.tsx (1)
112-112
: Addition ofkey
prop to<RgbShader>
optimizes re-renders and enhances functionality. Ensure the key is correctly generated.app/packages/looker-3d/src/action-bar/ToggleGridHelper.tsx (1)
20-112
: Introduction ofGridConfigurator
and updates toToggleGridHelper
enhance the grid configuration UI. Consider verifying the usability of these components.
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.
Actionable comments posted: 3
Review Details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- app/packages/looker-3d/src/action-bar/ToggleGridHelper.tsx (1 hunks)
Additional Context Used
Path-based Instructions (1)
app/packages/looker-3d/src/action-bar/ToggleGridHelper.tsx (1)
Pattern
**/*.{ts,tsx}
: Review the Typescript and React code for conformity with best practices in React, Recoil, Graphql, and Typescript. Highlight any deviations.
Additional comments not posted (1)
app/packages/looker-3d/src/action-bar/ToggleGridHelper.tsx (1)
41-108
: Validate the accessibility of theGridConfigurator
UI.Ensure that all interactive elements in the
GridConfigurator
are accessible, including proper labeling and keyboard navigability. This is important for compliance with accessibility standards and providing a good user experience for all users.
followCamera | ||
fadeStrength={shouldFade ? 1 : 0} | ||
followCamera={shouldFade} | ||
fadeFrom={0.5} |
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.
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.
Yeah... 😅
We expose "fading", "infinite / non-infinite", "cell size", "section size", and "grid size" if non-infinite.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## release/v0.24.0 #4401 +/- ##
==================================================
Coverage ? 99.27%
==================================================
Files ? 47
Lines ? 16155
Branches ? 0
==================================================
Hits ? 16038
Misses ? 117
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Actionable comments posted: 2
Review Details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files ignored due to path filters (3)
e2e-pw/src/oss/specs/3d/fo3d-pcd-stl.spec.ts-snapshots/orthographic-projection-grid-cuboids-chromium-darwin.png
is excluded by!**/*.png
,!**/*.png
e2e-pw/src/oss/specs/3d/fo3d-pcd-stl.spec.ts-snapshots/scene-chromium-darwin.png
is excluded by!**/*.png
,!**/*.png
e2e-pw/src/oss/specs/3d/fo3d-pcd-stl.spec.ts-snapshots/scene-chromium-linux.png
is excluded by!**/*.png
,!**/*.png
Files selected for processing (4)
- app/packages/looker-3d/src/fo3d/Gizmos.tsx (3 hunks)
- app/packages/looker-3d/src/fo3d/point-cloud/Pcd.tsx (2 hunks)
- app/packages/looker-3d/src/hooks/use-pcd-material-controls.ts (1 hunks)
- e2e-pw/scripts/generate-screenshots-docker-image/build-docker-image.sh (1 hunks)
Files skipped from review as they are similar to previous changes (2)
- app/packages/looker-3d/src/fo3d/Gizmos.tsx
- app/packages/looker-3d/src/hooks/use-pcd-material-controls.ts
Additional Context Used
ShellCheck (1)
e2e-pw/scripts/generate-screenshots-docker-image/build-docker-image.sh (1)
[info] 24-24: Use ./glob or -- glob so names with dashes won't become options.
Path-based Instructions (1)
app/packages/looker-3d/src/fo3d/point-cloud/Pcd.tsx (1)
Pattern
**/*.{ts,tsx}
: Review the Typescript and React code for conformity with best practices in React, Recoil, Graphql, and Typescript. Highlight any deviations.
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.
Actionable comments posted: 0
Review Details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- app/packages/looker-3d/src/fo3d/point-cloud/Pcd.tsx (2 hunks)
Files skipped from review as they are similar to previous changes (1)
- app/packages/looker-3d/src/fo3d/point-cloud/Pcd.tsx
What changes are proposed in this pull request?
Add grid configurator

Fix rgb shader not responding to point size change
Center points geometryUse
points.clone()
to do a shallow copy so that point clouds with same URL are treated as different copies in the scene graphHow is this patch tested? If it is not, please explain why.
Manual testing
Summary by CodeRabbit
New Features
GridConfigurator
component for enhanced grid settings customization.Improvements
PopoutSectionTitle
component styling for better alignment and spacing.ActionPopOver
component to useforwardRef
for improved ref forwarding.Gizmos
component with dynamic grid settings.Bug Fixes
useMemo
withuseEffect
inPcd
component for better point cloud data handling.Performance
pointSize
in point cloud material controls from 20 to 50.Chores
screenshot
Docker image.