Skip to content

Library readme markdown support#21064

Open
dannon wants to merge 22 commits into
galaxyproject:devfrom
dannon:library_markdown
Open

Library readme markdown support#21064
dannon wants to merge 22 commits into
galaxyproject:devfrom
dannon:library_markdown

Conversation

@dannon

@dannon dannon commented Oct 15, 2025

Copy link
Copy Markdown
Member

Work from @tcollins2011 at GCC2025 Hackathon -- I rebased this and made a few tweaks.

image

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • 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.

@github-actions github-actions Bot added this to the 26.0 milestone Oct 15, 2025
@dannon
dannon marked this pull request as draft October 15, 2025 13:12
@jmchilton

Copy link
Copy Markdown
Member

That is such a clever idea - I love it.

@guerler guerler modified the milestones: 26.0, 26.1 Jan 25, 2026
tcollins2011 and others added 19 commits June 4, 2026 16:31
- Fix Vue watcher to track readme_raw properly
- Use separate data property for rendered content
- Remove unused backend rendering code
- Add .markdown extension support
Moved all CSS from library-folder-table.css into LibraryFolder.vue as scoped styles. Better organization and keeps everything in one place.
Add DOMPurify sanitization to rendered markdown content from library README files. The markdown renderer doesn't sanitize HTML by default, which could allow malicious scripts in uploaded README files.
- Remove unused markdown import
- Fix readme_raw default value to None instead of empty string to match schema
- Update type hint to str | None for consistency
Implemented toggle button in toolbar with split-pane display (2:1 ratio) for README viewing, mirroring the workflow README pattern. README panel slides in from the right when toggled, showing content side-by-side with the library folder table. Table columns adjust responsively to fit the allocated space.
Previously README only appeared on pages where the file was listed.
Now uses a targeted query to find README independently of pagination.
The button now shows disabled state with 'No README available' tooltip
when there's no README content. The panel only displays when both the
toggle is on and README content exists. Toggle state persists across
folders so README automatically shows when navigating to folders that
have one.
renderReadme was calling this.sanitize, which isn't defined in this
component -- switch to the imported purify helper the rest of the file
already uses for sanitization.
@dannon
dannon force-pushed the library_markdown branch from d8d25b2 to f742e99 Compare June 4, 2026 21:47
dannon added 3 commits June 4, 2026 18:53
Move the func/select import to the top of the module instead of inside
the index method, and drop the redundant 'r' mode on the README open().
Covers both the empty case (no readme_raw) and a folder containing a
README.md markdown dataset surfaced through the folder contents metadata.
@dannon
dannon marked this pull request as ready for review June 18, 2026 16:39
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.

4 participants