-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Use rails-bootstrap-forms gem for form rendering #9055
Conversation
I saw that sometime Code: https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/stylesheets/generic/forms.scss#L84-L86 Why not put this margin by default on fieldset? |
95d73e4
to
91fd559
Compare
Can't convert btn-group to bootstrap-form at the moment because it's not managed. Example here: https://github.com/gitlabhq/gitlabhq/blob/master/app/views/admin/application_settings/_form.html.haml#L45-L52 Issue opened, waiting for news: bootstrap-ruby/bootstrap_form#132 |
Invisible fields and label on error is due to this overridden variable used by But If I disable it, alert text-color are not white anymore. Any suggestion? |
91fd559
to
aacdca6
Compare
aacdca6
to
aef334c
Compare
Can Rubocop have custom rules detection? Could be useful to have a |
Looks awesome. code looks clean |
Yes @randx I think so too. The less code you have to do, the happier developer you will be. A good developer is a lazy developer, remember that! ;) 👍 |
aef334c
to
cbf2723
Compare
Just made group forms. Have to use Not the same padding on avatar form because of What do you think? Don't know for the moment if I can do better with this lib. Any suggestion? |
I am not sure I understand :) |
What did you not understand @randx? Surely by mad english... ;) |
cbf2723
to
b14440c
Compare
Find a way to fix that. Use |
b14440c
to
f861f03
Compare
Got some UI issue on inline form without label. See related created issue: bootstrap-ruby/bootstrap_form#214 |
@soullivaneuh cool. I didnt understand what padding you talked about. But does not matter - glad you managed to fix it |
f861f03
to
502edc7
Compare
Got some strange html render with checkbox tag (not form_for). Issue created: bootstrap-ruby/bootstrap_form#215 |
502edc7
to
0398970
Compare
Just updated admin service templates. Was this before: And after: Seems good for you? Please not the double "Active" label. On issue is pending about that here: bootstrap-ruby/bootstrap_form#161 |
85586ed
to
98737bf
Compare
Just updated the admin users form. I also taken profit to introduce the required label css tricks: https://github.com/bootstrap-ruby/rails-bootstrap-forms#required-fields This will add a So we turn the old manual To this: More cleaner isn't it? 👍 More cooler, this will be automatically applied on every required field of each form using Are you OK with this? You can see the related edited css here: https://github.com/gitlabhq/gitlabhq/pull/9055/files#diff-8173fb057f92d7588e1800c179fe111cR46 Regards. |
Cool! |
@soullivaneuh i am a bit afraid that PR will be hard to complete and review since it touches every single form in application. Maybe we can do it step by step converting several forms per PR? |
@soullivaneuh I like the small tweaks this PR brings to the UI :) Great job so far! |
85bf3b8
to
29599b3
Compare
@jvanbaarsen Thanks! 😄 The admin section is completely rewritten but some rails-bootstrap-forms issues still have to be resolved before merge this PR. So I'm blocked for continuing. @randx Maybe another solution. Keep continue the integration of another sections on this PR but with one commit by section. With this method, you could see and review the change section by section just by clicking to the concerned commit. If you find this interesting, I can setup a demo of my PR for easier reviewing. What do you think? Regards. |
@soullivaneuh I want to merge reviewed parts so I propose you just create another PR on top of this branch with next section. When I merge this one - it will be only uniq changes per section in next PR
thank you. I think its not needed - I will use localhost to check |
So try to fix tests here and prepare it for review before starting new section |
Yes will do that. After this, I will separate section by subPRs directly on my form. With that, you could review it easily. After review, I'll just have to merge all my subPR and then, this one. This method will be easier for me if I have to modify the main branch. Are you OK for that? |
29599b3
to
3d1dd03
Compare
I can't run test on my local, got the following error:
Any idea? |
Run it again. :) |
@soullivaneuh Are you still working on this? |
@jvanbaarsen Yes. Sorry I have not lot of time at this moment (apartment search). I think I will go back actively on this PR in two weeks maximum. Regards. |
Good luck with your search! |
Personally I'd prefer simple_form using its Bootstrap-specific initializer. That way we're less tightly coupled to Bootstrap for the future. |
BTW I already changed a lot of template. I would prefer to keep it as is unless other collaborators wants to change too. |
@soullivaneuh I believe @randx agreed on this approach, so I think you can continue this way :) |
It's part of the Bootstrap initializer: https://github.com/plataformatec/simple_form/blob/master/lib/generators/simple_form/templates/config/initializers/simple_form_bootstrap.rb |
@randx What do you think? I would propose to continue the way @soullivaneuh has already been taken. The argument from @tsigo "That way we're less tightly coupled to Bootstrap for the future." is not really valid, since when we would change from bootstrap, we would have way bigger problems then just our form library (like our entire HTML markup). |
@jvanbaarsen I agree with you. First, I can not imagine GitLab without bootstrap. And seconds @soullivaneuh already did quite big amount of work already. It would be waste if we loose this progress. I am absolutely ok with |
Ok so I continue on this way. 👍 |
3d1dd03
to
03a401f
Compare
Hi @soullivaneuh Do you have time to come back to this? |
@dblessing I nearly finish admin section. But vendor bugs are still here. Maybe it would be better to juste let bootstrap-form implementation, configuration and documentation and continue integration on another PRs. |
ping @dblessing |
This merge request has been closed because a request for more information has not been reacted to for more than 2 weeks. If you respond and conform to the merge request guidelines in our contributing guidelines we will reopen this merge request. |
@jvanbaarsen AFAIK, I'm still waiting an answer of @dblessing. |
This PR is related to #8470.
The goal is to use
rails-bootstrap-form
gem to simplify form rendering on bootstrap.To do:
btn-group
forms management: Possible to style checkboxes / radios as buttons? bootstrap-ruby/bootstrap_form#132Pending questions:
.form-fieldset
class and add padding by default onfieldset
element?form_for
usage detection, isn't it? (makebootstrap_form_for
required. Usetext_field_without_bootstrap
is necessary)form_group
instead.Externals links:
Please tell me if I have some other task to do on this subject.
Thanks.