`settings_form` was previously executing the block while still in the
class context. `instance_exec` ensures the block runs with `self` set to
the form instance. As such `settings_form` now behaves like its standard
`form` counterpart, i.e. the following works as expected:
class MySettingsForm < ApplicationForm
settings_form do |f|
f.text_field(name: :my_setting, caption: text_field_caption) # now resolves correctly
end
private
def text_field_caption
"A long caption"
end
end
Also removes `render_inline_form` in favour of the namesake method
provided by upstream Primer.
Renders `AttributeHelpTextComponent` in Primerized forms automatically
if the form model supports attribute help texts and the
`include_help_text: true` option is passed to the form DSL method.
Except the color picker which still uses an angular component.
Also fixed an issue where the "Default value" checkbox could disappear
from the form after submitting with an error in the form.