Page MenuHomePhabricator

[native] Increase clickable region of `ColorSelector` Save button
ClosedPublic

Authored by abosh on Jun 30 2022, 10:54 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 29, 12:27 PM
Unknown Object (File)
Wed, Jun 26, 9:02 PM
Unknown Object (File)
Tue, Jun 25, 9:38 PM
Unknown Object (File)
Tue, Jun 25, 1:48 AM
Unknown Object (File)
Fri, Jun 21, 7:52 AM
Unknown Object (File)
Sat, Jun 15, 5:20 AM
Unknown Object (File)
Thu, Jun 13, 10:21 PM
Unknown Object (File)
Thu, Jun 13, 9:10 PM
Subscribers

Details

Summary

Quick fix before finalizing ColorSelector. Noticed a bug where the "Save" button in the ColorSelector was only being clicked when clicking on the "Save" text, and not anywhere on the button.

Fixed this by removing the outer View container and replacing it with a TouchableOpacity, allowing the entire region to be clickable and execute the onPress function.

What it looks like now:

Test Plan

Looks and works as expected on iOS.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

abosh added inline comments.
native/components/color-selector.react.js
94–97 ↗(On Diff #14039)

This styling directly mimics the styling in EditPassword, which has a very similar Save button:

image.png (298×896 px, 59 KB)

image.png (2×1 px, 480 KB)

Running into some bugs with the onPress function on Android that may have been introduced as a result of this change (this bug existed before but it returned now). Will update as I investigate.

Never mind, resolved the bug. It was something in ColorPickerModal that was causing the issue. The Save button works as expected on iOS and Android.

Updated styling to make the button look good on Nexus 5 (which is a huge/wide screen). The EditPassword styling did not work with this large of a phone screen.

This revision is now accepted and ready to land.Jul 1 2022, 7:38 AM
This revision now requires review to proceed.Jul 1 2022, 7:51 AM
This revision is now accepted and ready to land.Jul 5 2022, 9:10 AM