Skip to content

Conversation

@luacmartins
Copy link
Contributor

@luacmartins luacmartins commented Jan 16, 2023

Details

Translate the default welcome note if the language is changed in a different session

Fixed Issues

$ #14306

Tests

  1. Open two browser sessions logged in to the same account
  2. Navigate to Setting > Workspaces > Manage Members > Invite new members in session A
  3. Verify that you see the default Personal message and that it matches the selected language
  4. In session B, navigate to Settings > Preferences and change the language
  5. Verify that the default Personal message in session A is translated accordingly
  6. In session A, edit the Personal message to a custom user message, e.g. Welcome!
  7. In session B, change the language
  8. In Session A, verify that you still see the custom user message you typed.
  • Verify that no errors appear in the JS console

Offline tests

N/A

QA Steps

Same as tests

  • 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
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 Jan 16, 2023
@luacmartins luacmartins marked this pull request as ready for review January 16, 2023 22:46
@luacmartins luacmartins requested a review from a team as a code owner January 16, 2023 22:46
@melvin-bot melvin-bot bot requested review from Gonals and mollfpr and removed request for a team January 16, 2023 22:47
@melvin-bot
Copy link

melvin-bot bot commented Jan 16, 2023

@mollfpr @Gonals 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]

@mollfpr
Copy link
Contributor

mollfpr commented Jan 17, 2023

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
14339.-.Web.mov
Mobile Web - Chrome
14339.-.mWeb-Android.mov
Mobile Web - Safari
14339.-.mWeb-Safari.mov
Desktop
14339.-.Desktop.mov
iOS
14339.-.iOS.mov
Android
14339.-.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 wells 👍

@Gonals Gonals merged commit 3bfaabd into main Jan 18, 2023
@Gonals Gonals deleted the cmartins-updateLanguageForInviteMessage branch January 18, 2023 09:58
@melvin-bot melvin-bot bot added the Emergency label Jan 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jan 18, 2023

@Gonals looks like this was merged without a test passing. Please add a note explaining why this was done and remove the Emergency label if this is not an emergency.

@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
Open Search Page TTI 594.592 ms → 609.917 ms (+15.325 ms, +2.6%)
App start TTI 658.742 ms → 670.640 ms (+11.898 ms, +1.8%)
App start runJsBundle 173.871 ms → 179.781 ms (+5.910 ms, +3.4%)
App start nativeLaunch 21.000 ms → 21.393 ms (+0.393 ms, +1.9%)
App start regularAppStart 0.014 ms → 0.015 ms (+0.001 ms, +4.0%)
Show details
Name Duration
Open Search Page TTI Baseline
Mean: 594.592 ms
Stdev: 23.280 ms (3.9%)
Runs: 547.7729089967906 548.188028998673 548.2451580017805 560.2917490005493 569.5498449988663 572.9668380022049 577.8182779997587 581.921875 584.5348309986293 585.4318029992282 588.6146249994636 588.9600830003619 590.0745040029287 592.8690600022674 593.6432700008154 595.0075679980218 595.9167479984462 596.9429939985275 597.1034350022674 597.5833739973605 602.1168619990349 603.2716469988227 603.8035079985857 607.8106279969215 608.303752001375 609.9542650021613 614.8801270015538 615.8035489991307 616.1787509992719 618.1210529990494 621.3934330008924 632.5065109990537 653.9666339978576

Current
Mean: 609.917 ms
Stdev: 28.027 ms (4.6%)
Runs: 566.0911050029099 567.4742030017078 568.1999099999666 570.8031009994447 574.8331709988415 583.2615559995174 583.380981002003 584.0652670003474 584.3678389973938 591.4486899971962 592.6828610002995 595.6065679974854 596.6526690013707 601.7775480002165 604.8926189988852 607.0436200015247 609.7304689995944 609.9732660017908 614.260213997215 614.8119309991598 621.8320729993284 624.999797001481 625.1707769967616 626.7207849994302 629.5241300016642 632.7548430003226 634.4594330005348 636.500367000699 640.0650630034506 644.2625329978764 655.2653000019491 666.5067950002849 667.8437909968197
App start TTI Baseline
Mean: 658.742 ms
Stdev: 32.394 ms (4.9%)
Runs: 590.3769389986992 618.5334750004113 623.1798130013049 626.6003599986434 628.0232030004263 633.3387739993632 634.4064860008657 635.0349990017712 636.099550999701 636.2025119997561 636.2055369988084 638.3068769983947 639.6280319988728 642.2256279997528 643.1336620002985 654.3078519999981 655.61923699826 657.178656000644 659.82688799873 663.110178001225 664.5150049999356 666.1745279990137 670.6172880008817 684.6835890002549 687.3591060005128 694.3091770000756 699.7880860008299 704.3404409997165 704.9713479988277 706.3682110011578 717.9296000003815 727.3586000017822

Current
Mean: 670.640 ms
Stdev: 29.357 ms (4.4%)
Runs: 627.4091649986804 631.2362169995904 633.8977020010352 637.0967269986868 644.1094579994678 645.3225699998438 646.1368819996715 646.5453369989991 646.6798239983618 651.8293670006096 654.1298709996045 655.2522660009563 658.5374689996243 660.3089030012488 662.2236989997327 666.0512190014124 666.3791450001299 670.0597079992294 674.4044080004096 675.5674559995532 682.2335189990699 683.3633270002902 687.9598569981754 689.9066100008786 699.6332730017602 700.4433280006051 705.5613150000572 705.8855260014534 706.9007189981639 714.238476999104 760.5392160005867
App start runJsBundle Baseline
Mean: 173.871 ms
Stdev: 14.196 ms (8.2%)
Runs: 146 149 158 159 159 160 164 164 168 169 169 170 171 171 171 171 172 173 175 176 176 177 179 179 186 188 192 192 195 198 213

Current
Mean: 179.781 ms
Stdev: 20.706 ms (11.5%)
Runs: 154 156 158 159 161 161 163 165 166 166 167 167 168 168 169 171 173 177 177 180 180 184 192 193 197 198 198 201 203 220 224 237
App start nativeLaunch Baseline
Mean: 21.000 ms
Stdev: 2.017 ms (9.6%)
Runs: 18 18 18 18 19 19 20 20 20 20 20 20 20 20 21 21 21 21 21 22 22 22 22 23 23 23 23 24 25 26

Current
Mean: 21.393 ms
Stdev: 2.193 ms (10.3%)
Runs: 18 18 19 19 19 19 20 20 20 20 20 21 21 21 22 22 22 22 22 22 23 23 23 23 23 24 25 28
App start regularAppStart Baseline
Mean: 0.014 ms
Stdev: 0.001 ms (4.2%)
Runs: 0.012776002287864685 0.013060998171567917 0.013388000428676605 0.013550002127885818 0.013590000569820404 0.013590998947620392 0.013631001114845276 0.013631001114845276 0.013672001659870148 0.013712000101804733 0.013875000178813934 0.013996999710798264 0.013996999710798264 0.014079000800848007 0.01411999762058258 0.014242000877857208 0.01428300142288208 0.014322999864816666 0.01440499722957611 0.014527000486850739 0.014607999473810196 0.014647997915744781 0.01464800164103508 0.014689002186059952 0.01469000056385994 0.014729999005794525 0.014892999082803726 0.01493300125002861 0.015096001327037811 0.015137001872062683

Current
Mean: 0.015 ms
Stdev: 0.001 ms (6.0%)
Runs: 0.01318400353193283 0.013386998325586319 0.013508997857570648 0.013589996844530106 0.013672001659870148 0.013794001191854477 0.013875000178813934 0.013875000178813934 0.01411999762058258 0.01419999822974205 0.014404002577066422 0.01440499722957611 0.01440500095486641 0.014444999396800995 0.014485999941825867 0.014688998460769653 0.014729000627994537 0.014851998537778854 0.014852002263069153 0.014933999627828598 0.014974001795053482 0.015054997056722641 0.01505500078201294 0.015095997601747513 0.015096001327037811 0.015706002712249756 0.015706002712249756 0.015951000154018402 0.015991002321243286 0.016114000231027603 0.016234997659921646 0.016683001071214676

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @Gonals in version: 1.2.56-0 🚀

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

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/AndrewGable in version: 1.2.56-0 🚀

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

@luacmartins
Copy link
Contributor Author

Tests passed. Not an emergency!

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