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

show primitive in embedded document in ListField #3963

Merged
merged 4 commits into from Jan 4, 2024

Conversation

imanjra
Copy link
Contributor

@imanjra imanjra commented Jan 4, 2024

What changes are proposed in this pull request?

Fixes an issue where primitive values in DynamicEmbeddedDocument within ListField is displayed as None sample modal

How is this patch tested? If it is not, please explain why.

Verified values are displayed as CSV in the sample modal for the embedded fields:

image
image

Release Notes

Is this a user-facing change that should be mentioned in the release notes?

  • No. You can skip the rest of this section.
  • Yes. Give a description of this change to be included in the release
    notes for FiftyOne users.

Primitive values in DynamicEmbeddedDocument within ListField will be displayed as comma separated values (previously, displayed as None) in the sample modal

What areas of FiftyOne does this PR affect?

  • App: FiftyOne application changes
  • Build: Build and test infrastructure changes
  • Core: Core fiftyone Python library changes
  • Documentation: FiftyOne documentation changes
  • Other

@imanjra imanjra requested review from benjaminpkane, manivoxel51 and a team January 4, 2024 16:17
Copy link

codecov bot commented Jan 4, 2024

Codecov Report

Attention: 39 lines in your changes are missing coverage. Please review.

Comparison is base (7eaeee9) 15.86% compared to head (c1af0ad) 15.86%.

Files Patch % Lines
.../src/components/Sidebar/Entries/PathValueEntry.tsx 0.00% 36 Missing ⚠️
app/packages/state/src/recoil/schema.ts 25.00% 3 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##           release/v0.23.3    #3963      +/-   ##
===================================================
- Coverage            15.86%   15.86%   -0.01%     
===================================================
  Files                  731      731              
  Lines                81853    81882      +29     
  Branches              1093     1093              
===================================================
+ Hits                 12987    12988       +1     
- Misses               68866    68894      +28     
Flag Coverage Δ
app 15.86% <2.50%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

benjaminpkane
benjaminpkane previously approved these changes Jan 4, 2024
Copy link
Contributor

@benjaminpkane benjaminpkane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🔢

For consistency, I tweaked things so the ListValueEntry component is used

Screenshot 2024-01-04 at 2 07 31 PM

manivoxel51
manivoxel51 previously approved these changes Jan 4, 2024
Copy link
Contributor

@manivoxel51 manivoxel51 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you! 🍨

one console log

const pinned3DSample = useRecoilValue(fos.pinned3DSampleSlice);
const activePcdSlices = useRecoilValue(fos.activePcdSlices);
const slices = Boolean(pinned3DSample) && (activePcdSlices?.length || 1) > 1;

return field && field.ftype !== LIST_FIELD ? (
const isScalar = useRecoilValue(isScalarValue(path));
console.log(path, isScalar);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✂️

@benjaminpkane benjaminpkane dismissed stale reviews from manivoxel51 and themself via c1af0ad January 4, 2024 20:33
Copy link
Contributor

@manivoxel51 manivoxel51 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍨

@benjaminpkane benjaminpkane merged commit 44063a9 into release/v0.23.3 Jan 4, 2024
13 checks passed
@benjaminpkane benjaminpkane deleted the bugfix/embedded-doc-prim-modal branch January 4, 2024 21:21
@imanjra
Copy link
Contributor Author

imanjra commented Jan 4, 2024

Nice! Thank you @benjaminpkane and @manivoxel51! 🚀

brimoor pushed a commit that referenced this pull request Jan 10, 2024
* show primitive in embedded document in ListField

* use ListValueEntry for consistency

* lint

* log

---------

Co-authored-by: Benjamin Kane <ben@voxel51.com>
brimoor pushed a commit that referenced this pull request Jan 15, 2024
* show primitive in embedded document in ListField

* use ListValueEntry for consistency

* lint

* log

---------

Co-authored-by: Benjamin Kane <ben@voxel51.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants