Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Optimize the left-hand-nav to only render options when they need to be visible #10800
Optimize the left-hand-nav to only render options when they need to be visible #10800
Changes from 75 commits
d00f253
0f88560
7f863d4
4a4e100
67a2cc4
fd9d0e2
3bc3974
30d6839
04ade70
7e6415f
e825e1b
47f01cb
5ec8823
2e35baf
a6a2a67
f1550a3
02c1b21
2de9592
a39309b
62aacd2
ef2d28a
958d581
023fb06
1b6b6da
eee30e5
0f211a6
c0131c3
078e383
c23c625
bc10dfb
0e2335c
a2e84e8
f28ba65
edc7475
e901579
405e4f6
894debb
205e8c3
1b71313
ac4c9ab
61815e7
350204a
89d2da2
e041f92
635e621
efe754e
1ed435e
3c1b63f
5eddedb
f8d3e4a
409c6f3
c03c351
6718910
dd5b116
2a40243
cddadd3
3af87d7
46f0251
4b1c407
8a9806a
87fcd06
e6eb624
7493711
709210b
48f0008
ef187ee
16474e0
8240970
546f914
8b1a91b
a191891
2b0adba
157cf62
66bdd9c
dd4d139
23bd4dd
f6fb287
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Turns out that on compact (focus) mode, because of the
styles.optionAlternateText
we had this emoji alignment issue #41367 on iOS: Native only.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.
NAB but maybe a good thing to look into... this is kind of yellow flag since the feature breaks if you scroll to the next set of users? 🤔
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.
Yeah, this was existing code, so could you create a GH so we don't forget to look into that? Would be great for Margelo to look into.
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.
Is React.memo is missing is it on purpose?
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.
Sort of, yes. I didn't purposefully avoid it, but could help me understand how it helps here? There is a lot that I don't know, so I'm just looking to learn more about it!
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.
FlatList rerenders items onScroll event also when you add more items. Without memo items will be re-rendered.
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.
My concern is the option row depends on 6 different collections of data from Onyx in order to render, and it should re-render if any of those change (like the name of a report participant for example). Since the only prop being passed to this component is
reportID
, then the component has no other way of re-rendering when some of the Onyx data changes unlessOptionRowLHN
also subscribes to the samewithOnyx()
data. I was really trying to avoid having possibly thousands of theseOptionRowLHN
components all connected to Onyx individually as I don't know what it would do for performance.Ultimately, if it's very very cheap to render
OptionRowLHN
then the benefit of memoizing it becomes less.Can you think of anything else that would help?