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

User Story 4: Export PNG #728

Closed
tihuan opened this issue Jan 30, 2024 · 13 comments
Closed

User Story 4: Export PNG #728

tihuan opened this issue Jan 30, 2024 · 13 comments
Assignees
Labels
frontend front-end issue P0 Priority 0 - Critical, fix ASAP!

Comments

@tihuan
Copy link
Contributor

tihuan commented Jan 30, 2024

User Story 4:
As a data consumer, I want to export visualizations or specific data subsets from the spatial data, so that I can use them in presentations, publications, or further analysis with other tools.

DoD:

  1. Export PNG file with TBD dimension UPDATE 2/28: Use the minimum "hi-res" required dimensions
  2. Timmy: The downloaded image should have a legend on the top left corner with sensible amount of space / padding around it, the image, and the dots, similar to the Loupe downloaded image in the comment below
  3. Add corresponding e2e tests (Timmy: maybe download the image and open in a new tab and take Chromatic screenshot?)

NOTES:

  1. Timmy: @atarashansky will grab a screenshot for export image from Excellxgene for us 😆
  2. Timmy: Scale Bar feature is captured in this ticket outside of MVP

Excellxgene example - we can probably just have a screenshot button instead of a dropdown, since we don't have other download options
image (1).png

@tihuan tihuan added frontend front-end issue P0 Priority 0 - Critical, fix ASAP! labels Jan 30, 2024
@tihuan tihuan changed the title Export PNG User Story 4: Export PNG Jan 31, 2024
@tihuan tihuan transferred this issue from chanzuckerberg/single-cell-data-portal Feb 1, 2024
@tihuan
Copy link
Contributor Author

tihuan commented Feb 6, 2024

@atarashansky @niknak33 maybe we should align on what's included in the downloaded image - I suppose it's just whatever is currently rendered on the canvas + a legend, like what Loupe has?

Screenshot 2024-02-06 at 3.14.49 PM.png

@tihuan
Copy link
Contributor Author

tihuan commented Feb 6, 2024

Hey team! Please add your planning poker estimate with Zenhub @kaloster @seve

@sidneymbell
Copy link
Contributor

This seems totally reasonable to me! I'd suggest adding a scale bar if possible. Also, this is a total nit, but let's align the legend in the top left and add a few pixels of padding if possible.

@tihuan
Copy link
Contributor Author

tihuan commented Feb 7, 2024

#742 spike blocks this ticket, because we'll use that spike ticket to port over Excellxgene's code to export image

@tihuan
Copy link
Contributor Author

tihuan commented Feb 7, 2024

@sidneymbell Oh great idea! I'll add the requirement to move the legend to the top left 👍

I like the scale bar as well! To do it properly, should we extract that feature out as a standalone ticket, so we can add the scale bar both in Explorer and the downloaded image? (I see that Loupe Browser has the scale bar in their app but surprisingly not in their downloaded image, so this is our time to do better than them! Bwahaha)

Another reason to extract scale bar out as a standalone ticket is that we've never implemented a scale bar before, so we'd need to do some research to make sure our implementation works and can be validated 😆!

Scale Bar ticket: https://app.zenhub.com/workspaces/single-cell-5e2a191dad828d52cc78b028/issues/gh/chanzuckerberg/single-cell-explorer/749. We can prioritize this after the MVP to see when we want to add this feature!

@tihuan
Copy link
Contributor Author

tihuan commented Feb 28, 2024

@niknak33 @seve can you sync on what image dimension we should go with? I checked 2 Loupe Browser exported images, and they are both 1499 x 1051. Not sure why it's so specific lol

Thank you!

Image

@tihuan
Copy link
Contributor Author

tihuan commented Feb 28, 2024

Ah okay, I just played with the Loupe Browser a bit more. The exported image dimension actually corresponds to your Loupe Browser app window dimension, so it's a YSWYG experience

To simplify the feature for Explorer, it feels like maybe we can just stick with exporting hardcoded image dimensions to start with and iterate on what the users actually need later?

@tihuan
Copy link
Contributor Author

tihuan commented Feb 28, 2024

@seve : Okay just chatted with @niknak33 on the exported PNG file dimension, we should just use the minimal "hi-res" image dimensions required by the schema (2000x2000, I believe?) as the hard coded image dimension, so even if the "hi-res" image dimensions provided by the user is larger than 2000x2000, the exported PNG file would still look good?

CC: @sidneymbell to confirm the 2000x2000 min "hi-res" requirement is correct 🙏 Thank you!

@tihuan
Copy link
Contributor Author

tihuan commented Mar 11, 2024

@seve said "there’c currently no legend, I’m not sure how we want to show legends for categorical color by"

CC: @niknak33 @sidneymbell to see if you can help clarify the requirement for legend

Thanks!

@tihuan tihuan closed this as completed Mar 14, 2024
@tihuan tihuan reopened this Mar 14, 2024
@tihuan
Copy link
Contributor Author

tihuan commented Mar 14, 2024

@seve I think we're missing e2e test for this? Thanks!

@seve
Copy link
Contributor

seve commented Mar 15, 2024

I spent some time looking through chromatic's API docs to see if it can diff downloaded images, but couldn't find any resources that made it seem like it could. Any advice on testing?

Also I left this issue open because of the open question to @niknak33

@tihuan
Copy link
Contributor Author

tihuan commented Mar 15, 2024

Wonder if we could download the image and open it in a browser tab for Chromatic to screenshot?

@tihuan
Copy link
Contributor Author

tihuan commented Mar 27, 2024

sync'd offline - will keep this ticket open until the e2e tests are covered!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend front-end issue P0 Priority 0 - Critical, fix ASAP!
Projects
None yet
Development

No branches or pull requests

3 participants