govuk-form-builder
Rails Bootstrap Forms
govuk-form-builder | Rails Bootstrap Forms | |
---|---|---|
5 | 1 | |
70 | 1,628 | |
- | 0.8% | |
8.7 | 7.6 | |
4 days ago | about 2 months ago | |
Ruby | Ruby | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
govuk-form-builder
-
Ask HN: What side projects landed you a job?
I build and maintain some libraries that are used by teams working on GOV.UK projects in Rails. Have been inundated with offers since their release, and they've gone on to be used in some fairly high profile things.
https://github.com/x-govuk/govuk-form-builder
-
USWDS: The United States Web Design System
This is my side project, I'm a dev currently contracting at DfE. This library and the form builder[0] make working with the design system easier for Rails devs.
[0] https://govuk-form-builder.netlify.app/
-
Meme, 2 images
If you dig around on GitHub you'll see most government departments have an organisation where they publish stuff. For example, here's the MoJ, DfE, Cabinet Office.
- Can I make a website entirely with Ruby?
-
Why is uncoupled documentation bad?
This is definitely the best approach in my opinion, providing the people writing the docs are capable of contributing directly.
One of my projects[0] builds and deploys a static documentation site[1] on every push to master. The static site generator (Nanoc, in this case) then pulls in the library and uses it to publish its own documentation. All the examples are snippets of code[2] that are both displayed as-is and eval'd into the final output.
The guide can never be out of sync with the library.
[0] https://github.com/dfe-digital/govuk_design_system_formbuild...
[1] https://govuk-form-builder.netlify.app/
[2] https://github.com/DFE-Digital/govuk_design_system_formbuild...
Rails Bootstrap Forms
-
Rails scaffold templates
Next, let’s change our view templates. I don’t like current ones so I took templates from rails 6.x and updated it for my needs (for bootstrap based project I’ve taken bootstrap_form gem and have changed ujs-dependent code to use hotwire). I’ve created directory lib/templates/erb/scaffold and placed my _form.html.erb.tt, edit.html.erb.tt, index.html.erb.tt, partial.html.erb.tt, new.html.erb.tt, show.html.erb.tt to that location. You can find my code below
What are some alternatives?
scripts-to-rule-them-all - Set of boilerplate scripts describing the normalized script pattern that GitHub uses in its projects.
Simple Form - Forms made easy for Rails! It's tied to a simple DSL, with no opinion on markup.
django-sql-dashboard - Django app for building dashboards using raw SQL queries
Cocoon - Dynamic nested forms using jQuery made easy; works with formtastic, simple_form or default forms
govuk_design_system_formbuild
Formtastic - A Rails form builder plugin with semantically rich and accessible markup.
whitehall - Publishes government content on GOV.UK
Reform - Form objects decoupled from models.
Docusaurus - Easy to maintain open source documentation websites.
ActiveForm - Create nested forms with ease.
datasette - An open source multi-tool for exploring and publishing data
Abracadabra