Skip to content

Add a developer option to replace sliders with buttons - #6327

Open
j0ntz wants to merge 3 commits into
developfrom
jon/slider-buttons-dev-option
Open

j0ntz wants to merge 3 commits into
developfrom
jon/slider-buttons-dev-option

Conversation

@j0ntz

@j0ntz j0ntz commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Description

Asana task

Adds a "Replace Sliders with Buttons" switch to the developer options card in Settings. When it is on, every confirmation slider (send, swap and the other slider-gated actions) renders a tappable Confirm button instead. BrowserStack and similar automation tools cannot perform the swipe gesture. Before this change they could not confirm these actions.

  • The setting is stored per device and is off by default. With it off, the slider is unchanged.
  • The button keeps the slider's confirmSliderThumb testID. It shows a spinner until the caller resets it, ignores presses while the action runs, and honors the disabled and locked states and texts.
  • The label is a generic "Confirm", because the slider's own text ("Slide to ...") is a swipe instruction.
  • A separate first commit swaps the direct vector-icons imports in SettingsScene for the shared VectorIcon component, which clears the lint warnings in the touched file.

Tested on the iOS simulator. With the option on, a BTC send showed the Confirm button in place of the slider, and tapping it broadcast the transaction to the success modal. New unit tests in SafeSlider.test.tsx cover the slider and button modes.

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

Note

Low Risk
Behavior change is gated behind a developer setting that defaults off; production confirmation UX stays on sliders unless explicitly enabled for testing.

Overview
Adds a developer-only toggle, Replace Sliders with Buttons, that persists on the device via new slidersAsButtons device settings (default off). When enabled, SafeSlider skips the swipe UI and renders an EdgeButton labeled Confirm, reusing the same completion handler, spinner/reset behavior, disabled/locked labels, and confirmSliderThumb test ID so BrowserStack-style automation can confirm send/swap actions without swiping.

Settings exposes the switch under developer options with writeSlidersAsButtons; locale strings cover the button label and setting name. SafeSlider.test.tsx covers slider vs button modes. SettingsScene also swaps direct vector-icon imports for VectorIcon (snapshot tweak only).

Reviewed by Cursor Bugbot for commit a89080c. Bugbot is set up for automated code reviews on this repo. Configure here.

j0ntz added 3 commits November 4, 2026 22:55
Replace the direct react-native-vector-icons imports with the shared
VectorIcon component to clear the no-restricted-imports warnings.
Persist a slidersAsButtons device setting, off by default, and expose
it as a switch in the developer options card of the settings scene.
With the slidersAsButtons developer setting on, SafeSlider renders an
EdgeButton labeled Confirm instead of the swipe slider. The button runs
the same completion handler, shows a spinner until the caller resets
it, re-arms on reset or rejection, and honors the disabled and locked
states and texts. It keeps the slider's testID so automation targets
the same element. Tools such as BrowserStack cannot perform the swipe.

@j0ntz j0ntz left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Self-review at a89080c (low): nothing fixed, 2 candidates rejected.

Rejected in curation (2)
  • src/components/themed/SafeSlider.tsx:140: button mode ignores confirmText and always says "Confirm". Rejected: the only caller passing it, SendScene2.tsx:4459, sends stealth_slide_send ("Slide to send stealthily"), a swipe instruction that is wrong on a button; the generic label is intended.
  • src/components/themed/SafeSlider.tsx:139: slidersAsButtons is read at render, and mounted sliders do not update on toggle. Rejected: the value changes only from the Settings switch. No slider can flip mode mid-gesture, and slider scenes open fresh after the toggle (verified on the simulator); disableAnimations is read the same way.

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