Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[$1000] Opacity is too low on long Press for the links like "Forgot", "Go back" & "Back" #14467

Closed
2 tasks
kavimuru opened this issue Jan 23, 2023 · 20 comments
Closed
2 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@kavimuru
Copy link

kavimuru commented Jan 23, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Open two NewDot sessions.
  2. In the first session, sign out (if you are signed in).
  3. Enter email address and click continue.
  4. Now long press on the "Forgot" or "Go back" buttons.
  5. Notice that the opacity of the buttons is very high (meaning the text fades away significantly when you long top.
  6. In the second session, go to Settings > Workspace > Click into a workspace > Connect Bank account.
  7. Click manual and enter the plaid test credentials.
  8. Click the "I accept terms of service" checkbox and notice the opacity is much more subtle than the login page.
  9. Click continue and scroll down to the bottom Company information step. Click the restricted industries checkbox and notice the opacity is similarly subtle to the step prior.

Expected Result:

Opacity in the application should be consistent, and more subtle than that shown on the login page.

Actual Result:

Opacity on login page buttons is inconsistent with other buttons in the app, and should be more subtle.

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.2.57-3
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:

opacity.mp4
Recording.1343.mp4

Expensify/Expensify Issue URL:
Issue reported by: @daraksha-dk
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1674240052198959

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0144967451d0ce5878
  • Upwork Job ID: 1619024958901145600
  • Last Price Increase: 2023-01-27
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jan 23, 2023
@melvin-bot melvin-bot bot locked and limited conversation to collaborators Jan 23, 2023
@joekaufmanexpensify
Copy link
Contributor

joekaufmanexpensify commented Jan 23, 2023

Triaging:

From this SO: https://stackoverflow.com/c/expensify/questions/14418

  • The "bug" is actually a bug: Y
  • The bug is not a duplicate report of an existing GH (close the GH and add any novel details to the original GH instead): N/A
  • The bug is reproducible, following the reproduction steps: Y
  • If you're unable to reproduce the bug, add the Needs reproduction label. Comment on the issue outlining the steps you took to try to reproduce the bug, your results and tag the issue reporter and the Applause QA member who created the issue. Ask them to clarify reproduction steps and/or to check the reproduction steps again. Close issue.: N/A
  • The GH template is filled out as fully as possible -- this means the GH body and title are clear (ie. could an external contributor understand it and work on it?): Y
  • The GH was created by an Expensify employee or a QA tester: Y
  • If the bug is an OldDot issue, you should decide whether it is widespread enough to justify fixing or it is better to wait for reunification. If it's better to wait, close the GH & provide this justification: N/A
  • If there's a link to Slack, check the discussion to see if we decided not to fix it: N/A
  • Decide if the GH should be resolved by an External contributor or Internal engineer, add the appropriate label: Deciding on this.

@joekaufmanexpensify
Copy link
Contributor

I can reproduce this on web. However, I do kind of like the feedback received when long clicking on the buttons here. Discussing further in Slack.

2023-01-23_13-30-11 (1)

@joekaufmanexpensify
Copy link
Contributor

Discussing here.

@joekaufmanexpensify
Copy link
Contributor

Adding view of opacity with checkbox on VBA flow for comparison:

2023-01-24_13-56-24 (1)

@joekaufmanexpensify
Copy link
Contributor

Still discussing in Slack.

@joekaufmanexpensify
Copy link
Contributor

Okay, we discussed this in Slack, and we want to make the opacity on the back and forgot password buttons on the login page more subtle and consistent with opacity on buttons in the rest of the app. In the VBA onboarding flow (as described in OP), there are two buttons with much more subtle opacity.

We want to standardize on that.

@joekaufmanexpensify
Copy link
Contributor

Thinking this can be external, but assigning to engineering to confirm!

@madmax330
Copy link
Contributor

Yep this can be external

@madmax330 madmax330 added the External Added to denote the issue can be worked on by a contributor label Jan 27, 2023
@melvin-bot melvin-bot bot unlocked this conversation Jan 27, 2023
@melvin-bot melvin-bot bot changed the title Opacity is too low on long Press for the links like "Forgot", "Go back" & "Back" [$1000] Opacity is too low on long Press for the links like "Forgot", "Go back" & "Back" Jan 27, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jan 27, 2023

Job added to Upwork: https://www.upwork.com/jobs/~0144967451d0ce5878

@daraksha-dk
Copy link
Contributor

Proposal

We can fix this issue by passing activeOpacity prop in TouchableOpacity
For the value, I observed that we're using 0.8 & 0.7 as values throughout the app for this.
So, I think @shawnborton will need to confirm the value for these links

Additionally, we can define a variable for the value like we have done for checkbox label here

checkboxLabelActiveOpacity: 0.7,

Required changes shown (if we chose to go with 0.7 as value)

diff --git a/src/pages/signin/ChangeExpensifyLoginLink.js b/src/pages/signin/ChangeExpensifyLoginLink.js
index 8289a754d..a849c9380 100755
--- a/src/pages/signin/ChangeExpensifyLoginLink.js
+++ b/src/pages/signin/ChangeExpensifyLoginLink.js
@@ -8,6 +8,7 @@ import styles from '../../styles/styles';
 import ONYXKEYS from '../../ONYXKEYS';
 import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize';
 import compose from '../../libs/compose';
 
 const propTypes = {
     /** The credentials of the logged in person */
@@ -41,6 +42,7 @@ const ChangeExpensifyLoginLink = props => (
         <TouchableOpacity
             style={[styles.link]}
             onPress={props.onPress}
+            activeOpacity={0.7}
         >
             <Text style={[styles.link]}>
                 {props.translate('common.goBack')}
diff --git a/src/pages/signin/PasswordForm.js b/src/pages/signin/PasswordForm.js
index d984e6fd2..7b65d0db5 100755
--- a/src/pages/signin/PasswordForm.js
+++ b/src/pages/signin/PasswordForm.js
@@ -24,6 +24,7 @@ import * as ErrorUtils from '../../libs/ErrorUtils';
 import {withNetwork} from '../../components/OnyxProvider';
 import networkPropTypes from '../../components/networkPropTypes';
 import OfflineIndicator from '../../components/OfflineIndicator';
 
 const propTypes = {
     /* Onyx Props */
@@ -171,6 +172,7 @@ class PasswordForm extends React.Component {
                         <TouchableOpacity
                             style={[styles.mt2]}
                             onPress={this.resetPassword}
+                            activeOpacity={0.7}
                         >
                             <Text style={[styles.link]}>
                                 {this.props.translate('passwordForm.forgot')}
diff --git a/src/pages/signin/ResendValidationForm.js b/src/pages/signin/ResendValidationForm.js
index 7753faa65..04d702e18 100755
--- a/src/pages/signin/ResendValidationForm.js
+++ b/src/pages/signin/ResendValidationForm.js
@@ -18,6 +18,7 @@ import OfflineIndicator from '../../components/OfflineIndicator';
 import networkPropTypes from '../../components/networkPropTypes';
 import {withNetwork} from '../../components/OnyxProvider';
 import DotIndicatorMessage from '../../components/DotIndicatorMessage';
 
 const propTypes = {
     /* Onyx Props */
@@ -79,7 +80,10 @@ const ResendValidationForm = (props) => {
                 <DotIndicatorMessage style={[styles.mb5]} type="error" messages={props.account.errors} />
             )}
             <View style={[styles.mb4, styles.flexRow, styles.justifyContentBetween, styles.alignItemsCenter]}>
-                <TouchableOpacity onPress={() => redirectToSignIn()}>
+                <TouchableOpacity
+                    onPress={() => redirectToSignIn()}
+                    activeOpacity={0.7}
+                >
                     <Text style={[styles.link]}>
                         {props.translate('common.back')}
                     </Text>

Demo

(activeOpacity is set as 0.7)

low-opacity.mp4

@melvin-bot
Copy link

melvin-bot bot commented Jan 27, 2023

Current assignee @joekaufmanexpensify is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Jan 27, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr (External)

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 27, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jan 27, 2023

Current assignee @madmax330 is eligible for the External assigner, not assigning anyone new.

@Pujan92
Copy link
Contributor

Pujan92 commented Jan 27, 2023

Proposal

We can apply the same activeOpacity to make it consistent like mentioned VBA flow checkbox label (Changed a variable name to make more generic).

diff --git a/src/styles/variables.js b/src/styles/variables.js
index 58b87782d5..c24eda3633 100644
--- a/src/styles/variables.js
+++ b/src/styles/variables.js
@@ -85,7 +85,7 @@ export default {
     INACTIVE_LABEL_TRANSLATE_Y: getValueUsingPixelRatio(16, 21),
     sliderBarHeight: 8,
     sliderKnobSize: 26,
-    checkboxLabelActiveOpacity: 0.7,
+    actionTextActiveOpacity: 0.7,
     avatarChatSpacing: 12,
diff --git a/src/components/CheckboxWithLabel.js b/src/components/CheckboxWithLabel.js
index 4c7123bd24..3ecf26eb42 100644
--- a/src/components/CheckboxWithLabel.js
+++ b/src/components/CheckboxWithLabel.js
@@ -100,7 +100,7 @@ class CheckboxWithLabel extends React.Component {
                     <TouchableOpacity
                         focusable={false}
                         onPress={this.toggleCheckbox}
-                        activeOpacity={variables.checkboxLabelActiveOpacity}
+                        activeOpacity={variables.actionTextActiveOpacity}
                         style={[
                             styles.ml3,
                             styles.pr2,
diff --git a/src/pages/signin/ChangeExpensifyLoginLink.js b/src/pages/signin/ChangeExpensifyLoginLink.js
index 8289a754d..32e02b0f5 100755
--- a/src/pages/signin/ChangeExpensifyLoginLink.js
+++ b/src/pages/signin/ChangeExpensifyLoginLink.js
@@ -41,6 +41,7 @@ const ChangeExpensifyLoginLink = props => (
         <TouchableOpacity
             style={[styles.link]}
             onPress={props.onPress}
+            activeOpacity={variables.actionTextActiveOpacity}
         >
             <Text style={[styles.link]}>
                 {props.translate('common.goBack')}
diff --git a/src/pages/signin/PasswordForm.js b/src/pages/signin/PasswordForm.js
index d984e6fd2..4c02c3b90 100755
--- a/src/pages/signin/PasswordForm.js
+++ b/src/pages/signin/PasswordForm.js
@@ -171,6 +171,7 @@ class PasswordForm extends React.Component {
                         <TouchableOpacity
                             style={[styles.mt2]}
                             onPress={this.resetPassword}
+                            activeOpacity={variables.actionTextActiveOpacity}
                         >
                             <Text style={[styles.link]}>
                                 {this.props.translate('passwordForm.forgot')}
diff --git a/src/pages/signin/ResendValidationForm.js b/src/pages/signin/ResendValidationForm.js
index 7753faa65..8887854cb 100755
--- a/src/pages/signin/ResendValidationForm.js
+++ b/src/pages/signin/ResendValidationForm.js
@@ -79,7 +79,7 @@ const ResendValidationForm = (props) => {
                 <DotIndicatorMessage style={[styles.mb5]} type="error" messages={props.account.errors} />
             )}
             <View style={[styles.mb4, styles.flexRow, styles.justifyContentBetween, styles.alignItemsCenter]}>
-                <TouchableOpacity onPress={() => redirectToSignIn()}>
+                <TouchableOpacity onPress={() => redirectToSignIn()} activeOpacity={variables.actionTextActiveOpacity}>
                     <Text style={[styles.link]}>
                         {props.translate('common.back')}
                     </Text>

@situchan
Copy link
Contributor

Proposal

We can set activeOpacity default value of TouchableOpacity across the app in root level, without needing to set in every component.
I think App.js is a good place:

- import {LogBox} from 'react-native';
+ import {LogBox, TouchableOpacity} from 'react-native';

...

LogBox.ignoreLogs([
    // Basically it means that if the app goes in the background and back to foreground on Android,
    // the timer is lost. Currently Expensify is using a 30 minutes interval to refresh personal details.
    // More details here: https://git.io/JJYeb
    'Setting a timer for a long period of time',
]);

+ TouchableOpacity.defaultProps = TouchableOpacity.defaultProps || {};
+ TouchableOpacity.defaultProps.activeOpacity = 0.7;

const fill = {flex: 1};

Whether to set 0.7 or 0.8 depends on confirmation from design team.

However, I am not sure if this is worth fixing based on #14589

@melvin-bot melvin-bot bot added the Overdue label Jan 30, 2023
@mollfpr
Copy link
Contributor

mollfpr commented Jan 30, 2023

Thanks for the proposals! I'll review this issue tonight!

@melvin-bot melvin-bot bot removed the Overdue label Jan 30, 2023
@mollfpr
Copy link
Contributor

mollfpr commented Jan 30, 2023

@joekaufmanexpensify What do you think about this plan #14589?

@joekaufmanexpensify
Copy link
Contributor

Hm, interesting. My 2c is that it seems like whatever we change in this issue will be redone in that issue. And we should therefore do nothing for now, and wait for a standardized system of pressables to be added in the app. Curious if you agree @mountiny ?

@mountiny
Copy link
Contributor

Yeah that makes sense to me, this is very minor issue and I see no reason in fixing this now if we will move away from the Touchables implementation

Thanks @mollfpr for bringing this up!

@joekaufmanexpensify
Copy link
Contributor

Cool, thanks for confirming! Going to go ahead and close this one then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

8 participants