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

[No QA] Small refactors. #2744

Merged
merged 4 commits into from
May 13, 2021
Merged

[No QA] Small refactors. #2744

merged 4 commits into from
May 13, 2021

Conversation

parasharrajat
Copy link
Member

@parasharrajat parasharrajat commented May 7, 2021

@marcaaron Please review.

Details

  1. Just realized that we are updating the state unnecessary in the Tooltips & added on-demand rendering.
  2. Marc's comment Fix: Messages marked as read incorrectly for last chat #2553 (comment)

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

@parasharrajat parasharrajat requested a review from a team as a code owner May 7, 2021 18:54
@MelvinBot MelvinBot requested review from cead22 and removed request for a team May 7, 2021 18:55
@@ -155,7 +155,7 @@ class ReportActionsView extends React.Component {
const previousLastSequenceNumber = lodashGet(lastItem(prevProps.reportActions), 'sequenceNumber');
const currentLastSequenceNumber = lodashGet(lastItem(this.props.reportActions), 'sequenceNumber');
const shouldRecordMaxAction = Visibility.isVisible()
&& !(this.props.isDrawerOpen && this.props.isSmallScreenWidth);
&& (!this.props.isSmallScreenWidth || !this.props.isDrawerOpen);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we please add a comment here and list out every situations where we will record the max action?

@@ -174,7 +160,7 @@ class Tooltip extends PureComponent {
tooltipTextStyle,
pointerWrapperStyle,
pointerStyle,
} = getTooltipStyles(
} = this.state.isReady ? getTooltipStyles(
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this necessary? We are not using any of these styles anyway unless this.state.isReady === true.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it's better to just move this style calculations to TooltipRenderedOnPageBody as they are only used there.

@parasharrajat
Copy link
Member Author

Updated. Thanks

@parasharrajat parasharrajat requested a review from marcaaron May 7, 2021 20:42
@marcaaron marcaaron merged commit 52d3afb into Expensify:main May 13, 2021
@OSBotify
Copy link
Contributor

🚀 Deployed to staging in version: 1.0.43-9🚀

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

@OSBotify
Copy link
Contributor

🚀 Deployed to production in version: 1.0.44-0🚀

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

@parasharrajat parasharrajat deleted the refactor branch November 20, 2023 13:09
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.

4 participants