From 624e9794ac36afb6c4c77c4935713d4a63e8bbca Mon Sep 17 00:00:00 2001 From: Guillem Arias Date: Tue, 19 May 2026 13:43:17 +0200 Subject: [PATCH] fix(design-system): force type=submit on StyledFormBuilder#submit The DS::Button default-type-button change in the previous commit broke every `form.submit "Log in"` callsite because `StyledFormBuilder#submit` (app/helpers/styled_form_builder.rb) renders a DS::Button under the hood with no explicit `type:`. After the default flip, those submit buttons rendered as `type="button"`, so submitting forms (login, password reset, every form using `form.submit`) silently no-ops. CI surfaced this via ~30 system tests failing in the `sign_in` helper, which couldn't get past the login page. Pin `type: "submit"` on the DS::Button rendered by `StyledFormBuilder#submit`. The 22 view-level `f.submit` / `render DS::Button.new(type: :submit, ...)` callers already pass type explicitly and are unaffected. --- app/helpers/styled_form_builder.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/helpers/styled_form_builder.rb b/app/helpers/styled_form_builder.rb index ba3b5f81e..277d34aa3 100644 --- a/app/helpers/styled_form_builder.rb +++ b/app/helpers/styled_form_builder.rb @@ -89,6 +89,7 @@ class StyledFormBuilder < ActionView::Helpers::FormBuilder @template.render( DS::Button.new( text: value, + type: "submit", data: (options[:data] || {}).merge({ turbo_submits_with: "Submitting..." }), full_width: true )