refactor(iOS, FormSheet v5): Introduce AppearanceApplicator#4040
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors iOS FormSheet (gamma) configuration by extracting UISheetPresentationController setup logic out of RNSFormSheetHostComponentView into a new dedicated RNSFormSheetAppearanceApplicator class, mirroring the SplitView pattern.
Changes:
- Introduced new
RNSFormSheetAppearanceApplicatorclass encapsulating sheet configuration and the_initialDetentAppliedstate. - Removed inline
updateConfigurationand related ivars from the host view; promoted several ivars to readonly properties (with adetentsaccessor) so the applicator can read host state. - Wired the applicator into
finalizeUpdatesand reset of initial-detent flag on reopen.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| ios/gamma/modals/form-sheet/RNSFormSheetAppearanceApplicator.h | New header declaring the applicator interface. |
| ios/gamma/modals/form-sheet/RNSFormSheetAppearanceApplicator.mm | New implementation containing the moved configuration logic and initial-detent tracking. |
| ios/gamma/modals/form-sheet/RNSFormSheetHostComponentView.h | Exposes host props as readonly properties and a detents accessor via a class extension. |
| ios/gamma/modals/form-sheet/RNSFormSheetHostComponentView.mm | Removes inline configuration, instantiates the applicator, and delegates updates to it. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
kligarski
approved these changes
May 18, 2026
3b20840 to
9f81e03
Compare
Base automatically changed from
@t0maboro/formsheet-appearance-coordinator
to
main
May 19, 2026 09:44
be440b9 to
fc3d2ad
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Introducing the
AppearanceApplicatorclass, which is responsible for the configuration ofUISheetPresentationController. Moving already implemented configuration from the HostView's scope.Note: This might not be the final shape, because the Host should only receive props and notify the controller, but it seems to be independent of introducing the AppearanceApplicator concept, and it can be implemented in the stacked PR.
Note
I know that AppearanceApplicator should be stateless, but in this PR, I just want to introduce the concept and move the implementation to a dedicated class, preserving all functionalities. I want to move both AppearanceApplicator & AppearanceCoordinator to the Controller level in a follow-up PR.
Changes
AppearanceApplicatorfollowing the SplitView's implementation.Before & after - visual documentation
N/A - refactor
Test plan
Go through available SFTs for sheets.
Checklist