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

NickAkhmetov/CAT-892 add vitessce json link #3591

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

NickAkhmetov
Copy link
Collaborator

Summary

This PR introduces a "Download Vitessce Configuration" link to the titles of processed datasets with Vitessce configurations. This is accomplished by pulling out the link construction logic from the useVitessceConf hook into its own useVitessceConfLink hook to ensure consistency and adding a corresponding button to the same row.

I used the SummaryJSONButton as a base for the styling. After confirming that the WhiteRectangularTooltipIconButton component used for this was not used anywhere else, I placed the sizing/position styling into the styles for that component, to ensure consistency going forward. To differentiate the buttons, I used the VisualizationIcon.

We could potentially place this button inline with the other Vitessce-specific buttons if desired; the non-unified view had this functionality in the header next to the json button, however, so I colocated the buttons for familiarity purposes.

Design Documentation/Original Tickets

https://hms-dbmi.atlassian.net/browse/CAT-892

Testing

I tested the functionality with the processed descendants of the following datasets:

  • Codex SPRM/Cytokit v2 (to confirm this works with normal processed datasets): 3d14dcc3d7c3e0cd339c9366e34b37c7
  • SnareSeq2 (to confirm this works with processed datasets that contain multiple configurations/slides): 93c57af112056142084e08b2416d9b02
  • PAS Stained Microscopy (to confirm this works with configurations that rely on a parent dataset): 7e3f3b5d1890f9612efb91d3a820cdcc

Screenshots/Video

image

Checklist

  • Code follows the project's coding standards
    • Lint checks pass locally
    • New CHANGELOG-your-feature-name-here.md is present in the root directory, describing the change(s) in full sentences.
  • Unit tests covering the new feature have been added
  • All existing tests pass
  • Any relevant documentation in JIRA/Confluence has been updated to reflect the new feature
  • Any new functionalities have appropriate analytics functionalities added

Additional Notes

Please specify any additional information or context relevant to this PR.

john-conroy
john-conroy previously approved these changes Nov 1, 2024
tooltip="View Vitessce Configuration"
href={href}
target="_blank"
onClick={() => trackEntityPageEvent({ action: 'View Vitessce Conf' })}
Copy link
Collaborator

Choose a reason for hiding this comment

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

We could wrap this in useCallback. Not a huge deal, but I'm starting to lean towards doing it by default.

@NickAkhmetov NickAkhmetov merged commit 7f4777e into main Nov 4, 2024
8 checks passed
@NickAkhmetov NickAkhmetov deleted the nickakhmetov/cat-892-add-vitessce-json-link branch November 4, 2024 19:43
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.

2 participants