Added documentation support to Skyline Tool Store#610
Added documentation support to Skyline Tool Store#610brendanx67 merged 7 commits intorelease25.11-SNAPSHOTfrom
Conversation
* Extract docs from tool-inf/docs/ in uploaded ZIPs and serve via WebDAV * Carry forward docs from previous version when new ZIP has none * Show "Online Documentation" link in Documentation box when docs exist * Skip tool-inf/docs/ images during icon extraction * Exclude docs dir from supplementary file listings * Fall back to /home/support when no tool-specific support board exists Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds support for tool-provided HTML documentation in the Skyline Tool Store by extracting tool-inf/docs/ from uploaded ZIPs, serving it via WebDAV, and surfacing an “Online Documentation” link on the tool details page. Also improves upload behavior by carrying documentation forward across versions, prevents docs images from being mistaken as the tool icon, hides docs from supplementary listings, and adjusts Support Board fallback behavior.
Changes:
- Extract
tool-inf/docs/into adocs/folder under the tool’s file root and (when missing) copy forward docs from the previous version. - Add “Online Documentation” link in the tool details UI when
docs/index.htmlexists. - Prevent docs content from affecting icon selection and exclude
docsfrom supplementary file listings; add Support Board fallback to/home/support.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
SkylineToolsStore/src/org/labkey/skylinetoolsstore/view/SkylineToolDetails.jsp |
Adds Support Board fallback selection and conditionally displays an “Online Documentation” link. |
SkylineToolsStore/src/org/labkey/skylinetoolsstore/model/SkylineTool.java |
Adds helpers to detect docs presence and compute the WebDAV URL to docs/index.html. |
SkylineToolsStore/src/org/labkey/skylinetoolsstore/SkylineToolsStoreController.java |
Skips tool-inf/docs/ during icon discovery, extracts docs from ZIPs (with zip-slip protection), copies docs forward when absent, and excludes docs from supplementary file basenames. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
SkylineToolsStore/src/org/labkey/skylinetoolsstore/view/SkylineToolDetails.jsp
Outdated
Show resolved
Hide resolved
SkylineToolsStore/src/org/labkey/skylinetoolsstore/view/SkylineToolDetails.jsp
Outdated
Show resolved
Hide resolved
SkylineToolsStore/src/org/labkey/skylinetoolsstore/SkylineToolsStoreController.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
… tool ZIP Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…ded /_webdav string - Fixed hasDocumentation() to use Files.exists() instead of new File().exists() - getLocalPath() returns Path directly instead of converting to File - Updated getSupplementaryFileBasenames() to use Files.list() instead of File.list() - Refactored extractDocsFromZip() to use NIO Path - Use FileUtil.copyDirectory(Path, Path) to copy docs from previous tool version
There was a problem hiding this comment.
Pull request overview
This PR adds first-class support for tool-provided HTML documentation in the Skyline Tool Store by extracting tool-inf/docs/ from uploaded ZIPs, serving it via WebDAV, and exposing it in the tool details UI, while also preventing docs assets from interfering with icons and supplementary file listings.
Changes:
- Extract
tool-inf/docs/into each tool’s file rootdocs/directory (with zip-slip protection) and optionally carry docs forward from the prior version. - Add an “Online Documentation” link on the tool details page when
docs/index.htmlexists, and exclude thedocsdirectory from supplementary file lists. - Prevent icon extraction from accidentally selecting images located under
tool-inf/docs/, and add a fallback support-board destination (/home/support) when a tool-specific board doesn’t exist.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
SkylineToolsStore/src/org/labkey/skylinetoolsstore/view/SkylineToolDetails.jsp |
Adds support board fallback logic and conditionally renders an “Online Documentation” link in the Documentation box. |
SkylineToolsStore/src/org/labkey/skylinetoolsstore/model/SkylineTool.java |
Adds hasDocumentation() and WebDAV-based getDocsUrl() to support UI linking to extracted docs. |
SkylineToolsStore/src/org/labkey/skylinetoolsstore/SkylineToolsStoreController.java |
Implements docs extraction/carry-forward, excludes docs from supplementary listings, and avoids using docs images as tool icons. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
SkylineToolsStore/src/org/labkey/skylinetoolsstore/SkylineToolsStoreController.java
Show resolved
Hide resolved
SkylineToolsStore/src/org/labkey/skylinetoolsstore/model/SkylineTool.java
Show resolved
Hide resolved
* Eliminated supportTarget variable by reusing toolSupportBoard directly Co-Authored-By: Claude <noreply@anthropic.com>
* Screen readers can now distinguish download buttons by tool name Co-Authored-By: Claude <noreply@anthropic.com>
Summary
tool-inf/docs/from uploaded tool ZIPs and serve HTML documentation via WebDAV (/_webdav/.../@files/docs/)docs/index.htmlexiststool-inf/docs/so screenshot PNGs don't replace the tool icondocsdirectory from supplementary file listings/home/supportwhen no tool-specific support board exists, so new tools default to the Skyline support boardTest plan
tool-inf/docs/— docs extracted, "Online Documentation" link appears, renders correctly in new tab/home/supportfor tools without a dedicated support boarddocsdirectoryCo-Authored-By: Claude noreply@anthropic.com