Repository navigation
Chore/bootstrap 5 - #4813
Merged
Merged
Chore/bootstrap 5#4813
Conversation
The CSS came from the material-sass gem, a Bootstrap 4 based Material Design skin, while the JavaScript already came from the bootstrap gem (Bootstrap 5). Import the bootstrap gem's SCSS instead and drop material-sass and its 'material' script. Bootstrap 5 reads its settings from variables defined before it is imported, so _variables.scss now sets the theme colours (primary/success green, secondary blue, and so on), body colours, font and the site's own breakpoints (lg 1200px, xl 1800px) in Bootstrap's terms, in place of the Material colour maps. media-breakpoint-down(xs) is media-breakpoint-down(sm) in Bootstrap 5. Class names from Bootstrap 3 and 4 that no longer exist are renamed in the commits that follow. Co-Authored-By: Claude Sonnet 5 <[email protected]>
text-left/right -> text-start/end, float-left/right -> float-start/end, ml-/mr-/pl-/pr- -> ms-/me-/ps-/pe-, border-left/right -> border-start/end, dropdown-menu-left/right -> dropdown-menu-start/end, font-weight-* -> fw-*, font-italic -> fst-italic and sr-only -> visually-hidden. Bootstrap 5 dropped text-justify, so the site keeps a one-line rule for it. Co-Authored-By: Claude Sonnet 5 <[email protected]>
badge-info/success/... -> text-bg-info/success/..., which set the background and a readable text colour together, and badge-pill -> rounded-pill. The site's own badge-late, badge-harvest and similar hooks are unchanged. Co-Authored-By: Claude Sonnet 5 <[email protected]>
col-xs-N -> col-N, col-md-offset-N -> offset-md-N, row-fluid -> row, btn-block -> w-100, btn-xs -> btn-sm, form-group -> mb-3 (Bootstrap 5 dropped form-group), and btn-default (Bootstrap 3) -> btn-outline-secondary. The three helpers that combined btn-default with btn-secondary keep just btn-secondary. Co-Authored-By: Claude Sonnet 5 <[email protected]>
.close with a times character -> .btn-close (which draws its own cross), with an aria-label on each. The alert helper said alert-dismissable, Bootstrap 3's spelling; Bootstrap 5 needs alert-dismissible for the close button's spacing. Co-Authored-By: Claude Sonnet 5 <[email protected]>
The label-beside-input forms (label col-md-2, input col-md-8) relied on form-horizontal and form-group acting as a row. Each field wrapper is now a real .row.mb-3, labels are col-form-label, help text is form-text, and the leftover form-horizontal and form-actions classes, which do nothing in Bootstrap 5, are dropped. Co-Authored-By: Claude Sonnet 5 <[email protected]>
…ents form-inline -> flex utilities, embed-responsive -> ratio ratio-16x9, input-group-prepend wrapper removed (Bootstrap 5 puts the addon directly in the group), and media/media-body -> d-flex/flex-grow-1. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Bootstrap 5 differs from the old Material skin in a few defaults that change how every page looks: 1rem body text (the site uses 0.875rem), a 1.5 line height (1.428572), underlined links, and much larger display-* headings (the home page heading was 56px, not 34px). Set them back through Bootstrap's variables. Co-Authored-By: Claude Sonnet 5 <[email protected]>
The brand image was unbounded (the old skin capped the brand at 2.25rem) and the search input collapsed to nothing inside its shrink-to-fit parent. Restore the navbar's minimum height and padding, cap the brand, and give the search group a minimum width. A .btn with no colour variant is plain text in Bootstrap 5 and read as a link; give it the btn-outline-secondary look. Co-Authored-By: Claude Sonnet 5 <[email protected]>
The planting, harvest and activity columns were .col-xl-4.col. Bootstrap 4 wrapped the next row after three even columns at every width below the site's xl breakpoint; Bootstrap 5's .col let the seeds column squeeze onto the same row. Say what was meant: full width on phones, thirds from md up. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Co-Authored-By: Claude Sonnet 5 <[email protected]>
A .dropdown-divider and a dropdown-item Delete link sat in the page body, outside any dropdown, duplicating the Delete in the Actions menu. With the menu open the page has two visible Delete links, and the 'Delete garden' spec, which clicks 'Actions' and then 'Delete', finds both. The Actions menu already has the garden's Delete. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Links are not underlined, so axe's link-in-text-block rule needs enough contrast between a link and the text around it. The old skin's body text was near black (rgba(0, 0, 0, 0.87)); the brown I had used gave 2.28:1 against the link green, below the 3:1 minimum, and failed two accessibility specs. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Typing a scientific name makes the page ask GBIF for suggestions after jQuery UI's 300ms delay. Whether that request lands before Save navigates away is a race the test only usually won, and when it lost, VCR blocked the real request and failed the spec. Answer the suggestion with a double instead. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Br3nda
marked this pull request as draft
September 20, 2026 08:21
The cards from #4808 still used Bootstrap 4 names: .close with a times sign (now .btn-close), sr-only (now visually-hidden), badge-info (now text-bg-info), and dropdown-menu-right next to dropdown-menu-end (only -end is needed). Co-Authored-By: Claude Sonnet 5 <[email protected]>
Bootstrap 5's cards have a thin border, a grey header and a transparent body, so the page background showed through. Set the card variables to white, no border, a 2px radius and the old three-layer shadow, and keep the line under the header. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Bootstrap's dark navbar draws menu links at 55% white, which on the brown navbar is 4.47:1, just under the 4.5:1 minimum. Use 85% white (white on hover). The breadcrumb links were grey in the old skin and are now the link green, 4.12:1 on the beige page; make them a darker grey again. Co-Authored-By: Claude Sonnet 5 <[email protected]>
_variables.scss still set $progress-height: 5em, $progress-bar-color and $progress-bg: white, Bootstrap 3 variables the old skin ignored. Bootstrap 5 reads them, which made every progress bar 52px tall with an invisible white track. Set the height to 0.875rem (as the old bar was), the track to a lighter green and the bar to the site green, and drop the border-bottom trick that drew the old bar. Co-Authored-By: Claude Sonnet 5 <[email protected]>
The chips were solid brown-grey pills with white text, so a row of crops read as a row of dark blobs, and they competed with the blue status badges. Use Bootstrap 5.3's subtle success colours instead: a light green fill and border with dark green text. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Bootstrap 5 makes the text of a .badge white; Bootstrap 4 left it alone. The like button's heart and count sit in a bare badge on a pale button, so they were white on light grey. Set $badge-color to inherit, as before. Co-Authored-By: Claude Sonnet 5 <[email protected]>
The card always rendered a .card-body and a .card-footer. A seed with no details left them empty, and Bootstrap 5 pads them into white bars under the photo. Draw each only when it has something in it. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Bootstrap 5 buttons are flat with a border. Draw them as the old skin did: no border, a Material shadow that deepens while pressed, 2px corners, medium weight and uppercase. Link buttons stay plain. A bare .btn is drawn raised with dark text instead of borrowing the outline style. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Blue while growing, green while harvesting, amber when late, red when very late, grey when finished. The track is now neutral grey so every colour reads against it. Planting#progress_state decides, and the garden cards, planting progress and timeline bars use it. Co-Authored-By: Claude Sonnet 5 <[email protected]>
--bs-secondary is the site's dark blue here, so finished plantings had a blue bar rather than the grey the progress colours call for. Co-Authored-By: Claude Sonnet 5 <[email protected]>
In Bootstrap 5 the close button has an auto left margin, so before the title it sat beside it instead of at the right edge. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Collaborator
|
Pity staging has been busted for a bit and we don't have percy / a screenshot comparison tool in place these days. |
Collaborator
|
Might cherry pick some of the other fixes (487a7c3 for example) ahead of this |
CloCkWeRX
added this pull request to stack #4821
September 21, 2026 08:08
CloCkWeRX
removed this pull request from stack #4821
September 21, 2026 08:15
Member
Author
|
Hoping to get the UI PR in, cos it'll make it easier to enter my spring garden plantings. |
Collaborator
Collaborator
|
I reckon if you tweak the crops show (sign in or sign up) one, the rest.... we can deal with in later PRs |
%badge.text-bg-warning was a <badge> element with a colour and no Bootstrap badge styling, so it rendered as plain text. Co-Authored-By: Claude Sonnet 5 <[email protected]>
It was a solid green active list item holding a green link. Use the light list item, as the other sign in bars are. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Bootstrap 5 picked black text for the old #2196f3 on text-bg-info badges and btn-info buttons, where the site had white. #1976d2 gets white text at 4.6:1, which also passes. Co-Authored-By: Claude Sonnet 5 <[email protected]>
The border was too faint to see, and Bootstrap 5 floated the checkbox to the left edge of centred forms, away from its label. Co-Authored-By: Claude Sonnet 5 <[email protected]>
list-group-item outside a .list-group has no background or border in Bootstrap 5.3, as those come from variables set on .list-group. Wrap the homepage lists and the planting page neighbours in one, white with a light shadow. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Bootstrap 5's chevron is a border triangle, so width: 100% stretched it into a bar. The grid for icon, label and chevron also applied to the sign in and sign up buttons, squeezing their labels into the icon column. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Three across in a half-width column left them narrow enough to wrap mid-word. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Member
Author
|
pushing some fixes |
Collaborator
CloCkWeRX
approved these changes
Sep 21, 2026
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The migration still has state badge styling, mobile navbar sizing, and Bootstrap form-control regressions.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 4
Open (4)
Resolved since last review (2)
|
|
||
| // Bootstrap 5's input-group shrinks to nothing inside a shrink-to-fit parent. | ||
| .input-group { | ||
| min-width: 18rem; |
| %h5 | ||
| %strong= link_to harvest.crop_name, harvest_path(slug: harvest.slug) | ||
| %span.badge.badge-pill= harvest.plant_part_name | ||
| %span.badge.rounded-pill= harvest.plant_part_name |
| - content_for :title, "Edit Photo" | ||
| = form_for(@photo) do |f| | ||
| .form-group | ||
| .mb-3 |
| - if planting.finish_is_predicatable? | ||
| - if planting.super_late? | ||
| %span.badge.badge-info.badge-super-late= t('.super_late') | ||
| %span.badge.text-bg-info.badge-super-late= t('.super_late') |
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.










What changed
The site's CSS now comes from Bootstrap 5.3.8. It used to come from
material-sass, which is Bootstrap 4 with a Material skin.material-sassgem and thematerialscript.bootstrapgem from 5.3.2 to 5.3.8. The gem also supplies the CSS now._variables.scssfor Bootstrap 5. It keeps the site colours and thelgandxlbreakpoints..btnis drawn raised with dark text, because it would otherwise look like a link.Class names
Renamed Bootstrap 3 and 4 classes in the views, helpers and scripts.
text-left,text-right,float-left,float-rightml-*,mr-*,pl-*,pr-*badge-infoand the other badge colours,badge-pillfont-weight-*,sr-only,dropdown-menu-rightform-group,btn-block,btn-xs,btn-defaultcol-xs-*,col-md-offset-*,row-fluidOther markup changes:
.rowper field,col-form-labelandform-text..closebuttons are now.btn-close.alert-dismissableis nowalert-dismissible.form-inline,embed-responsive,input-group-prependandmediaare replaced.Other fixes
_variables.scssmade them 52px tall with a white track. They are now a thin strip on a neutral grey track.Planting#progress_statedecides, and the garden cards, planting progress and timeline bars all use it.What looks different
Progress bars are now coloured by state, and crop chips are light green. Everything else was matched to the old look and measurements.
Testing
dev.Not changed
About 27 class names in the views have no CSS. They had none before either. The static error pages are untouched.