-
Notifications
You must be signed in to change notification settings - Fork 3
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: Spatial Mode User Story 1 #805
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #805 +/- ##
==========================================
- Coverage 77.47% 76.57% -0.90%
==========================================
Files 88 88
Lines 6856 6994 +138
==========================================
+ Hits 5312 5356 +44
- Misses 1544 1638 +94
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
||
if (!prevConditionMet && currentConditionMet) { | ||
dispatch({ | ||
type: "toggle image underlay", |
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.
Toggle image underlay on update if Spatial embedding exists and currently selected
@@ -15,6 +15,7 @@ gunicorn[gevent]==20.0.4 | |||
numba==0.56.4 | |||
numpy==1.23.5 | |||
pandas==1.5.3 | |||
pillow==9.5.0 |
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.
what is this new package for? Thanks!
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.
This is PIL/Pillow used to generate the spatial image in the backend based on the RGB array and return in any image format, in our case webp
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.
Just reviewed the PR 🙏 ✨
All looks super good and I could only offer tiny nits 😆
Thanks again for the wonderful work, Ronen!
Since we're aiming to merge the PR on Friday, no rush to address it today. I know it's late in EST 👍
Have a great evening!
@@ -0,0 +1,24 @@ | |||
import { Action } from "redux"; |
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.
this can probably just be moved to controls
@seve just wanted to double check that this is no longer an issue: Thank you! |
/* | ||
Map an XY coordinate from cell/point domain to screen range. Inverse | ||
of mapScreenToPoint() | ||
*/ | ||
const { camera, projectionTF, modelTF, viewport } = this.state; | ||
const cameraTF = camera!.view(); | ||
const cameraTF = camera?.view() || undefined; |
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.
since we have optional chaining already, we don't have to do || defined
, since TS transpiles camera?.view()
to camera ? camera.view() : camera
in JS automatically
webp
format for image underlayTo test:
http://localhost:3000/d/ba344978-e1aa-40db-a611-b952c10df148.cxg?spatial=true
Still to do in separate PRs:
any
Screen.Recording.2024-03-04.at.3.48.37.PM.mov