Draft
Open HTML files in browser instead of rendering inline in Streamlit reports#182
Conversation
Instead of rendering HTML files inline with st.components.v1.html(), generate a st.link_button that opens the HTML in a new browser tab. For local files: base64-encode content and use data URI. For URLs: use the URL directly in the link button. Includes a warning for files >5MB that may not open in all browsers. Update test example files to match new generated output. Agent-Logs-Url: https://github.com/Multiomics-Analytics-Group/vuegen/sessions/92f41025-236f-4474-b854-d26531b1d33d Co-authored-by: enryH <2833836+enryH@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add links to open HTML files from VueGen report
Open HTML files in browser instead of rendering inline in Streamlit reports
Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Viewing complex HTML files (e.g., MultiQC reports, interactive plots) inline via
st.components.v1.html()is constrained by fixed height, sandboxed rendering, and poor UX for large files. This replaces inline rendering with a link button that opens the HTML in a new browser tab.Changes
_generate_html_content: Replacesst.components.v1.html()withst.link_button("Open in browser", ...):data:text/html;base64,...URI; emitsst.warningfor files >5MB that may not open in all browsers_generate_component_imports: Addsimport base64for HTML componentstests/report_examples/regenerated to match new outputGenerated code example (local file)