Conversation
…lute pre-commit See twbs/bootstrap#40962 - can hopefully remove these again in a future version of Bootstrap
…accessible The JavaScript bundler (Vite) encapsulates variables in module scope, making them inaccessible to external scripts like module-specific JavaScript files (e.g., multiqc_fastqc.js). This caused 'callAfterDecompressed is not defined' errors. Fixed by explicitly assigning these variables to the window object: - window.callAfterDecompressed (used by module JS files to register callbacks) - window.notEmptyObj (utility function used across modules) - window.mqc_plots (global plot data accessed by multiple files) This ensures backward compatibility with module JavaScript files that expect these as global variables.
…ss names in main MultiQC
Resolved merge conflicts in: - multiqc/modules/fastqc/fastqc.py: Combined status_checks logic from main with bootstrap's series_label - multiqc/plots/plot.py: Added _get_series_label function from main - multiqc/plots/violin.py: Used bootstrap's icon and tooltip syntax for warning messages - multiqc/templates/default/src/js/ai-helpers.js: Combined reasoning model functions from main with bootstrap's window scope - multiqc/templates/default/src/js/plots/box.js: Combined BoxPlot class with sorting event listeners - multiqc/templates/default/toolbox.html: Kept bootstrap's modular template includes structure
|
@multiqc-bot fix linting |
PR Review: Bootstrap UpgradeI've completed a comprehensive review of this PR. Overall, this is a high-quality modernization effort with good architectural decisions. StrengthsCode Quality & Best Practices:
Architecture:
Security ConcernsCRITICAL: Potential XSS vulnerability (multiqc/base_module.py:574-611)The _generate_status_bar_html method generates HTML with unescaped user data: Issues:
Risk: Malicious input in anchors could lead to XSS. Recommendation: Use html.escape() on all anchor values before injecting into HTML. Potential Bugs
PerformancePositive:
Test CoverageConcerns:
Recommendation: Add unit tests for base_module.py:518-611 Recommendations SummaryMust Fix (Security):
Should Fix: Nice to Have: ConclusionThis is a well-architected PR that successfully modernizes the MultiQC frontend. Code quality is high and documentation is excellent. Main concern is the potential XSS vulnerability which should be addressed before merging. Overall Rating: 4/5 stars - Would be 5/5 with XSS fix and better test coverage. Great work on this modernization effort! |
WIP: Updating report front-end
Initial attempt in this PR, but still quite a lot left to do. After an initial burst of speed, I'm expecting this PR to take a while.
To-do
I'll try to add to this list as I think of things. From roughly easy to difficult:
Make the main (left) side nav a Bootstrap offcanvas as well?wontfix - push to another day