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

Bump onyx to fix replay effect (after revert) #34801

Merged
merged 32 commits into from
Jan 29, 2024

Conversation

chrispader
Copy link
Contributor

@chrispader chrispader commented Jan 19, 2024

@neil-marcellini @roryabraham @mountiny

Details

Original bump PR: #33554

Bumps Onyx to the latest version and fixes the "replay" effect problem with Expensify/react-native-onyx#437.

Bumps Node and NPM versions of Onyx based on #12775 (comment)

Includes changes needed to use Onyx after the recent TS setup PR

Fixed Issues

For #12775
PROPOSAL:

Tests

  • Verify that no errors appear in the JS console
  1. Open NewDot
  2. Turn off network
  3. Create a workspace
  4. Delete the workspace
  5. Turn on network
  6. Check that the workspace is removed and disappears and it doesn't flash
  7. Check for unexpected behaviours and console errors when it comes to network requests and storing data locally

  1. Check for any unknown behaviour regarding storage/Onyx
  2. Check for console errors related to TypeScript, Onyx and Node/NPM

Offline tests

None needed.

QA Steps

  • Verify that no errors appear in the JS console

Same as in Tests.

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: mWeb Chrome
    • iOS: Native
    • iOS: mWeb 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 the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
    • 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 grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is 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 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(theme.componentBG))
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • 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 the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label so the design team can review the changes.
  • 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.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native

Screenshot_20240123_193419_New Expensify Dev

Android: mWeb Chrome
iOS: Native

Simulator Screenshot - iPhone 15 Pro - 2024-01-23 at 19 33 33

iOS: mWeb Safari

Simulator Screenshot - iPhone 15 Pro - 2024-01-23 at 19 42 31

MacOS: Chrome / Safari Screenshot 2024-01-23 at 19 30 33
MacOS: Desktop Screenshot 2024-01-23 at 19 39 42

Copy link
Contributor

@aimane-chnaif aimane-chnaif left a comment

Choose a reason for hiding this comment

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

@aimane-chnaif
Copy link
Contributor

Ah, Onyx version is not actually bumped here

@chrispader
Copy link
Contributor Author

@aimane-chnaif yes, but this is only a draft now, everything still WIP.

Still have to figure out all of the problems with the new logic in Onyx

@VickyStash
Copy link
Contributor

@chrispader Will it be possible for you to update the Onyx version to 1.0.130 in this PR? That version contains a small TS fix, which should unblock me in one of mine migrations

@chrispader
Copy link
Contributor Author

@chrispader Will it be possible for you to update the Onyx version to 1.0.130 in this PR? That version contains a small TS fix, which should unblock me in one of mine migrations

Yes, i can include the changes from your PR :)

@chrispader chrispader changed the title Bump onyx to fix replay effect (after revert) [HOLD on Onyx#458] Bump onyx to fix replay effect (after revert) Jan 23, 2024
@chrispader
Copy link
Contributor Author

Waiting for Expensify/react-native-onyx#458 to be merged, before we can bump Onyx here...

@chrispader chrispader changed the title [HOLD on Onyx#458] Bump onyx to fix replay effect (after revert) Bump onyx to fix replay effect (after revert) Jan 23, 2024
@chrispader chrispader marked this pull request as ready for review January 23, 2024 18:24
@chrispader chrispader requested a review from a team as a code owner January 23, 2024 18:24
@melvin-bot melvin-bot bot requested review from hayata-suenaga and removed request for a team January 23, 2024 18:24
Copy link

melvin-bot bot commented Jan 23, 2024

@hayata-suenaga 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]

@chrispader
Copy link
Contributor Author

#33554 (comment)

Noting there are 3 known issues found after this change for later debugging, we had to revert:

The first two regressions are fixed.

Not sure if i can properly test the third regression. I tried following the repro steps, but when i'm already signed into ND with an account and then redirect from OD with a different account, the currently logged in account (in ND) will stay logged in and get redirected to the new workspace page.. Is this intendend?

@aimane-chnaif
Copy link
Contributor

Also couldn't reproduce the "inifinte loading" on the second tab. By "second tab", do you refer to the one where you put in the link or where you entered you're email.

first tab: enter email and hit sign in
second tab: put in the email link

@chrispader
Copy link
Contributor Author

first tab: enter email and hit sign in second tab: put in the email link
second tab: put in the email link

ah ok, that's what i thought. I couldn't repro the infinite loading though..

@aimane-chnaif
Copy link
Contributor

Just tried again. This time took full video for clarify.
Infinite loading still happens on 2nd tab

Screen.Recording.2024-01-26.at.12.08.53.PM.mov

@aimane-chnaif
Copy link
Contributor

Confirmed also happening on production. So out of scope

Screen.Recording.2024-01-26.at.12.13.11.PM.mov

Copy link
Contributor

@neil-marcellini neil-marcellini 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. Thank you all! Let's only revert this if it's proved to be the cause of major regressions.

@aimane-chnaif
Copy link
Contributor

Oops conflicts

@neil-marcellini
Copy link
Contributor

@chrispader please resolve the merge conflicts

@chrispader
Copy link
Contributor Author

chrispader commented Jan 27, 2024

@chrispader please resolve the merge conflicts

going to do that later today! in ~6-8hours

@chrispader
Copy link
Contributor Author

@chrispader please resolve the merge conflicts

@neil-marcellini conflicts resolved!

@chrispader
Copy link
Contributor Author

I'm going to be 100% OOO from 31/01/2024 - 17/03/2024, but i'm available until then. @neil-marcellini maybe we can merge this PR today?

@neil-marcellini neil-marcellini merged commit d7be964 into Expensify:main Jan 29, 2024
15 of 17 checks passed
@neil-marcellini
Copy link
Contributor

@chrispader merged!

I merged without Snyk passing because we usually makr Snyk as successful as noted in Slack here. It says I'm not an admin to mark it as successful but I think this is fine.

@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.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by https://github.com/neil-marcellini in version: 1.4.33-0 🚀

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

@mvtglobally
Copy link

We have few Testers noticing a flashing when running this PR and same is not repro in consistently. Workspace chats are not still marked as "archived" when coming back online.
Should we report as a blocker? Can anyone try to repro the same on Expensify side?

Note that when user is back online, the "archived" status of the workspace chats disappears until the user goes back to the chats again

https://github.com/Expensify/App/assets/43995119/b83a2109-b18d-48a5-ac0e-ca9c26cc9751
https://github.com/Expensify/App/assets/43995119/b7f64673-b286-4f58-aa94-7b8d01e4e45e

@francoisl
Copy link
Contributor

I experienced the flashing on one 2 attempts

Screen.Recording.2024-01-30.at.5.36.25.PM.mov

I don't think it's worth blocking the deploy for this though, for now I'll update the PR description so that it doesn't close the parent issue and can be looked into further.

Copy link

melvin-bot bot commented Jan 31, 2024

Hey, I noticed you changed some webpack configuration files. This can break production builds. Did you remember to run a production build locally to verify they still work?

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/francoisl in version: 1.4.33-5 🚀

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.