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/14784: Settings - Changed name is not saved under Display name page #14866

Merged

Conversation

tienifr
Copy link
Contributor

@tienifr tienifr commented Feb 6, 2023

Details

Fixed Issues

$ #14784
PROPOSAL: 14784(COMMENT)

Tests

  • Verify changed name is saved under Display name page
  1. Click on >Setting>Profile > Display name
  2. Change name>Click Save
  3. Click the back arrow
  4. Click the Display name again
  5. Verify the new name matches the old name
  • Verify the form refactor for ACH Contract Step of Add Bank Account form works expectedly
  1. Go to Setting > Workspace > Connect bank account > Connect manually
  2. Fill the form and go to step 4
  3. Check "Somebody else owns more than 25% of" and filling out the Identity Form part way
  4. Refresh the page to ensure that the checkbox is still checked and the identify form is rendered with the values you entered
  • Verify that no errors appear in the JS console

Offline tests

QA Steps

  • Verify changed name is saved under Display name page
  1. Click on >Setting>Profile > Display name
  2. Change name>Click Save
  3. Click the back arrow
  4. Click the Display name again
  5. Verify the new name matches the old name
  • Verify the form refactor for ACH Contract Step of Add Bank Account form works expectedly
  1. Go to Setting > Workspace > Connect bank account > Connect manually
  2. Fill the form and go to step 4
  3. Check "Somebody else owns more than 25% of" and filling out the Identity Form part way
  4. Refresh the page to ensure that the checkbox is still checked and the identify form is rendered with the values you entered
  • 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:
    • Android / native
    • Android / Chrome
    • iOS / native
    • iOS / Safari
    • MacOS / Chrome / Safari
    • 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
      • If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • 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
  • Verify changed name is saved under Display name page
14784-name-web.mp4
  • Verify the form refactor for ACH Contract Step of Add Bank Account form works expectedly
14784-ach-web.mp4
Mobile Web - Chrome
  • Verify changed name is saved under Display name page
14784-name-mwebchrome.mp4
  • Verify the form refactor for ACH Contract Step of Add Bank Account form works expectedly
14784-ach-mwebchrome.mp4
Mobile Web - Safari
  • Verify changed name is saved under Display name page
14784-name-safari.mp4
  • Verify the form refactor for ACH Contract Step of Add Bank Account form works expectedly
14784-ach-safari.mp4
Desktop
  • Verify changed name is saved under Display name page
14784-name-desktop.mp4
  • Verify the form refactor for ACH Contract Step of Add Bank Account form works expectedly
14784-ach-desktop.mp4
iOS
  • Verify changed name is saved under Display name page
14784-name-ios.mp4
  • Verify the form refactor for ACH Contract Step of Add Bank Account form works expectedly
14784-ach-ios.mp4
Android
  • Verify changed name is saved under Display name page
14784-name-android.mp4
  • Verify the form refactor for ACH Contract Step of Add Bank Account form works expectedly
14784-ach-android.mp4

@tienifr tienifr requested a review from a team as a code owner February 6, 2023 15:44
@melvin-bot
Copy link

melvin-bot bot commented Feb 6, 2023

Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers!

@tienifr tienifr closed this Feb 6, 2023
@melvin-bot melvin-bot bot requested review from techievivek and removed request for a team February 6, 2023 15:44
@melvin-bot
Copy link

melvin-bot bot commented Feb 6, 2023

@techievivek Please 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]

@tienifr tienifr reopened this Feb 6, 2023
@tienifr tienifr marked this pull request as draft February 6, 2023 15:47
@tienifr tienifr marked this pull request as ready for review February 6, 2023 17:24
@Beamanator
Copy link
Contributor

Beamanator commented Feb 7, 2023

@sobitneupane requesting you as a reivewer since you're the C+ on the fixed issue. Do you have time to review this soon since this is quite an annoying bug in many forms?

@Beamanator
Copy link
Contributor

@tienifr are you up to date with main? I see your fork says it's 99 commits behind Expensify:main

@sobitneupane
Copy link
Contributor

Thanks @Beamanator.

Reviewing it now.

Copy link
Contributor

@sobitneupane sobitneupane left a comment

Choose a reason for hiding this comment

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

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:
    • Android / native
    • Android / Chrome
    • iOS / native
    • iOS / Safari
    • MacOS / Chrome / Safari
    • 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
Screen.Recording.2023-02-07.at.17.17.37.mov
Screen.Recording.2023-02-07.at.17.16.23.mov
Mobile Web - Chrome
Screen.Recording.2023-02-07.at.17.47.14.mov
Screen.Recording.2023-02-07.at.17.49.42.mov
Mobile Web - Safari
Screen.Recording.2023-02-07.at.17.43.23.mov
Screen.Recording.2023-02-07.at.17.48.35.mov
Desktop
Screen.Recording.2023-02-07.at.17.23.16.mov
Screen.Recording.2023-02-07.at.17.27.32.mov
iOS
Screen.Recording.2023-02-07.at.17.35.33.mov
Screen.Recording.2023-02-07.at.17.40.19.mov
Android
Screen.Recording.2023-02-07.at.17.38.21.mov
Screen.Recording.2023-02-07.at.17.44.16.mov

@sobitneupane
Copy link
Contributor

@techievivek Changes look good and tests well.

I have tested Step 4 (ACHContractStep) form in Connect bank account flow with some dummy data. I will also like to request QA team to test it thoroughly. For more details about QA Steps: #13501

Copy link
Contributor

@Beamanator Beamanator left a comment

Choose a reason for hiding this comment

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

:shipit:

@Beamanator Beamanator merged commit 0f74e9d into Expensify:main Feb 7, 2023
@Beamanator
Copy link
Contributor

@sobitneupane thanks for the review!

I think Step 4 is covered in the QA steps in the OP, right?

@OSBotify
Copy link
Contributor

OSBotify commented Feb 7, 2023

✋ 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

github-actions bot commented Feb 7, 2023

Performance Comparison Report 📊

Significant Changes To Duration

There are no entries

Meaningless Changes To Duration

Show entries
Name Duration
App start TTI 697.964 ms → 718.767 ms (+20.803 ms, +3.0%)
App start runJsBundle 194.258 ms → 200.625 ms (+6.367 ms, +3.3%)
App start regularAppStart 0.015 ms → 0.018 ms (+0.003 ms, +20.5%) 🟡
App start nativeLaunch 20.094 ms → 19.100 ms (-0.994 ms, -4.9%)
Open Search Page TTI 615.163 ms → 605.524 ms (-9.639 ms, -1.6%)
Show details
Name Duration
App start TTI Baseline
Mean: 697.964 ms
Stdev: 32.441 ms (4.6%)
Runs: 639.9255379999522 641.689873999916 651.3406360000372 662.3476570001803 664.0583359999582 667.9252140000463 671.6449509998783 673.2806079997681 673.4327389998361 674.7410720000044 675.7989950000774 684.385513999965 686.498668000102 687.780226000119 688.692495000083 692.67602299992 697.6101950001903 703.3155890000053 706.1916169999167 706.2664450001903 707.8120059999637 709.5911309998482 713.656555000227 716.4408390000463 720.8341239998117 726.0745129999705 735.508553000167 737.5696939998306 747.3412790000439 752.3839159999043 754.1076949997805 763.9306859998032

Current
Mean: 718.767 ms
Stdev: 24.620 ms (3.4%)
Runs: 664.6107649998739 668.7439009998925 678.6195229999721 698.554552000016 701.5573849999346 701.7815700001083 702.6947209998034 703.1983230002224 708.0327710001729 709.0123209999874 709.5693390001543 711.7065119999461 716.462981000077 718.586265000049 718.6919089998119 721.4730400000699 723.8457249999046 724.399991999846 726.3132629999891 727.3090349999256 728.442553000059 730.308036999777 731.3293420001864 739.0527989999391 739.5158569999039 744.0942520000972 757.9508310002275 768.0790659999475 770.3205769998021
App start runJsBundle Baseline
Mean: 194.258 ms
Stdev: 19.699 ms (10.1%)
Runs: 166 167 170 172 176 176 176 178 179 180 184 186 187 187 190 190 190 195 196 197 201 206 209 210 210 213 214 215 215 241 246

Current
Mean: 200.625 ms
Stdev: 20.174 ms (10.1%)
Runs: 165 172 175 179 180 180 181 182 183 189 190 190 193 195 197 197 199 203 204 205 207 210 212 212 215 217 218 219 222 237 245 247
App start regularAppStart Baseline
Mean: 0.015 ms
Stdev: 0.001 ms (8.2%)
Runs: 0.012736000120639801 0.013060999801382422 0.013224000111222267 0.013427999801933765 0.013467999640852213 0.013508999953046441 0.013590999878942966 0.013631000183522701 0.013631000183522701 0.013793999794870615 0.01383400009945035 0.013915999792516232 0.013916000258177519 0.013956999871879816 0.013996999710798264 0.014038000255823135 0.014200999867171049 0.014241999946534634 0.014607999939471483 0.01464799977838993 0.014689000323414803 0.014934000093489885 0.01497400039806962 0.015137000009417534 0.015300000086426735 0.015381000004708767 0.015868999995291233 0.016195000149309635 0.01680499967187643 0.016805000137537718 0.017008999828249216 0.017009000293910503

Current
Mean: 0.018 ms
Stdev: 0.001 ms (7.9%)
Runs: 0.014811000321060419 0.015544000081717968 0.015746999997645617 0.01607300015166402 0.01615400006994605 0.01631700014695525 0.016358000226318836 0.01643899967893958 0.016561000142246485 0.016561000142246485 0.01660200022161007 0.016642000060528517 0.016763999592512846 0.017089999746531248 0.017130000051110983 0.017293000128120184 0.01741599990054965 0.017700000200420618 0.0177819998934865 0.017862999811768532 0.018066000193357468 0.018188999965786934 0.01822900027036667 0.018269999884068966 0.018554999958723783 0.018839999567717314 0.018961000256240368 0.019652999937534332 0.0197350000962615 0.0197350000962615 0.02001999970525503 0.020060000009834766
App start nativeLaunch Baseline
Mean: 20.094 ms
Stdev: 2.227 ms (11.1%)
Runs: 17 17 18 18 18 18 18 18 18 18 19 19 19 19 19 20 20 20 20 20 20 21 22 22 22 22 22 22 23 23 25 26

Current
Mean: 19.100 ms
Stdev: 1.399 ms (7.3%)
Runs: 17 17 18 18 18 18 18 18 18 18 18 18 19 19 19 19 19 19 19 19 19 20 20 20 20 21 21 21 22 23
Open Search Page TTI Baseline
Mean: 615.163 ms
Stdev: 22.781 ms (3.7%)
Runs: 581.7995609999634 583.4799799998291 588.6563309999183 589.4340419997461 592.9868170004338 594.6540529998019 595.7271319995634 597.1754560000263 599.2914229999296 600.3441159999929 601.1689049997367 601.8605559999123 604.9133709999733 606.6610519997776 608.5716559998691 608.6675619999878 609.1737060002051 614.9486080002971 615.2990729999729 617.8884279998019 618.3557949997485 618.645101999864 619.1193039999343 620.6745609999634 627.8019209997728 630.0229489998892 640.1020909999497 641.4651700002141 641.7937420001253 642.9263920001686 647.4753419999033 651.5114750000648 687.7771410001442

Current
Mean: 605.524 ms
Stdev: 20.267 ms (3.3%)
Runs: 572.9477540003136 575.7088219998404 576.1074219997972 578.6678470000625 583.0354419997893 586.8637289996259 586.9384759999812 587.9719640002586 589.128337000031 592.7087810002267 596.4296070002019 597.5936280000024 599.6218270002864 600.5323489997536 600.9140629996546 601.5110269999132 601.6827799999155 603.2488609999418 603.4795329999179 603.9454759997316 609.5236820001155 615.6304120002314 616.6669509997591 621.2340910001658 621.6075440002605 623.6759849996306 623.9503579996526 624.8662929995917 625.8659270000644 628.0509850000963 632.5552159999497 634.9591069999151 664.6778159998357

@OSBotify
Copy link
Contributor

OSBotify commented Feb 7, 2023

🚀 Deployed to staging by https://github.com/Beamanator in version: 1.2.67-0 🚀

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

@OSBotify
Copy link
Contributor

OSBotify commented Feb 8, 2023

🚀 Deployed to production by https://github.com/mountiny in version: 1.2.67-7 🚀

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

@rushatgabhane
Copy link
Member

@tienifr please rename the PR to something meaningful. It's helpful when someone comes back to a PR after a long time.

1 similar comment
@rushatgabhane
Copy link
Member

@tienifr please rename the PR to something meaningful. It's helpful when someone comes back to a PR after a long time.

@tienifr tienifr changed the title fix: 14784 fix/14784: Settings - Changed name is not saved under Display name page Feb 10, 2023
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.

5 participants