All notable changes to this project will be documented in this file.
For more information about changelogs, check Keep a Changelog and Vandamme.
-
[FIX] A tooltip closes when its icon, or the button or link holding it, is clicked
A click that takes the icon away — the sidebar's moon and sun swap places — left the tooltip open with nothing under the pointer to close it, and Popper put it in the page's corner, where a hidden element is. It is closed in the capture phase, before the click's own action changes the page.
-
[FEATURE] A pin or an area on a map leads where its row does
The map controller takes a point as
[lat, lng, href, title]and a place as[id, href, title]. A pin with anhrefis clickable, shows itstitleon hover, and a click follows it through Turbo; an area filled on a boundary layer is followed the same way. A bare[lat, lng]or a bare place ID still draws a pin that leads nowhere.
-
[FIX] A small select's combobox is small too
The button that stands in for a
<select>took the compact size fromform-select-smalone, so a select wearingform-control-sm— which is what a filter beside a search box wears — was replaced by a full-height one. It stood two pixels taller than the trail beside it, which is what set the height of every row it sat in.
-
[FIX] A combobox's search box carries an id
The field that narrows a long menu had neither an id nor a name, which a browser reports as a form field it cannot offer to fill. It takes an id — the select's own where it has one — rather than a name, a name being what would submit a box that narrows a menu in front of a reader rather than asking the server anything.
-
[FEATURE] A box can say what ticking it means
checktakes adescription:, which is the line Bootstrap draws under the words beside a box:form.check :insured, 'Insured', description: 'Uninsured providers are only offered preferred work.'Given none, the markup is what it was.
-
[FEATURE] A field a browser keeps an answer for says which
email_fieldcarriesautocomplete="email"andurl_fieldautocomplete="url", asphone_fieldcarriestelandpin_fieldone-time-code. A page saying otherwise keeps what it says. A password is left alone: whether a browser should offer the one it holds or make a new one is the form's business rather than the field's.
-
[CHANGE] The signup page goes
flowdrew a page no part of Bootstrap names, out of threecontent_forkeys a caller never passes, in rules only one product's onboarding wanted. It belongs to whoever ships that product, and this gem keeps what Bootstrap defines.The two classes the builder writes go with it in name only:
flow-fieldsetis nowbh-fieldsetandflow-fieldisbh-field, both being the form's business rather than a page's, and the spacing of a fieldset stays here with them. -
[CHANGE] The head is the host's to write
bh_head_tagsbundled four metas a page decides for itself with the two files this gem serves, all or nothing.Bh::Engine::PREFIXis where they are served, and a layout links them:<link rel='stylesheet' href='<%= Bh::Engine::PREFIX %>css/bh.css'> <script type='module' src='<%= Bh::Engine::PREFIX %>js/bh.js'></script>
-
[CHANGE]
noticesistoastsIt draws a stack of Bootstrap's toasts and says so.
toastis left for the one a host hands over itself.It takes
data:for a host marking what the page it stands on is about, and a block for one splicing a link into the words a message says. -
[FEATURE] A control says what it is to a reader who meets it alone
Every field the builder dresses carries an
aria-labeloff the attribute it sets, which a page's ownariastill overrides key by key. -
[FEATURE] Money and a share of a hundred are typed into an adorned control
price_fieldandpercentage_fielddraw Bootstrap's adorned control: the unit in a span and the field inside it wearing no border of its own. -
[FEATURE]
file_field, which Rails handed over undressed -
[FEATURE]
confirm_button_toasks before it actsThe bundle draws the question as a dialog, and the form is sent only where it is answered yes.
-
[FEATURE]
tooltip_datais the data an element wearing a tooltip takes -
[FEATURE] A phone field shows the shape it will take
555-555-5555, from the locale rather than the code, since how a number is written is the reader's language and not this gem's. A page saying its own placeholder keeps it.The only field given one: a placeholder is decoration over a label, and it earns its place where it shows a shape a reader could get wrong rather than where it repeats what the label already says. This is the one field where the gem knows the shape, because the gem is what imposes it.
-
[FIX] A menu, a box and a circle wear what Bootstrap 6 draws
A
<select>woreform-select form-select-lg, a ticked boxform-check-input, and the words beside it sat in aform-checkunder aform-check-label. Bootstrap 6 defines none of those: a menu is a control like any other, a box is acheck, a circle is aradio, and the two of them stand in aform-field, which lays them out in a row. Every one of them was drawing undressed.
-
[CHANGE] A picture in a bubble is a thumbnail
Drawn at the height every other picture on these screens is, since what fits beside words is a thing to recognise and click rather than a thing to look at -- and narrower than the bubble whatever shape it is, so a portrait photograph does not make a column of one message.
-
[FIX] A thread's note is opaque and centred
It named a background variable this bundle does not define, so it drew none and the message it holds the top over read through it. And it lost its centring when it gained its stickiness.
-
[FIX] The shell fills the screen in whole pixels
100dvhcomputes to a fraction on a scaled display -- 415.455px against a viewport reporting 415 -- and the tenths over are enough for a browser to draw a scrollbar the page cannot use, beside the one the content it holds already has. The shell takes a percentage of a document given a height instead, which is the same whole number the viewport reports.
-
[FEATURE] A message carries its
photos, drawn in the bubble under its wordsBh::Messagetakes a list of addresses beside its text. Each is drawn under the words in the same bubble, linking to itself in a tab of its own: what fits beside words is rarely what somebody wants to look at. A message carrying pictures and no words is a message all the same, rather than one still being typed. -
[FEATURE]
chat_withtakes anote:, said over the thread rather than in itWhat the conversation is about, or the other way to reach whoever is on the far end of it. Over rather than in, because nobody in the conversation said it and a bubble would claim somebody had. It holds the top while the thread scrolls under it, and carries the page's own background for that reason: a tint would read as somebody's turn, and without one the bubbles would show through.
-
[FEATURE] The nine palettes, served at
/bh/theme/<name>.cssbootstrap,dawn,dracula,gruvbox,monokai,nord,one_dark,solarizedandtokyo_night, each restating all thirteen steps of every Bootstrap family it repaints. They arrived with theschemecontroller in 6.2.0 and the controller had nothing to swap: it reads${path}/${theme}.css, and no such file shipped. Now it does.They are copied beside the stylesheet rather than bundled into it, because a page links one at a time and swaps it for another, which is the whole point of them.
A breaking change that keeps its major on purpose. 6.0 through 6.1.4 were an alpha in
everything but the number — Bootstrap 3 wrappers with a Bootstrap 6 stopgap bolted on,
cut while Bootstrap 6 was itself pre-release — so there is no settled API here to have
broken, and nothing is owed the major a real break would earn. Those numbers are taken
and cannot be withdrawn, RubyGems keeping anything published over thirty days ago, so
6.2.0 steps over them and lands above 6.1.4, where bundle update reaches it.
Until this line settles it breaks on a minor: pin ~> 6.2.0, never ~> 6.
- [BREAKING CHANGE] Everything. Bh is now Bootstrap 6 components rather than Bootstrap 3
wrappers, and no helper of 1.x or 6.1.x survives:
head_tags,script_tags,navbar,navbar_brand,navbar_nav,navbar_toggler,navbar_collapse,navbar_collapsable,card,nav,nav_link_to,nav_link_options_for,table,column,grid,grid_row,grid_column,turbo_link_toandedit_link_toare all gone, along with thebh/_tableandbh/_gridpartials and the loosephone,require,submitandbh--themecontrollers. - [FEATURE]
Bh::FormBuilder, which dresses every field Rails draws and adds the two it has none of:phone_field, shaped as it is typed, andpin_field, the six slots a 6-digit code is typed into. - [FEATURE]
combobox, a<select>drawn as a searchable menu that stays the one thing the form submits. - [FEATURE]
dialog,notices,chat_withandflow. - [FEATURE]
bh_head_tags, and an engine that serves/bh/css/bh.cssand/bh/js/bh.js— one stylesheet and one script, Bootstrap 6 included, built by esbuild and shipped in the gem. - [FEATURE] Twenty-two Stimulus controllers, registered by the bundle, and a Bootstrap dialog
standing in for the browser's
confirm(). - [FEATURE] A dummy app under
test/dummydrawing every helper on one page, whichrails sfrom the root of a clone runs.
- [FEATURE] Point to main boostrap v6 CSS
- [FEATURE] Include Boostrap Icons CSS
- [FEATURE] Added three Stimulus controllers (phone, require, submit)
- [BREAKING CHANGE] The
tablemethod doesn't take theheadersparameter anymore. - [FEATURE] New
columnmethod to define headers and body of atableat once
- Remove class "card-row" from card_body
That's because a card body with card-row does not display correct borders for nested cards
- [BREAKING FIXES] Literally everything changed. Moving from Bootstrap 3 to Bootstrap 6.
- [ENHANCEMENT] Bump versions of asset libraries
- [ENHANCEMENT] Replace
errors.get(:field)witherrors[:field]since the former is deprecated in Rails 5.
- [BUGFIX] Security: don’t always assume that the content of
link_tois safe
Note that this might break your code if it relied on the wrong behavior of
Bh, assuming that the content of link_to was always HTML safe.
For instance, if your app has the following code to display an image with a
link link_to '<img src="logo.png">', '/', then the image will not display
anymore, since Bh now correctly escapes the HTML content (as Rails and Padrino
do). In this case, you should use link_to image_tag('logo.png'), '/' instead.
- [BUGFIX] Correctly align the "X" icon at the right of the field in basic forms
- [BUGFIX] Respect the original behavior of Padrino/Rails when calling
link_towithnilas the name
- [BUGFIX] Do not render the
:offsetoption of the field helpers in the DOM - [BUGFIX] Do not render the
:labeloption of the field helpers in the DOM - [ENHANCEMENT] Add
:label_optionsoption to customize the wrapping label of a field
- [FEATURE] Extend
form_forto be wrapped in - when inside a
nav, just likelink_to - [FEATURE] Extend
button_toto be wrapped in - when inside a
nav, just likelink_to - [BUGFIX] Match default placeholder with label content (therefore supporting localization)
- [ENHANCEMENT] Bootstrappify forms wrapped in
navbar, setting their class to "navbar-form" - [ENHANCEMENT] Add
:helpoption to display a help block after most form fields - [ENHANCEMENT] Bump Bootstrap version to 3.3.2
- [ENHANCEMENT] Bump Font Awesome version to 4.3.0
- [FEATURE] Add support for Middleman and Padrino for all helpers except
form_for - [FEATURE] Extend
button_toto accept the same :content, :size and :layout options asbutton - [DEPRECATION] Deprecate
glyphiconin favor oficon(glyphiconwill still work until version 2.0.0) - [BUGFIX] Don’t override
button_tounless:context,:sizeor:layoutis passed - [ENHANCEMENT] Allow
alert_boxto pass extra parameters to the alert box - [ENHANCEMENT] Allow
button_toto pass extra parameters to the button element - [ENHANCEMENT] Allow
dropdownto display a full-width button when called with{layout: :block, groupable: false} - [ENHANCEMENT] Allow
dropdownto pass:idparameter to the dropdown- [ENHANCEMENT] Allow
modalto pass the:idparameter to the wrapping - [ENHANCEMENT] Allow
modalto pass{button: :class}parameter to the toggle - [ENHANCEMENT] Allow
panelto pass extra parameters to the wrapping - [ENHANCEMENT] Allow
progress_barto pass extra parameters to the wrapping container - [ENHANCEMENT] Allow
progress_barto pass extra parameters to each bar - [ENHANCEMENT] Don’t render anything when
verticalandhorizontalare not wrapped in anavbar - [ENHANCEMENT] Wrap plain content passed to
modalinside the modal body - [ENHANCEMENT] Wrap plain content passed to
panelinside the panel body
- [ENHANCEMENT] Bump Bootstrap version to 3.3.0
- [FEATURE] Add
iconhelper - [FEATURE] Add
font_awesome_csshelper - [FEATURE] Add
dropdownhelper - [FEATURE] Add
progress_barhelper - [ENHANCEMENT] Add
:fieldsetoption to decide whetherfields_forshould wrap fields in a tag - [FEATURE] Add
buttonhelper
- [BUGFIX] Remove
form-controlclass fromfile_field(#20) - [BUGFIX] Allow
record_objectto be passed tofields_for(#22)
- No changes
- [FEATURE] Add
button_tohelper - [FEATURE] Add
navbarhelper
- [FEATURE] Add
navhelper
- [FEATURE] Add
:prefix,:suffixoptions to form field helpers
- [FEATURE] Add
form_forand form helpers for every type of field
- [FEATURE] Add
modal - [FEATURE] Add
panel_row - [FEATURE] Add
panel - [FEATURE] Add
glyphicon
- [FEATURE] Add
bootstrap_css,bootstrap_theme_cssandbootstrap_js
- [FEATURE] Add
alert_boxhelper
- [ENHANCEMENT] Allow