Conversation
…bootstrap-4-reboot
…bootstrap-4-reboot
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.
This PR is a massive lift, because there were big changes between versions 3 and 4 of Bootstrap.
Sorta minimum necessary changes
Every Bootstrap update requires altering the CSS classes used in nearly all our HTML markup (whether in templates or helpers) to the CSS class names for that version of Bootstrap. It also requires updating the Bootstrap SCSS variable names that build the Bootstrap CSS classes, and building and testing new variable maps to get our theme color SCSS variables corresponding to the Bootstrap ones. This is mandatory, because these CSS class names control integration with Bootstrap JS, that is also updated with each version.
Between 3 and 4, there were significant changes required in HTML element nesting and class assignment, particularly in forms, dropdowns, modals and complex elements like carousels. There are nearly none of these nesting changes between 4 and 5, so there it's mostly CSS class name changes and variable name changes. (For example, to account for RTL languages in BS 5, classes including the word "left" or "right" now use "start" and "end". Variable names change to account for new methods of calculating SASS color and spacing variants.)
For the latter reason especially, it seems advisable to do these two updates in one PR. I believe it will save work, and I don't want to be troubleshooting Bootstrap 4 on the live site while i'm trying to get to 5.
Themes
Each theme compounds the work mathematically, so my goal is to put the PR live with a single B&W theme "Coprinus" having a dark and light mode. My idea is to put the majority of users who use the default theme on this theme, and use the cookie to store their light/dark mode preference. Users who have selected "Amanita", our only dark theme, would get the dark mode of "Coprinus" for now.
More colorful themes can be rolled out later; in fact BS 5 just added the ability to have color variants of a single theme, in addition to light and dark. But we need at least one theme that works, to go live.
Nice-to-haves
TODO
CSS - BS 4
Switch gem to Bootstrap 4Update to BS4 css class names in templates and helpers using the migration guideUpdate our JS to work with BS 4Clean up mushroom-observer SCSSRemove BS4 classes added to ease transitionRemove superfluous classes with Bootstrap analoguesConvert classes with breakpoints (sm->md, etc) in columns and othersUpdate matrix table and matrix box markup to use bs4Rename vars in the map that converts theme color vars to bootstrap varsConvert panels to cardsConvert form elementsConvert spinnersCSS - BS 5
Icons
Write icon helpersHelpers
New helpers for buttons with icons, for every type of CRUD actionAlso for descriptionsInteractive Images with overlays for lightbox, voting, etcPresenters
New image presenter for data governing image interactivityCarousel
create carousel template for multiple images in a viewObservationsTop nav, title and tabset
redo sort link bar helperViews
Redo Namings table, modal formsCarouselsInteractive ImagesTests
Switch Lurker integration tests to Capybara from rails-dom-testing, so we can test for new classes