Skip to content

chore: address feedback on currency input field#2371

Merged
rolznz merged 7 commits into
codex/currency-input-btc-modefrom
codex/currency-input-btc-mode-feedback
May 27, 2026
Merged

chore: address feedback on currency input field#2371
rolznz merged 7 commits into
codex/currency-input-btc-modefrom
codex/currency-input-btc-mode-feedback

Conversation

@rolznz
Copy link
Copy Markdown
Member

@rolznz rolznz commented May 22, 2026

  • Removed the outer bordered wrapper around the input + context rows; InputGroup now handles its own
    border and focus ring (focus only highlights the input).
  • Moved contextRows out of the bordered area so they no longer look like an input.
  • Added cursor-default to the contextRows wrapper to neutralize the inherited cursor: pointer from the
    global [data-slot="field"] rule.
  • Always render the leading unit addon so "sats" displays when BIP-177 is not active (in addition to
    "₿", "BTC", or fiat symbol).
  • Added a toast("Switched to BTC for decimal amount") when typing/pasting a decimal auto-switches the denomination to BTC.
  • Replaced the embedded buttons' default focus ring with an inset 2px ring-inset ring-ring, plus peer-focus-visible so the adjacent divider borders go transparent on focus (cleaner ring, no clipped
    vertical stripes).
    • Rounded the rightmost button's right corners (rounded-r-md) so the inset ring follows the InputGroup's curve.
    • Changed the right-side button label to show "BTC" when BTC is active and the user's preferred sats
      unit (₿ for BIP-177, otherwise sats) when sats is active.
image image image

@rolznz rolznz requested a review from stackingsaunter May 22, 2026 07:54
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ea68565c-6945-411c-b7ad-0f68b09af7cf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/currency-input-btc-mode-feedback

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rolznz rolznz marked this pull request as draft May 23, 2026 08:30
@rolznz
Copy link
Copy Markdown
Member Author

rolznz commented May 23, 2026

Review from @stackingsaunter - we don't want a duplicated BTC on left/right.

@rolznz rolznz marked this pull request as ready for review May 27, 2026 14:19
@rolznz rolznz merged commit 6d3a7eb into codex/currency-input-btc-mode May 27, 2026
12 checks passed
@rolznz rolznz deleted the codex/currency-input-btc-mode-feedback branch May 27, 2026 14:19
rolznz added a commit that referenced this pull request May 27, 2026
* feat: add BTC denomination toggle to currency input

* fix: auto switch decimal bitcoin input to BTC

* chore: address feedback on currency input field (#2371)

* chore: address feedback on currency input field

* feat: make currency input units clickable

* fix: separate currency and unit click targets

* fix: remove persistent unit toggle highlight

* fix: tighten currency input unit spacing

* fix: make alternate bitcoin amount clickable

* fix: align context amount unit spacing

---------

Co-authored-by: saunter <68239231+stackingsaunter@users.noreply.github.com>

---------

Co-authored-by: Roland <33993199+rolznz@users.noreply.github.com>
rolznz added a commit that referenced this pull request May 27, 2026
* feat: use currency input in swap flows

* feat: add BTC denomination toggle to currency input (#2367)

* feat: add BTC denomination toggle to currency input

* fix: auto switch decimal bitcoin input to BTC

* chore: address feedback on currency input field (#2371)

* chore: address feedback on currency input field

* feat: make currency input units clickable

* fix: separate currency and unit click targets

* fix: remove persistent unit toggle highlight

* fix: tighten currency input unit spacing

* fix: make alternate bitcoin amount clickable

* fix: align context amount unit spacing

---------

Co-authored-by: saunter <68239231+stackingsaunter@users.noreply.github.com>

---------

Co-authored-by: Roland <33993199+rolznz@users.noreply.github.com>

---------

Co-authored-by: Roland <33993199+rolznz@users.noreply.github.com>
rolznz added a commit that referenced this pull request May 27, 2026
* feat: use currency input in send flows

* feat: use currency input in swap flows (#2322)

* feat: use currency input in swap flows

* feat: add BTC denomination toggle to currency input (#2367)

* feat: add BTC denomination toggle to currency input

* fix: auto switch decimal bitcoin input to BTC

* chore: address feedback on currency input field (#2371)

* chore: address feedback on currency input field

* feat: make currency input units clickable

* fix: separate currency and unit click targets

* fix: remove persistent unit toggle highlight

* fix: tighten currency input unit spacing

* fix: make alternate bitcoin amount clickable

* fix: align context amount unit spacing

---------

Co-authored-by: saunter <68239231+stackingsaunter@users.noreply.github.com>

---------

Co-authored-by: Roland <33993199+rolznz@users.noreply.github.com>

---------

Co-authored-by: Roland <33993199+rolznz@users.noreply.github.com>

---------

Co-authored-by: Roland <33993199+rolznz@users.noreply.github.com>
rolznz added a commit that referenced this pull request May 27, 2026
* feat: add currency input to receive flows

* feat: use currency input in send flows (#2321)

* feat: use currency input in send flows

* feat: use currency input in swap flows (#2322)

* feat: use currency input in swap flows

* feat: add BTC denomination toggle to currency input (#2367)

* feat: add BTC denomination toggle to currency input

* fix: auto switch decimal bitcoin input to BTC

* chore: address feedback on currency input field (#2371)

* chore: address feedback on currency input field

* feat: make currency input units clickable

* fix: separate currency and unit click targets

* fix: remove persistent unit toggle highlight

* fix: tighten currency input unit spacing

* fix: make alternate bitcoin amount clickable

* fix: align context amount unit spacing

---------

Co-authored-by: saunter <68239231+stackingsaunter@users.noreply.github.com>

---------

Co-authored-by: Roland <33993199+rolznz@users.noreply.github.com>

---------

Co-authored-by: Roland <33993199+rolznz@users.noreply.github.com>

---------

Co-authored-by: Roland <33993199+rolznz@users.noreply.github.com>

* fix: tab highlight on currency input field buttons

* fix: undo incorrect copy change

* chore: undo unrelated change

* fix: limit min/max validation to 2 decimal places

* fix: input max amounts and context rows based on whether node has channel management

* fix: rename spending balance to lightning balance

* fix: rename spending balance to lightning balance

* fix: re-add anchor reserve alert to swap page

* fix: remove autocomplete from currency input field

* fix: number of decimals in getModeBound

* fix: remove important tailwind modifier

---------

Co-authored-by: Roland <33993199+rolznz@users.noreply.github.com>
Co-authored-by: Roland Bewick <roland.bewick@gmail.com>
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.

2 participants