bootstrap-ruby / bootstrap_form

Official repository of the bootstrap_form gem, a Rails form builder that makes it super easy to create beautiful-looking forms using Bootstrap 5.
MIT License
1.64k stars 352 forks source link

Bootstrap 5.3: Deprecated the .text-muted utility and $text-muted Sas… #730

Open rocket-turtle opened 1 month ago

rocket-turtle commented 1 month ago

…s variable. It’s been replaced by .text-body-secondary and $body-secondary-color.

https://getbootstrap.com/docs/5.3/migration/

lcreid commented 1 month ago

I'll take a look at these test failures, but if you have any ideas, please post them in the comments.

rocket-turtle commented 4 weeks ago

I'll take a look at these test failures, but if you have any ideas, please post them in the comments.

Locally I had some problems with sqlite3 and changed the common.gemfile.


diff --git a/gemfiles/common.gemfile b/gemfiles/common.gemfile
index 5b838b7..485c3fa 100644
--- a/gemfiles/common.gemfile
+++ b/gemfiles/common.gemfile
@@ -15,7 +15,7 @@ group :test do
   gem "diffy"
   gem "equivalent-xml"
   gem "mocha"
-  gem "sqlite3"
+  gem "sqlite3", "~> 1.4"
 end

 group :development, :test do

But I did not investigate it further so I don't know if thats the best fix.

rocket-turtle commented 4 weeks ago

Thanks for catching this, and submitting a PR. It's much appreciated.

If I understand correctly, changing the class used in the gem means people will have to use at least Bootstrap 5.3 for this to work.I think that's fine, but could you please also update the installation instructions in the README to say version 5.3, please? Thanks in advance.

Hi @lcreid,

thank you for your review. You are right, .text-body-secondary is only available in Version 5.3. It got added here https://github.com/twbs/bootstrap/commit/fc3f4b67d65c575daa661ecf31cf59b4ff3cced5#diff-701ebf68cffe2c2d035f6d854c48914591a3a344c36e955dab0a261e623beb30. I thought it was there for a longer time. I can update the Readme but I think this change is to small to "force" users to update to Bootstrap 5.3.

Deprecated .text-muted will be replaced by .text-body-secondary in v6.

Maybe we can leave the PR open and tag it with Bootstrap 6.

What do you think?

lcreid commented 3 weeks ago

That's an excellent suggestion! Thank you! I will tag this -- the first PR/Issue for Bootstrap 6.

Bonus marks if there were a way to identify the Bootstrap version in use, and use the right class, but I'm not optimistic that that would be practical or even possible.hat