Fabric support on iOS #549
Closed
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.
Description
This PR adds Fabric integration to the FlashList on iOS. Here are some more important highlights:
CellContainerwithCellContainerComponentViewas keeping aCellContainerin everyCellContainerComponentViewdidn't look like a very good idea performance-wiseAutoLayoutView, I stayed with wrapping it with the Fabric Component (AutoLayoutViewComponentView). I didn't want to accidentally break the functionality converting in toobj-c. It may be possible that they can be merged via inheritance but I'm not that knowledgeable in interop betweenswiftandobj-cand couldn't get it to workAutoLayoutViewcontaining a closure, which in turn is set by theAutoLayoutViewComponentView. This way the code in swift has access to the generatedobj-c++method.AutoLayoutViewneeds to be wrapped with respectiveComponentView, the view hierarchy is different on Fabric. I added agetSubviews()method that has a different implementation when building for the new architecture.fabricfixtureapp to test Fabric integration without changing the original one.I have tested the
TwitterBenchmarkand the performance there didn't seem to differ between architectures.Fabric:
Paper:
The
fabricfixtureapp is pretty basic at the moment (onlyTwitterBenchmarkand commented outPaginated list) due to the compatibility of other libraries.Reviewers’ hat-rack 🎩
Screenshots or videos (if needed)
Checklist