Skip to content

switch to custom plotly bundle in bootstrap-upgrade branch#3365

Merged
ewels merged 1 commit intoMultiQC:bootstrap-upgradefrom
mashehu:switch-to-costum-bundle-with-bootstrap-upgrade
Oct 20, 2025
Merged

switch to custom plotly bundle in bootstrap-upgrade branch#3365
ewels merged 1 commit intoMultiQC:bootstrap-upgradefrom
mashehu:switch-to-costum-bundle-with-bootstrap-upgrade

Conversation

@mashehu
Copy link
Collaborator

@mashehu mashehu commented Oct 17, 2025

same as #3364 but for bootstrap-upgrade branch

Copy link
Member

@ewels ewels left a comment

Choose a reason for hiding this comment

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

This is great, thank you!

Merging now, but it'd be fab if you could describe how you did it so that we can document in the code somewhere for the future.

@ewels ewels merged commit 381aef7 into MultiQC:bootstrap-upgrade Oct 20, 2025
2 of 7 checks passed
ewels added a commit that referenced this pull request Oct 22, 2025
* Initial structural work to use SCSS for CSS compilation, with new Bootstrap 5.3

* Silence depreciation warnings in the CSS compilation so as not to pollute pre-commit

See twbs/bootstrap#40962 - can hopefully remove these again in a future version of Bootstrap

* Initial structural work for bootstrap5 JS - use Vite for build

* First stab at converting BS3 -> BS5 for HTML in default template

* Document config.development

* Updates for other templates that use default as a base

* Update CLI docs for --development now that vite minimises

* Fix: Make callAfterDecompressed, notEmptyObj, and mqc_plots globally 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.

* Make common JS functions global scope

* Add file for bootstrap variables. Overwrite table background colour.

* Get the toolbox to show properly, use md icons instead of emoji

* Start converting hardcoded hex values in custom.css to BS CSS variables

* Minor cleanup

* Smaller base font size. Outline buttons instead of secondary.

* Update how SVG icons are handled, remove all traces of glyphicons

* Fix scoping errors in JS for AI summaries

* Fix buttons that launch modal windows

* New icon for violin plots

* Improve pre-commit build step

* Fix old BS3 form-inline forms

* Start work on toolbox: use offcanvas and BS list group

* Refactor: Split toolbox javascript into multiple files

* Prettier: also format jinja template files

* Prettier formatting

* Fix prettier error

* Initial effort: dark mode toggle

* Replace toast JS library with native Bootstrap toasts

* Nav: make version a link, go to top of page

* Fix 'scroll to top' button

* Start work on fixing the toolbox

* Working on fixing up the sidebar

* Fix toolbox on mobile

* Seqera SVG logos that work in dark mode

* Fix up the footer styling and CSS

* Start small-scale tweaking: buttons

* Make plotly plots respond to theme toggle

* Light-mode plotly python config for exports

* Transparent backgrounds for HTML by default, white only for export

* Work on custom themes by having 2 bootswatch examples

* simplify vite now that the old toast library is gone

* custom.scss - tidy up without changes

* Directly use bootstrap SCSS vars, not var()

* Custom CSS - remove nearly all hardcoded colour and replace with BS variables

* Switch hardcoded border attributes

* Back to css variables to handle dark mode switch

* Don't hardcode fonts

* Start cleaning custom css. Restyle toolbox: about

* No hardcoded breakpoints. More cruft removal

* Clean up some prefixes, some css

* Nicer toolbox buttons in mobile nav

* Update / fix the icon for the side nav toggle button

* More cruft cleaning in custom.scss

* Tidy up footer CSS

* Cleanss

* More tweaking till my brain melts

* Finally figure out how to make child theming work properly

* Bunch of work on getting themes to work properly, improvements to plotly dark mode and more

* Nicer tooltips in dark mode

* Violin plot axes coloured properly on first render

* Dark mode improvements for the violin plot

* Violin plot tooltips - dark mode

* Fix toolbar, allow overflow scroll. Tidy assets.

* Headings top-margin

* Load Seqera AI icon from single file, prefix localstorage dark mode toggle with mqc

* Start working through the toolbox HTML and CSS

* Break toolbox into separate template files

* Update toolbox: hide samples

* Fix AI toolbox errors introduced in AI refactoring, improve layout

* Move AI logos into asset files. Make them work in dark mode.

* Clean up a lot of the AI summary styling

* Update bootstrap tooltips, more AI summaries clean up

* Fix / improve regex help modal. Clean up a load of old CSS

* Fix / update export toolbox pane

* Fix / update export toolbox pane

* Update the citations toolbox tab

* Final tidying on custom.scss

* Start working on the fastqc status bars

* Fix FastQC progress, popover and tooling. And DOIs and some other stuff.

* Make FastQC statuses a generic MultiQC feature

* Table scatter plots: fix for dark mode

* Remove unused javascript variables

* Small refactor theme watcher. Remove update plots call on first load

* Fix bug for dark mode on page load

* Fix plot export button functionality

* Remove last reminants of glyphicons

* Rename theme 'crazy' to 'disco'

* Add back the old template, called 'original'

* Proper spacing in welcome header

* switch to custom plotly bundle in bootstrap-upgrade branch (#3365)

* Don't import unused bootstrap SCSS

* Add description of plotly custom bundle build

* Remove typo $ symbol

* Several small dark mode fixes

* Mixture of module-specific colour fixes for dark mode

* Fix expand / collapse table button

* Disco: remove SCSS imports for unused bootstrap components

* AI summaries: format highlighted text even when not a sample ID

* AI summary highlight colours that work in both themes

* Fix 'scroll to top' button

* Disco SCSS formatting

* Add some custom CSS to 'original' to try to cater for Bootstrap 5 class names in main MultiQC

* Revert changes in templates that inherit from 'original'

* Add a .gitattributes to mark generated files

* Run pre-commit / prettier on all files

* Try to fix CI tests

* Add prettier itself to the hook dependencies

* Pin prettier dep version

* Try fixing CI error with pre-commit jinja plugin

See https://stackoverflow.com/questions/78708497/prettier-plugins-not-found-with-pre-commit

* Docs tweaks

* Ok fine maybe that does need single quotes after all?

---------

Co-authored-by: Matthias Hörtenhuber <mashehu@users.noreply.github.com>
@ewels ewels added this to the v1.32 milestone Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants