-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Fix OptionRow shouldComponentUpdate #14791
Conversation
@rushatgabhane @stitesExpensify 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] |
|
Reviewer Checklist
Screenshots/VideosPer the steps, I have tested on web and desktop and checked mobile versions work without issue but there is no arrow up key to test there WebScreen.Recording.2023-02-03.at.09.21.02.movMobile Web - ChromeNo arrow key event to test on mobile Mobile Web - SafariNo arrow key event to test on mobile DesktopScreen.Recording.2023-02-03.at.09.29.31.moviOSNo arrow key event to test on mobile AndroidNo arrow key event to test on mobile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment, tested well!
|| this.props.isSelected !== nextProps.isSelected | ||
|| this.props.showSelectedState !== nextProps.showSelectedState | ||
|| this.props.showTitleTooltip !== nextProps.showTitleTooltip | ||
|| _.isEqual(this.props.option.icons, nextProps.option.icons) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@roryabraham Should this be is not equal to?
|| _.isEqual(this.props.option.icons, nextProps.option.icons) | |
|| !_.isEqual(this.props.option.icons, nextProps.option.icons) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, good catch. I will create a little follow-up PR for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
made on earlier today here #14794
Well I think this is a small change and in the worst case the option row wont update when the icons change so I will make a follow up on that without CP to let that go in a normal process. |
Fix OptionRow shouldComponentUpdate (cherry picked from commit 82ca163)
…-14791 🍒 Cherry pick PR #14791 to staging 🍒
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 1.2.64-5 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/thienlnam in version: 1.2.64-7 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.2.64-7 🚀
|
1 similar comment
🚀 Deployed to production by https://github.com/thienlnam in version: 1.2.64-7 🚀
|
🚀 Cherry-picked to staging by https://github.com/AndrewGable in version: 1.3.28-2 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/AndrewGable in version: 1.3.28-5 🚀
|
Details
Fixes bad implementation of
OptionRow.shouldComponentUpdate
(regression caused by https://github.com/Expensify/App/pull/14426/files.Fixed Issues
$ #14787
Tests
CMD+K
ArrowDown
Offline tests
None.
QA Steps
Steps listed in #14787. Should also be covered by regression tests.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.Screenshots/Videos
Because this is a deploy blocker (#urgency). Screenshots are only shown for web where the issue is most easily demonstrated. This is a small patch that's an obvious mistake in hindsight.
Web
Web.mov
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android