Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Merge requests
  • !9055

Closed
Created Mar 30, 2015 by Administrator@rootOwner1 of 13 tasks completed1/13 tasks
  • Report abuse
Report abuse

[WIP] Use rails-bootstrap-forms gem for form rendering

  • Overview 21
  • Commits 1
  • Changes 24

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:
    • https://github.com/gitlabhq/gitlabhq/blob/master/app/views/admin/applications/_form.html.haml#L17-L21
  • Wait "Static control without label" issue answer: https://github.com/bootstrap-ruby/rails-bootstrap-forms/issues/212. Concern those forms:
    • https://github.com/gitlabhq/gitlabhq/blob/master/app/views/admin/broadcast_messages/index.html.haml#L14-L20
  • Wait "Unwanted space with hide_label option on inline form" answer: https://github.com/bootstrap-ruby/rails-bootstrap-forms/issues/214. Concern those forms:
    • https://github.com/gitlabhq/gitlabhq/blob/master/app/views/admin/groups/show.html.haml#L61-L67
    • https://github.com/gitlabhq/gitlabhq/blob/master/app/views/admin/users/index.html.haml#L24-L28
  • 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:
    • https://github.com/gitlabhq/gitlabhq/blob/master/app/views/admin/projects/index.html.haml#L6-L24
  • Wait "Ability to create radio button without label?" answer: https://github.com/bootstrap-ruby/rails-bootstrap-forms/issues/161. Concern those forms:
    • https://github.com/gitlabhq/gitlabhq/blob/master/app/views/admin/services/_form.html.haml
  • 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 on fieldset 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? (make bootstrap_form_for required. Use text_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.
  • OK for using required label css trick? (https://github.com/gitlabhq/gitlabhq/pull/9055#issuecomment-89258863)

Externals links:

  • https://github.com/bootstrap-ruby/rails-bootstrap-forms

Please tell me if I have some other task to do on this subject.

Thanks.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: github/fork/soullivaneuh/bootsrap-form