Skip to content

Form submit text - #84

Merged
thomasgallagher merged 4 commits into
mainfrom
form-submit-text-and-container-borders
May 16, 2026
Merged

Form submit text#84
thomasgallagher merged 4 commits into
mainfrom
form-submit-text-and-container-borders

Conversation

@thomasgallagher

Copy link
Copy Markdown
Collaborator

No description provided.

Allows overriding the submit button text via a new `submit:` keyword
argument, defaulting to "Submit".
The left navigation slides in as an overlay on mobile; the right border
only makes sense when it acts as a sidebar at md and above.
@claude

claude Bot commented May 16, 2026

Copy link
Copy Markdown

Review

Adds a configurable submit: parameter to l_ui_form, replacing the previously automatic context-aware button label ("Create" for new records, "Save" for persisted ones) with a fixed default of "Submit". Also adds border-r/border-l borders to the navigation and panel slide-over containers.

Issues

Severity File Line(s) Description
MEDIUM app/helpers/layered/ui/form_helper.rb / _form.html.erb helper:12, partial:13 The previous default (record.new_record? ? "Create" : "Save") was contextually correct and required no caller effort. The new default "Submit" is less informative and pushes the burden of choosing meaningful text onto every caller. Since record is already available in the partial, a better default would be submit: nil with the partial falling back to `submit

Verdict

🟧 Ship (with known minor issues) - No bugs or safety issues; the only concern is the loss of the automatic contextual button label, which is a pre-release breaking change worth revisiting before 1.0.

`submit:` now defaults to nil, with the partial falling back to "Create"
for new records and "Save" for persisted ones - matching the prior
behaviour while still allowing callers to override.
@claude

claude Bot commented May 16, 2026

Copy link
Copy Markdown

Review

Adds an optional submit: parameter to l_ui_form for customising the submit button label, and adds right/left borders to the navigation sidebar and panel container respectively.

No issues found. The submit local is correctly wired through the helper into the partial, the fallback logic (submit || (record.new_record? ? "Create" : "Save")) is sound, and the partial is only ever rendered via the helper so there is no risk of the new local being undefined. The CSS border additions are scoped correctly (md:border-r for the navigation, always-on border-l for the panel which is off-screen until activated).

Ship

@thomasgallagher
thomasgallagher merged commit 07fbe31 into main May 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant