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

Fix Back button style #13670

Merged
merged 3 commits into from
Dec 20, 2022
Merged

Fix Back button style #13670

merged 3 commits into from
Dec 20, 2022

Conversation

luacmartins
Copy link
Contributor

@luacmartins luacmartins commented Dec 16, 2022

Details

Makes the Back button look like a link

Fixed Issues

$ #13626

Tests

  1. Go to login page
  2. Type email and continue to password page
  3. Click Forgot?
  4. Verify that the Back button looks like a link
  5. Verify that pressing it shows the same dark blue color that other links display when pressed
  • Verify that no errors appear in the JS console

Offline tests

N/A

QA Steps

Same as test steps

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • iOS / native
    • Android / native
    • iOS / Safari
    • Android / Chrome
    • MacOS / Chrome
    • MacOS / Desktop
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is correct English and approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web
web.mov
Mobile Web - Chrome
chrome.mov
Mobile Web - Safari
safari.mov
Desktop
desktop.mov
iOS
ios.mov
Android
android.mov

@luacmartins luacmartins self-assigned this Dec 16, 2022
@luacmartins luacmartins marked this pull request as ready for review December 16, 2022 21:20
@luacmartins luacmartins requested a review from a team as a code owner December 16, 2022 21:20
@melvin-bot melvin-bot bot requested review from joelbettner and mollfpr and removed request for a team December 16, 2022 21:21
@melvin-bot
Copy link

melvin-bot bot commented Dec 16, 2022

@mollfpr @joelbettner One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@Pujan92
Copy link
Contributor

Pujan92 commented Dec 16, 2022

@luacmartins Just to point out underlayColor is not the property of TouchableOpacity, seems it is the property of TouchableHighlight. Maybe we can avoid adding it here and can remove it from forgot? link too.

                <TouchableOpacity onPress={() => redirectToSignIn()}>
-                    <Text>
+                    <Text style={[styles.link]}>
                         {props.translate('common.back')}
                     </Text>
                 </TouchableOpacity>

@luacmartins
Copy link
Contributor Author

@Pujan92 today I learned! Thanks for the tip. It seems like we had that invalid prop in many other instances, so I removed those too. I tested all instances of TouchableOpacity that had that prop and they seem to work as intended.

@Pujan92
Copy link
Contributor

Pujan92 commented Dec 16, 2022

@Pujan92 today I learned! Thanks for the tip. It seems like we had that invalid prop in many other instances, so I removed those too. I tested all instances of TouchableOpacity that had that prop and they seem to work as intended.

Great, I learned while preparing for the proposal but somehow it didn't turn out to the external but happy at least that applies to the PR. :)

@mollfpr
Copy link
Contributor

mollfpr commented Dec 16, 2022

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified tests pass on all platforms & I tested again on:
    • iOS / native
    • Android / native
    • iOS / Safari
    • Android / Chrome
    • MacOS / Chrome
    • MacOS / Desktop
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is correct English and approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Web
13670.Web.mov
Mobile Web - Chrome
13670.mWeb.Chrome.mov
Mobile Web - Safari
13670.mWeb.iOS.mov
Desktop
13670.Desktop.mov
iOS
13670.iOS.mov
Android
13670.Android.mov

Copy link
Contributor

@mollfpr mollfpr left a comment

Choose a reason for hiding this comment

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

LGTM and test well 👍

Here's the checklist

@joelbettner
Copy link
Contributor

This looks good to me. 👍

@luacmartins
Copy link
Contributor Author

Thanks for the reviews! Merging!

@luacmartins luacmartins merged commit 3a59770 into main Dec 20, 2022
@luacmartins luacmartins deleted the cmartins-fixLinkStyle branch December 20, 2022 18:06
@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions
Copy link
Contributor

Performance Comparison Report 📊

Significant Changes To Duration

There are no entries

Meaningless Changes To Duration

Show entries
Name Duration
TTI 793.455 ms → 820.182 ms (+26.727 ms, +3.4%)
runJsBundle 191.625 ms → 193.313 ms (+1.688 ms, +0.9%)
nativeLaunch 9.370 ms → 9.577 ms (+0.207 ms, +2.2%)
regularAppStart 0.014 ms → 0.015 ms (+0.001 ms, +8.7%)
Show details
Name Duration
TTI Baseline
Mean: 793.455 ms
Stdev: 30.989 ms (3.9%)
Runs: 733.4371549999341 743.3576340000145 752.3919319999404 762.9474029999692 766.650747000007 767.4226180000696 770.7116139999125 772.4996160001028 773.3876020000316 776.069882000098 777.6099739999045 779.4021739999298 787.3031530000735 787.551249000011 789.0964619999286 792.925540999975 795.4195119999349 799.5351380000357 802.5091949999332 803.2064749998972 805.3143899999559 806.2200209998991 807.3090719999745 812.9947989999782 818.0210919999518 820.9929059999995 830.2747349999845 839.3095720000565 851.4467960000038 878.3317710000556

Current
Mean: 820.182 ms
Stdev: 39.046 ms (4.8%)
Runs: 753.9565429999493 772.8988979998976 774.1196739999577 777.3445419999771 778.00569000002 778.1351699999068 788.8631420000456 793.4011729999911 794.094071000116 795.4008579999208 795.4175269999541 798.4122850000858 803.2852459999267 803.7736619999632 805.1534039999824 805.4937569999602 805.7774509999435 809.4299429999664 819.4200609999243 819.5799010000192 833.3538559998851 859.6180290000048 859.9679060000926 866.1767730000429 868.0498669999652 871.0315109998919 874.023157000076 875.6013080000412 878.5847239999566 883.2416610000655 884.0160240000114
runJsBundle Baseline
Mean: 191.625 ms
Stdev: 24.562 ms (12.8%)
Runs: 154 162 165 170 170 173 175 176 176 178 179 179 179 179 181 181 182 183 188 189 193 193 197 204 210 215 216 224 225 233 239 264

Current
Mean: 193.313 ms
Stdev: 19.624 ms (10.2%)
Runs: 164 165 168 169 169 171 174 176 177 178 183 185 186 187 189 191 191 192 195 199 200 201 205 207 207 213 218 219 219 227 230 231
nativeLaunch Baseline
Mean: 9.370 ms
Stdev: 0.909 ms (9.7%)
Runs: 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 11 11 11

Current
Mean: 9.577 ms
Stdev: 1.115 ms (11.6%)
Runs: 8 8 8 8 8 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 11 11 11 11 11 12
regularAppStart Baseline
Mean: 0.014 ms
Stdev: 0.001 ms (4.0%)
Runs: 0.012653999961912632 0.012654999969527125 0.01297999988310039 0.013020999962463975 0.013060999801382422 0.013142999960109591 0.013224000111222267 0.013264999957755208 0.0133050000295043 0.013549000024795532 0.013550000032410026 0.013631000183522701 0.013631999958306551 0.013672000030055642 0.013712000101804733 0.013794000027701259 0.013794000027701259 0.013956000097095966 0.01395700010471046 0.0139979999512434 0.014038000022992492 0.014038000022992492 0.014038000022992492 0.014038000022992492 0.014160000020638108 0.014241999946534634 0.014322000090032816 0.014567000092938542 0.01509599993005395

Current
Mean: 0.015 ms
Stdev: 0.001 ms (7.1%)
Runs: 0.013184000039473176 0.013387000188231468 0.013428000034764409 0.013508999953046441 0.013671000022441149 0.0138349998742342 0.01399700017645955 0.014038000022992492 0.014118999941274524 0.0143630001693964 0.014404000015929341 0.014445000095292926 0.014445000095292926 0.014567000092938542 0.014648000011220574 0.014851999934762716 0.0148930000141263 0.0148930000141263 0.0148930000141263 0.014973999932408333 0.015300000086426735 0.015461999922990799 0.015625 0.015625 0.015868999995291233 0.01599099999293685 0.01607199991121888 0.01611399999819696 0.0163569999858737 0.01692699990235269 0.017456000205129385

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @luacmartins in version: 1.2.43-0 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @chiragsalian in version: 1.2.43-1 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@mollfpr
Copy link
Contributor

mollfpr commented Jan 4, 2023

@luacmartins Could you help to compensate this review PR? Thank you!

@luacmartins
Copy link
Contributor Author

@mollfpr left a comment here

@fedirjh
Copy link
Contributor

fedirjh commented Jan 4, 2023

@luacmartins I am eligible for reporting bonus , can't comment there #13626

@luacmartins
Copy link
Contributor Author

@fedirjh sorry! Added a comment to the issue as well!

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.

6 participants