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

14520: new message green line appears #15097

Merged
merged 2 commits into from
Feb 15, 2023

Conversation

gedu
Copy link
Contributor

@gedu gedu commented Feb 13, 2023

Details

I'm checking if there is any unread action before cleaning the new green marker flag

Fixed Issues

#14520
PROPOSAL: #14520 (comment)

Tests

Android/iOS

  • Open a chat with messages and mark a message as unread, a green line should show up
  • with the green line, put the app in background, and open the app again, the green line should be there
  • with the green line, put the app in background, open the app again, put back the app in BG and open again, the green line should show for a sec (or not show at all) and then hide.

Web

  • Open the chat with messages and mark a message as unread, a green line should show up
  • with the green line, navigate to another screen and then go back, no line should be there

Offline tests

This feature doesn't change or is impacted by offline mode.

QA Steps

This feature doesn't change or is impacted by offline mode.

  • 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

Android https://user-images.githubusercontent.com/1676818/218546477-c73d1743-1a5f-434d-b15d-dc0cbe2a0639.mp4
iOS
greenLine-aftervisible.mp4
Mobile Web - Chrome
newLine_androidChrome.mp4
Mobile Web - Safari
newLine_iosSafari.mp4
Safari
newLine_safari.mp4
Chrome
newLine_chrome.mp4
Desktop
newLine_desktop.mp4

@gedu gedu requested a review from a team as a code owner February 13, 2023 18:48
@github-actions
Copy link
Contributor

github-actions bot commented Feb 13, 2023

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@melvin-bot melvin-bot bot requested review from MonilBhavsar and removed request for a team February 13, 2023 18:48
@MelvinBot
Copy link

@MonilBhavsar 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]

@gedu
Copy link
Contributor Author

gedu commented Feb 13, 2023

I have read the CLA Document and I hereby sign the CLA

@puneetlath
Copy link
Contributor

@gedu looks like you have a unit test failing.

@mountiny
Copy link
Contributor

@gedu could you also have a look into the mWeb platforms (Chrome and Safari on mobile) thats missing in the PR body.

The tests failing might be actually related to the changes in this PR

@gedu
Copy link
Contributor Author

gedu commented Feb 15, 2023

The tests failing might be actually related to the changes in this PR

@mountiny I started a chat about it Slack, is failing even on main branch, without this changes.

@gedu
Copy link
Contributor Author

gedu commented Feb 15, 2023

@mountiny Videos uploaded

@eVoloshchak
Copy link
Contributor

@gedu, there's still videos missing for Desktop and Web

I think we can proceed with the test failing
image
Btw, is there supposed to be a green checkmark if one of the jobs failed?

Copy link
Contributor

@puneetlath puneetlath left a comment

Choose a reason for hiding this comment

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

Looks good to me. Let's make sure to add images or videos from all platforms before merging. Even if your code doesn't affect those platforms, just to show that things are generally still working as expected.

@eVoloshchak
Copy link
Contributor

eVoloshchak commented Feb 15, 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
Screen.Recording.2023-02-15.at.19.47.28.mov
Mobile Web - Chrome
Screen_Recording_20230215-203052_Chrome.mp4
Mobile Web - Safari
Screen.Recording.2023-02-15.at.20.33.06.mov
Desktop
Screen.Recording.2023-02-15.at.20.35.22.mov
iOS
Screen.Recording.2023-02-15.at.20.59.47.mov
Android
Screen_Recording_20230215-205735_New.Expensify.mp4

@gedu
Copy link
Contributor Author

gedu commented Feb 15, 2023

@puneetlath missing videos, should be up

Copy link
Contributor

@eVoloshchak eVoloshchak left a comment

Choose a reason for hiding this comment

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

LGTM!

@puneetlath puneetlath merged commit 5fa1c8b into Expensify:main Feb 15, 2023
@github-actions
Copy link
Contributor

Performance Comparison Report 📊

Significant Changes To Duration

There are no entries

Meaningless Changes To Duration

Show entries
Name Duration
App start TTI 726.090 ms → 731.543 ms (+5.453 ms, +0.8%)
App start regularAppStart 0.014 ms → 0.017 ms (+0.003 ms, +19.9%) 🟡
App start nativeLaunch 21.406 ms → 20.355 ms (-1.051 ms, -4.9%)
App start runJsBundle 203.188 ms → 199.688 ms (-3.500 ms, -1.7%)
Open Search Page TTI 663.953 ms → 648.298 ms (-15.655 ms, -2.4%)
Show details
Name Duration
App start TTI Baseline
Mean: 726.090 ms
Stdev: 41.549 ms (5.7%)
Runs: 639.259767999989 671.5586909999838 675.167472000001 681.9998149999883 682.560674999957 691.0682660000166 691.5427190000191 697.8105869999854 700.6896020000568 701.5417700000107 705.6987949999748 709.0413780000526 711.9031500000274 713.9154989999952 714.2419409999857 714.7241109999595 717.8623140000273 723.5384189999895 723.6775919999927 723.7550559999654 733.2643770000432 738.2581680000294 744.7607019999996 751.2566990000196 758.4931159999687 761.1331340000033 766.7259149999591 783.2171200000448 783.9604259999469 786.5543149999576 807.83885499998 827.8580640000291

Current
Mean: 731.543 ms
Stdev: 51.521 ms (7.0%)
Runs: 658.9742260000203 665.8848049999215 669.231838000007 677.240615000017 679.5504660001025 683.2727349998895 686.2579389999155 693.6252979999408 694.7920919999015 695.1526450000238 697.1436000000685 698.8497629999183 702.3322699998971 711.944884999888 716.500337000005 716.6201909999363 721.6656839998905 724.3920150001068 734.8917600000277 739.9857600000687 751.0332869999111 752.0435599999037 753.3128339999821 780.1342400000431 782.8506670000497 793.7961269998923 795.4087600000203 806.9107230000664 813.9908000000287 828.3305669999681 851.7223290000111
App start regularAppStart Baseline
Mean: 0.014 ms
Stdev: 0.001 ms (5.7%)
Runs: 0.01273600000422448 0.012776999967172742 0.013306000037118793 0.013427000027149916 0.013590999995358288 0.013630999950692058 0.013632000074721873 0.013833999983035028 0.013834999990649521 0.013834999990649521 0.013916000025346875 0.013916000025346875 0.013955999980680645 0.013998000067658722 0.014038000022992492 0.014078999985940754 0.014282000018283725 0.014405000023543835 0.014444999978877604 0.014486000058241189 0.014771000016480684 0.01493299996946007 0.01493299996946007 0.014933000085875392 0.015056000091135502 0.01525900000706315 0.01529899996239692 0.015341000049374998 0.015381000004708767 0.016357999993488193

Current
Mean: 0.017 ms
Stdev: 0.001 ms (7.4%)
Runs: 0.015176999848335981 0.015339999925345182 0.015420999843627214 0.015746999997645617 0.015868999995291233 0.016032000072300434 0.016112999990582466 0.01619499991647899 0.016275999834761024 0.016316999914124608 0.01672299997881055 0.016723999986425042 0.016805000137537718 0.016805000137537718 0.01684599998407066 0.01692699990235269 0.016967999981716275 0.017131000058725476 0.01721199997700751 0.01725299982354045 0.01725299982354045 0.017333999974653125 0.0177819998934865 0.018066999968141317 0.018472999799996614 0.018757999874651432 0.0188400000333786 0.01900200010277331 0.01993800001218915 0.02010100008919835
App start nativeLaunch Baseline
Mean: 21.406 ms
Stdev: 3.009 ms (14.1%)
Runs: 18 18 18 19 19 19 19 19 19 19 19 19 19 19 20 20 20 20 21 22 23 23 23 23 24 25 25 25 26 27 27 28

Current
Mean: 20.355 ms
Stdev: 1.893 ms (9.3%)
Runs: 18 18 18 18 19 19 19 19 19 19 19 19 19 19 19 20 20 20 21 21 21 21 22 22 22 22 23 23 23 24 25
App start runJsBundle Baseline
Mean: 203.188 ms
Stdev: 29.626 ms (14.6%)
Runs: 162 164 173 173 175 175 181 181 181 182 183 186 187 189 189 192 193 201 205 208 208 211 213 214 223 240 242 243 244 245 253 286

Current
Mean: 199.688 ms
Stdev: 27.304 ms (13.7%)
Runs: 168 169 171 172 174 174 175 176 178 180 181 181 181 186 190 197 197 198 198 203 205 206 207 208 212 215 223 239 253 254 259 260
Open Search Page TTI Baseline
Mean: 663.953 ms
Stdev: 35.339 ms (5.3%)
Runs: 603.9075520000188 616.1648760000244 619.9210210000165 620.7644859999418 627.145915000001 627.1811939999461 628.3747560000047 629.4367680000141 632.9782720000949 635.9509690001141 643.2353519999888 646.51387600007 647.0047619999386 653.0745040000184 655.319213999901 655.6803790000267 660.7268469999544 665.121541999979 672.9082039999776 675.0117600001395 676.717163000023 676.9122320000315 680.4733080000151 681.3010259999428 682.4538569999859 687.6974690000061 687.935913000023 697.3086349999066 700.7326259999536 719.0432950000977 722.6344810000155 733.4380700001493 747.3675950000761

Current
Mean: 648.298 ms
Stdev: 32.398 ms (5.0%)
Runs: 597.145222999854 599.893635999877 601.7372230000328 606.4687089999206 608.7080080001615 617.0946860001422 618.8548590000719 620.6822909999173 624.3391120000742 627.9415289999451 629.2223310000263 632.8288169999141 634.211386000039 635.5716559998691 639.2483320001047 639.9954429999925 643.1577969999053 646.8877769999672 648.5577800001483 652.3105879998766 657.8201909998897 659.9818120000418 662.9522710000165 665.0722660000902 665.2811280000024 673.1864429998677 683.7043049999047 687.208741000155 694.2205819999799 699.1878659999929 702.9324539999943 703.2585040000267 714.1671960002277

francoisl added a commit that referenced this pull request Feb 15, 2023
This is a follow-up of #14520 / #15097, where we changed the app's
behavior to keep the unread indicator present after backgrounding
and reopening the app.
@OSBotify
Copy link
Contributor

🚀 Deployed to staging by https://github.com/puneetlath in version: 1.2.73-0 🚀

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

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/francoisl in version: 1.2.73-1 🚀

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

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/francoisl in version: 1.2.73-1 🚀

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

josemak25 pushed a commit to josemak25/expensify that referenced this pull request Feb 26, 2023
This is a follow-up of Expensify#14520 / Expensify#15097, where we changed the app's
behavior to keep the unread indicator present after backgrounding
and reopening the app.
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.

7 participants