Skip to content

fix: keep numeric input fields to a single line - #2689

Merged
ethicnology merged 2 commits into
developfrom
fix/numeric-input-single-line
Aug 18, 2026
Merged

fix: keep numeric input fields to a single line#2689
ethicnology merged 2 commits into
developfrom
fix/numeric-input-single-line

Conversation

@wired-pasteque

Copy link
Copy Markdown
Collaborator

Numeric fields (payjoin min amount/expire, autoswap thresholds etc) grew empty lines on Enter because BBInputText overrode Flutter's maxLines default of 1 with null.

Fixed in BullInputText and dropped the duplicate BBInputText.

@wired-pasteque wired-pasteque self-assigned this Aug 18, 2026
@wired-pasteque wired-pasteque linked an issue Aug 18, 2026 that may be closed by this pull request
@claude

claude Bot commented Aug 18, 2026

Copy link
Copy Markdown

Claude finished @wired-pasteque's task in 4m 13s —— View job


Code review — PR #2689

  • Gather context (diff vs origin/develop)
  • Review BullInputText changes and new test
  • Verify each call-site migration from BBInputText preserves behavior
  • Post review summary

Verdict: LGTM. No correctness bugs, security issues, or regressions found. A few minor observations below.

Note: I can't submit formal inline PR review comments, so findings are listed here with file/line references instead.

What I verified

  • Core fix is correct (packages/bull_ui/lib/src/inputs/bull_input_text.dart:148-151): effectiveMaxLines defaults numeric/obscured fields to 1 and feeds both maxLines and shouldPreventNewlines, so those fields also get TextInputAction.done and the \n deny-formatter. An explicit maxLines still wins, and free-text fields keep the old multiline behavior (maxLines: null, newline action) — no regression for the chat input (maxLines: 4) or other multiline fields.
  • No leftover references: BBInputText / text_input.dart only survive in comments (packages/bull_ui/README.md:59, lib/core/themes/app_theme.dart:81, doc comment in bull_input_text.dart:7) — nothing imports the deleted file.
  • All 17 call sites checked: none passes minLines, none combines obscure with an explicit maxLines > 1 (which would trip Flutter's !obscureText || maxLines == 1 assert), and none passes onDone, so the numeric fields' Enter key switching from "insert newline" to "done/dismiss keyboard" has no unintended submit side effects.
  • Pin screens improve: previously, un-hiding the PIN (obscure: false) made the field multiline (maxLines: null); now onlyNumbers: true keeps it single-line either way.
  • Color parity holds: context.bull is built from the same palette as appColors (lib/core/themes/app_theme.dart:71), so the migrated widgets keep their colors.
  • New test (packages/bull_ui/test/bull_input_text_test.dart) covers all four branches (numeric, obscured, free-text, explicit override) plus the newline-rejection formatter. Good coverage.

Minor observations (non-blocking)

  1. Inconsistent import stylelib/features/settings/ui/screens/exchange/bitcoin_wallets_screen.dart:6 uses a bare import 'package:bull_ui/bull_ui.dart'; while every other migrated file uses show BullInputText, Gap. Harmless, but worth aligning. Fix this →
  2. Small visual deltas from the swapBullInputText differs slightly from the deleted BBInputText: border radius 2 → 4 (BullRadius.xs), text forced to FontWeight.w400, fixedPrefix style bodyLargebodyMedium, suffix IconButton padding 5 → 4. These look like deliberate design-system choices, but a quick visual pass over screens using rightIcon (pin screens) and fixedPrefix wouldn't hurt.
  3. Doc comment now stalebull_input_text.dart:6-7 still says "duplicated from core/widgets/inputs/text_input.dart (BBInputText)", but this PR deletes that file; same for the (BBInputText) mention in packages/bull_ui/README.md:59.

Not run locally

Flutter isn't available in this environment, so I couldn't run flutter analyze or the new widget tests myself — the in-progress Analyze and Test CI run covers that.

@ethicnology ethicnology left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks

@ethicnology
ethicnology merged commit 45b867f into develop Aug 18, 2026
3 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.

Enter adds empty lines in amount fields

2 participants