This repository has been archived by the owner on Feb 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[ASCollectionLayout] Manually set size to measured cells #3262
Closed
nguyenhuy
wants to merge
25
commits into
facebookarchive:master
from
nguyenhuy:HNMissingCellsInCollectionLayout
Closed
[ASCollectionLayout] Manually set size to measured cells #3262
nguyenhuy
wants to merge
25
commits into
facebookarchive:master
from
nguyenhuy:HNMissingCellsInCollectionLayout
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1c99276
to
f893fdf
Compare
f893fdf
to
8739bac
Compare
* Adding buildkite support * Update build.sh to support all flag
* Rename AsyncDisplayKit to Texture * More renaming
* Update README.md * Update README.md
* Update contribution guidelines * Some improvements * Improve code * Update based on feedback
Adlai-Holler
approved these changes
Apr 17, 2017
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.
I'll re-approve once this is reopened on the Texture repo.
8739bac
to
bfb452b
Compare
PR ported! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Currently,
ASDataController
sets the calculated size of a cell node right after measuring it (here). This behavior dates all the way back to the first implementation ofASDataController
. This is to ensure that by the time the cell needs to display, it has a valid size and theneedsLayout
flag of its layer is on. Failing to do so will cause it to skip its display pass entirely.ASCollectionLayout currently doesn't do this which causes some cells to be missing. This PR updates ASCollectionLayout to set the frame whenever a node's layout attributes is asked.
There are 2 other places we can fix this:
didEnterPreloadState
, the node needs to grab its calculated size and assumes that the size is valid. However, I'd prefer ASCollectionLayout to be in charge of these kind of decisions.Ticket: #3219