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

Remove unnecessary withOnyx from chat messages #4573

Merged
merged 1 commit into from
Aug 11, 2021

Conversation

marcaaron
Copy link
Contributor

@marcaaron marcaaron commented Aug 11, 2021

Details

Missed this when creating the context provider - there is an additional withOnyx() getting connected to each chat message slowing down chat rendering. There is more context about this in the original PR that added the OnyxProvider here -> #4348

cc @kidroca

Fixed Issues (Related To)

#4022

Tests

QA Steps

  1. No specific tests. Make sure chats load normally.

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

Mobile Web

Desktop

iOS

Android

@marcaaron marcaaron requested a review from a team as a code owner August 11, 2021 17:50
@marcaaron marcaaron self-assigned this Aug 11, 2021
@MelvinBot MelvinBot requested review from nkuoch and removed request for a team August 11, 2021 17:50
@nkuoch nkuoch merged commit 0448b00 into main Aug 11, 2021
@nkuoch nkuoch deleted the marcaaron-withCurrentDate branch August 11, 2021 20:17
@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 @nkuoch in version: 1.0.85-10 🚀

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

currentDate: {
key: ONYXKEYS.CURRENT_DATE,
},
}),
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey @marcaaron I've noticed this component does not use the date received from Onyx at all
Is this something we're passing to force a re-render?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm that's a good question. I didn't look into the original intention behind why this subscription was added. Maybe we can look at the git blame to find out more.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Original PR is here -> https://github.com/Expensify/App/pull/3573/files

I think the intention is to force a re-render.

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @roryabraham in version: 1.0.86-11 🚀

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants