Add Bootstrap 6 support (v6.0.0.alpha1, tracking v6-dev)#302
Draft
pardeyke wants to merge 5 commits into
Draft
Conversation
Tracks the upstream twbs/bootstrap `v6-dev` branch.
- SCSS: Bootstrap 6 uses the Sass module system, so consumers now use
`@use "bootstrap"` (with `... with (...)` for overrides). Requires a
Dart Sass engine; sassc-rails stays a listed engine option but cannot
compile the v6 stylesheets.
- JS: ES-module only (no UMD / no `window.bootstrap` global), loaded via
importmaps. Ships the self-contained `bootstrap.bundle.{js,min.js}`
(inlines Floating UI + vanilla-calendar-pro) plus the individual modules,
and vendors a self-contained `@floating-ui/dom` build (`floating-ui.js`).
Dropped the popper_js runtime dependency.
- Updater: fixed exact-branch ls-remote resolution, follows only relative
ES-module imports, ships the dist bundles, vendors Floating UI, and adds
a `rake update_scss` (skip-JS) task.
- Added a headless-browser JavaScript smoke test.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Re-import the latest v6-dev dist files.
Adds a scheduled GitHub Action that re-imports the latest dist from the tracked upstream branch (default v6-dev) each day, syncs the gem version to upstream's package.json, verifies the stylesheets compile, and commits any changes. Adds a `rake sync_version` task it relies on. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…pdate outputs The scheduled job's `git add -A` swept up test/gemfiles/.bundle/config (created by CI's bundle install) because .gitignore only ignored the root /.bundle. Ignore .bundle/ anywhere and limit the auto-commit to assets and version.rb.
Bootstrap 6 stylesheets use the Sass module system and the CSS if()/sass() syntax (see _functions.scss contrast-ratio), which only a recent Dart Sass can compile. On the older-version CI jobs — every sassc-rails gemfile, plus the dartsass gemfile on Ruby < 3.1 where an older sass-embedded resolves — test_precompile and test_visit_root failed with SassC::SyntaxError. Add a small engine-capability probe that compiles a snippet of the same syntax (not Bootstrap itself, so real Bootstrap regressions on capable engines still fail) and skip the two stylesheet tests when the engine cannot handle it. The JavaScript ESM smoke tests are engine-independent and keep running everywhere. Also raise the Ferrum process_timeout to 60s to match the cuprite driver config: Chrome intermittently takes over 30s to start on loaded CI runners (seen as Ferrum::ProcessTimeoutError). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Updates the gem to Bootstrap 6 (
v6.0.0.alpha1), trackingtwbs/bootstrap@v6-dev.Upstream's move to the Sass module system and ES-module-only JavaScript changes
how the gem's assets are consumed:
@use "bootstrap"(with... with (...)forvariable overrides) instead of
@import. Compiling requires a Dart Sassengine;
sassc-railsstays a listed engine fallback but libsass cannotcompile the v6 stylesheets.
window.bootstrap), loaded viaimportmaps; the
bootstrap-sprocketsmanifest is removed. Popper is replacedby a vendored
@floating-ui/dom, dropping thepopper_jsdependency — thegem now has no runtime dependencies. Ships the self-contained
bootstrap.bundle.{js,min.js}plus individual component modules.rake updatehandles the v6-dev layout (exact-ref resolution,ES-module import graph, dist bundles, vendored Floating UI). A daily GitHub
Actions workflow keeps the assets in lockstep with upstream while v6 is in
alpha (can be dropped if unwanted).
Backward compatibility
required_ruby_versionand dependency floors are unchanged (onlypopper_jsremoved,
webrickdev dep added). The full CI matrix and all test gemfiles arekept; on engines that cannot compile v6 stylesheets (libsass, older Dart Sass
on Ruby < 3.1) the stylesheet tests skip via an engine-capability probe.
Testing
New headless-browser smoke test covers the ESM bundle and importmap paths.
Full 39-job CI matrix is green:
https://github.com/pardeyke/bootstrap-rubygem/actions/runs/28580125070