Skip to content

refactor(iOS, FormSheet v5): Introduce AppearanceApplicator#4040

Merged
t0maboro merged 2 commits into
mainfrom
@t0maboro/formsheet-appearance-applicator
May 19, 2026
Merged

refactor(iOS, FormSheet v5): Introduce AppearanceApplicator#4040
t0maboro merged 2 commits into
mainfrom
@t0maboro/formsheet-appearance-applicator

Conversation

@t0maboro
Copy link
Copy Markdown
Contributor

@t0maboro t0maboro commented May 15, 2026

Description

Introducing the AppearanceApplicator class, which is responsible for the configuration of UISheetPresentationController. 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

  • Introduced AppearanceApplicator following the SplitView's implementation.
  • Moved the logic related to sheet configuration from Host to AppearanceApplicator

Before & after - visual documentation

N/A - refactor

Test plan

Go through available SFTs for sheets.

Checklist

  • Included code example that can be used to test this change.
  • For visual changes, included screenshots / GIFs / recordings documenting the change.
  • For API changes, updated relevant public types.
  • Ensured that CI passes

@t0maboro t0maboro changed the base branch from main to @t0maboro/formsheet-appearance-coordinator May 15, 2026 11:34
@t0maboro t0maboro changed the title refactor(iOS, FormSheet v5): Introduce AppearanceApplicator logic refactor(iOS, FormSheet v5): Introduce AppearanceApplicator May 15, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 RNSFormSheetAppearanceApplicator class encapsulating sheet configuration and the _initialDetentApplied state.
  • Removed inline updateConfiguration and related ivars from the host view; promoted several ivars to readonly properties (with a detents accessor) so the applicator can read host state.
  • Wired the applicator into finalizeUpdates and 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.

@t0maboro t0maboro force-pushed the @t0maboro/formsheet-appearance-coordinator branch from 3b20840 to 9f81e03 Compare May 19, 2026 08:53
Base automatically changed from @t0maboro/formsheet-appearance-coordinator to main May 19, 2026 09:44
@t0maboro t0maboro force-pushed the @t0maboro/formsheet-appearance-applicator branch from be440b9 to fc3d2ad Compare May 19, 2026 09:52
@t0maboro t0maboro merged commit 0c51194 into main May 19, 2026
6 checks passed
@t0maboro t0maboro deleted the @t0maboro/formsheet-appearance-applicator branch May 19, 2026 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants