[WIP] Use rails-bootstrap-forms gem for form rendering
Created by: soullivaneuh
This PR is related to #8470 (closed).
The goal is to use rails-bootstrap-form
gem to simplify form rendering on bootstrap.
To do:
-
Install rails-bootstrap-form gem -
Rewrite all form rendering with bootstrap-form helpers (admin section only for the moment, next with another pull requests) -
Wait for btn-group
forms management: bootstrap-ruby/rails-bootstrap-forms#132 -
Wait "HTML help block" issue answer: https://github.com/bootstrap-ruby/rails-bootstrap-forms/issues/211. Concern those forms: -
Wait "Static control without label" issue answer: https://github.com/bootstrap-ruby/rails-bootstrap-forms/issues/212. Concern those forms: -
Wait "Unwanted space with hide_label option on inline form" answer: https://github.com/bootstrap-ruby/rails-bootstrap-forms/issues/214. Concern those forms: -
Wait "Unwanted hidden input on check_box helper with bootstrap_form_tag" answer: https://github.com/bootstrap-ruby/rails-bootstrap-forms/issues/215. Concern those forms: -
Wait "Ability to create radio button without label?" answer: https://github.com/bootstrap-ruby/rails-bootstrap-forms/issues/161. Concern those forms: -
Fix weird css issue: https://github.com/gitlabhq/gitlabhq/pull/9055#issuecomment-88881347 -
Fix bad visibility form rendering on application settings: https://github.com/gitlabhq/gitlabhq/pull/9055#issuecomment-120387485 -
Add some notes on UI best practices documentation [form_for / form_tag / alert_messages / f.primary] -
All tests should be green -
Update CHANGELOG file
Pending questions:
- Should we remove
.form-fieldset
class and add padding by default onfieldset
element? - Is the new form error rendering correct?
- Can Rubocop have custom rules detection? Could be useful to have a
form_for
usage detection, isn't it? (makebootstrap_form_for
required. Usetext_field_without_bootstrap
is necessary) - Should I use static control field for special subforms? (https://github.com/gitlabhq/gitlabhq/pull/9055#issuecomment-87835413)
- No, use
form_group
instead.
- No, use
- OK for using required label css trick? (https://github.com/gitlabhq/gitlabhq/pull/9055#issuecomment-89258863)
Externals links:
Please tell me if I have some other task to do on this subject.
Thanks.