Skip to content

Commit

Permalink
feat: Add support for Modal on iOS when Fabric is enabled (facebook#3…
Browse files Browse the repository at this point in the history
…4487)

Summary:
While working on a fix for facebook#29974 (I have a draft for that already (gabrieldonadel#16), just waiting for facebook#34406 to get merged) I noticed that the `KeyboardAvoidingView` tests on RNTester on iOS were not working with Fabric enabled because the `ModalHostView` component was still not implemented. Upon some more investigation, I found this code suggestion from Milker90 (facebook#33652 (comment)) that enables the Modal component on iOS when Fabric is enabled.

Closes facebook#33652

## Changelog

[iOS] [Added] - Add support for Modal on iOS when Fabric is enabled

Pull Request resolved: facebook#34487

Test Plan:
1. With Fabric enabled open the RNTester app and navigate to the Modal page
2. Test the `Modal` component through the sections changing props

https://user-images.githubusercontent.com/11707729/186289099-5223907d-b300-46bf-bfde-73259c29d544.mov

Reviewed By: christophpurrer

Differential Revision: D38981895

Pulled By: cipolleschi

fbshipit-source-id: cd493a8d2035900da2576323bc112e2565df4834
  • Loading branch information
gabrieldonadel authored and raykle committed Aug 27, 2022
1 parent c76e59c commit 15ef4d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Class<RCTComponentViewProtocol> RCTTextInputCls(void) __attribute__((used));
Class<RCTComponentViewProtocol> RCTInputAccessoryCls(void) __attribute__((used));
Class<RCTComponentViewProtocol> RCTViewCls(void) __attribute__((used));
Class<RCTComponentViewProtocol> RCTImageCls(void) __attribute__((used));
Class<RCTComponentViewProtocol> RCTModalHostViewCls(void) __attribute__((used));

#ifdef __cplusplus
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
{"InputAccessoryView", RCTInputAccessoryCls},
{"View", RCTViewCls},
{"Image", RCTImageCls},
{"ModalHostView", RCTModalHostViewCls},
};

auto p = sFabricComponentsClassMap.find(name);
Expand Down

0 comments on commit 15ef4d0

Please sign in to comment.