-
-
Notifications
You must be signed in to change notification settings - Fork 516
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add
FullWindowOverlay
component for Fabric (#1495)
* bookmark: fabric-full-window-overlay INIT * chore: adapt RNSFullWindowOverlay native interface to Fabric * chore: initial adaptation of RNSFullWindowOverlay implementation WIP * chore: add FullWindowOverlay to Fabric JS * chore: add componentDescriptorProvider method & RNSFullWindowOverlayCls * chore: exclude RNSFullWindowOverlayManager#view method from Fabric * chore: add missing headers * fix: init props * chore: add prepareForRecycle method However more extensive logic may be required for Fabric as it seems to me, that _container wont be initialized for the second time * chore: move reactSetFrame method to paper specific section * chore: mount child component view & update layout metrics * fix: add maybeShow method. When the component unmounts we remove it from window's children, so when the component gets recycled we need to add it back. Also see comments added in the code.
- Loading branch information
Showing
6 changed files
with
161 additions
and
9 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React from 'react'; | ||
import FullWindowOverlayNativeComponent from './FullWindowOverlayNativeComponent'; | ||
|
||
function FullWindowOverlay(props) { | ||
return ( | ||
<FullWindowOverlayNativeComponent | ||
{...props} | ||
style={[{ flex: 1 }, props.style]} | ||
/> | ||
); | ||
} | ||
|
||
export default FullWindowOverlay; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* @flow strict-local | ||
* @format | ||
*/ | ||
/* eslint-disable */ | ||
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; | ||
import type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes'; | ||
import type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; | ||
|
||
type NativeProps = $ReadOnly<{| | ||
...ViewProps, | ||
|}>; | ||
|
||
type ComponentType = HostComponent<NativeProps>; | ||
|
||
export default (codegenNativeComponent<NativeProps>( | ||
'RNSFullWindowOverlay', | ||
{} | ||
): ComponentType); |
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
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