Skip to content
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

Builder configuration #73

Closed
3 tasks done
peteryates opened this issue Dec 3, 2019 · 0 comments
Closed
3 tasks done

Builder configuration #73

peteryates opened this issue Dec 3, 2019 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@peteryates
Copy link
Member

peteryates commented Dec 3, 2019

The form builder currently makes several choices on things like default label sizes, legend sizes, tags and the localisation schema (#68). There should be an option to override them so that the builder can be made to work better with a variety of projects.

Ideally the config should look something like this:

GOVUKDesignSystemFormBuilder.configure do |config|
  config.default_label_size          = 'm'
  config.default_legend_size         = 'l'
  config.default_legend_tag          = 'h3'
  config.default_localisation_schema = %i(activerecord attributes)
  config.default_submit_button_text  = 'Make it so'
end
  • Build the ability to load and use configuration, ensure it works when run from a Rails initialiser
  • Integrate label and legend formatting options with the configuration
  • Document and provide examples
@peteryates peteryates added the enhancement New feature or request label Dec 3, 2019
@peteryates peteryates added this to the Version 1.1.0 milestone Dec 3, 2019
peteryates added a commit that referenced this issue Dec 14, 2019
peteryates added a commit that referenced this issue Dec 14, 2019
The method grabs the values from the config object

Refs #73
peteryates added a commit that referenced this issue Dec 14, 2019
This makes interacting with the configuration from the helper classes
much cleaner

Refs #73
peteryates added a commit that referenced this issue Jan 9, 2020
peteryates added a commit that referenced this issue Jan 9, 2020
The method grabs the values from the config object

Refs #73
peteryates added a commit that referenced this issue Jan 9, 2020
This makes interacting with the configuration from the helper classes
much cleaner

Refs #73
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant