Skip to content

Add visualization framework interface to cell-based markdown editor#19775

Merged
guerler merged 27 commits intogalaxyproject:devfrom
guerler:add_cell_editor_viz
Mar 24, 2025
Merged

Add visualization framework interface to cell-based markdown editor#19775
guerler merged 27 commits intogalaxyproject:devfrom
guerler:add_cell_editor_viz

Conversation

@guerler
Copy link
Copy Markdown
Contributor

@guerler guerler commented Mar 8, 2025

Requires #19835. See discussion regarding visualizations in pages in #19226.

This PR integrates an interface for our new visualization framework into the cell-based Markdown editor. Only fully packaged, standalone visualizations—published as npm packages in accordance with our new framework—can be used in pages and reports. This ensures stability, preventing visualizations from breaking due to Galaxy updates or build system limitations. Additionally, this PR enables the cell-based Markdown editor for workflow reports and lays the groundwork for workflow-specific visualizations by integrating Vega and Vitessce cell/block types.

Usage in Pages (with preview):

Screen.Recording.2025-03-19.at.7.01.45.PM.mov

Usage in Workflow Reports (without preview):

Screen.Recording.2025-03-20.at.9.43.16.AM.mov

How to test the changes?

(Select all options that apply)

  • I've included appropriate [automated tests (https://docs.galaxyproject.org/en/latest/dev/writing_tests.html).
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@guerler guerler added this to the 25.0 milestone Mar 8, 2025
@guerler guerler force-pushed the add_cell_editor_viz branch 7 times, most recently from faca1f8 to a775454 Compare March 12, 2025 01:38
@guerler guerler force-pushed the add_cell_editor_viz branch 2 times, most recently from 8e5a464 to 3a20af6 Compare March 16, 2025 13:32
@guerler guerler marked this pull request as ready for review March 16, 2025 13:33
@guerler guerler force-pushed the add_cell_editor_viz branch from 9db1a84 to f76c386 Compare March 18, 2025 13:34
@guerler guerler marked this pull request as draft March 18, 2025 15:37
@guerler guerler force-pushed the add_cell_editor_viz branch from f76c386 to 60c88eb Compare March 19, 2025 17:47
@guerler guerler marked this pull request as ready for review March 20, 2025 20:52
@guerler guerler marked this pull request as draft March 21, 2025 13:11
@guerler guerler force-pushed the add_cell_editor_viz branch from d6786c3 to c27bdee Compare March 21, 2025 14:13
@guerler guerler marked this pull request as ready for review March 21, 2025 14:14
@jmchilton
Copy link
Copy Markdown
Member

Thanks for your detailed response on #19226 (comment) - I hadn't seen that until just now. Umm... I think you've addressed my concerns well enough - I still wish we had generic components for a set of charts even if ad hoc plugins are needed generally... but also you're right that these plugins are packaged and installed in a much more robust and forward/backward compatible way than they used to be and maybe this is enough and enough for now.

I think this PR is really beautiful and exciting.


# Matches blocks of various types
GALAXY_FENCED_BLOCK = re.compile(r"^```\s*galaxy\s*(.*?)^```", re.MULTILINE | re.DOTALL)
VISUALIZATION_FENCED_BLOCK = re.compile(r"^```\s*visualization+\n\s*(.*?)^```", re.MULTILINE | re.DOTALL)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Given that galaxy encompasses all sorts of kinds of plugins - it seems disjoint that visualization is sort of standalone - wouldn't this syntax feel more internally consistent if it was galaxy_visualization as the syntax marker. It is a small point though - I think this could be fine despite the brain scratch it gives me.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point — but I think visualization is better here since we don’t actually use any galaxy_-prefixed namespaces elsewhere. That said, I’m open to changing it in a follow-up if it keeps feeling off.

@guerler guerler merged commit 9bde71c into galaxyproject:dev Mar 24, 2025
54 of 57 checks passed
@guerler
Copy link
Copy Markdown
Contributor Author

guerler commented Mar 24, 2025

@jmchilton thank you so much for your review!

@guerler guerler deleted the add_cell_editor_viz branch March 24, 2025 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants