Skip to content

fix: respect override for submit_label in Confirm.Input component#717

Merged
jimsynz merged 1 commit intoteam-alembic:mainfrom
nallwhy:fix/confirm-input-submit-label-override
Feb 18, 2026
Merged

fix: respect override for submit_label in Confirm.Input component#717
jimsynz merged 1 commit intoteam-alembic:mainfrom
nallwhy:fix/confirm-input-submit-label-override

Conversation

@nallwhy
Copy link
Copy Markdown
Contributor

@nallwhy nallwhy commented Feb 15, 2026

Problem

The Confirm.Input component's submit_label ignored user-configured overrides.
Setting set :submit_label, "Verify Email" (or any custom value) in an override
module had no effect — the component always returned the hardcoded default
("Confirm Your {field}").

Fix

Check override_for/2 first and fall back to the default only when no override is set:

|> assign_new(:submit_label, fn ->
  fn strategy ->
    override_for(assigns.overrides, :submit_label) ||
      humanize("confirm your #{Enum.at(strategy.monitor_fields, 0)}")
  end
end)

Copilot AI review requested due to automatic review settings February 15, 2026 12:56
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes a bug in the Confirm.Input component where the submit_label property ignored user-configured overrides. Previously, the component always returned a hardcoded default label ("Confirm Your {field}"), even when users set custom values via override modules.

Changes:

  • Modified submit_label assignment to check for overrides first before falling back to the default humanized value
  • Aligns the Confirm.Input component with the override pattern used consistently across other components like MagicLink.Input

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jimsynz jimsynz merged commit d6607b5 into team-alembic:main Feb 18, 2026
29 of 30 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.

3 participants