Skip to content

Commit

Permalink
Fix invisible bottom sheet backdrop on Android (#35557)
Browse files Browse the repository at this point in the history
* Fix invisible bottom sheet backdrop on Android

Animating the opacity for the initial modal results in the backdrop
provided by `react-native-modal` to never transition from transparent
to partially opaque black. The core issue was not idenfited, but it
may relate to the experimental state of LayoutAnimation for Android.
https://reactnative.dev/docs/layoutanimation

* Update change log

* Empty commit to trigger rebuilds

Attempt to resolve flaky, failing e2e tests.
  • Loading branch information
dcalhoun authored Oct 12, 2021
1 parent c8148c2 commit 19614a3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
Children,
useRef,
cloneElement,
Platform,
} from '@wordpress/element';

import { usePreferredColorSchemeStyle } from '@wordpress/compose';
Expand Down Expand Up @@ -93,7 +94,14 @@ function BottomSheetNavigationContainer( {
typeof height !== 'string' ) ||
typeof height === 'string'
) {
performLayoutAnimation( ANIMATION_DURATION );
// Animating the opacity for the initial modal results in the backdrop
// provided by react-native-modal to never transition from transparent
// to partially opaque black. The core issue was not idenfited, but it
// may relate to the experimental state of LayoutAnimation for Android.
// https://reactnative.dev/docs/layoutanimation
if ( ! Platform.isAndroid || currentHeight !== 1 ) {
performLayoutAnimation( ANIMATION_DURATION );
}
setCurrentHeight( height );

return;
Expand Down
1 change: 1 addition & 0 deletions packages/react-native-editor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ For each user feature we should also add a importance categorization label to i
## Unreleased
- [*] [Embed block] Fix inline preview cut-off when editing URL [#35321]
- [*] [Unsupported Block Editor] Fix text selection bug for Android [#34668]
- [*] Fixed missing modal backdrop for Android help section [#35557]
- [*] Fixed erroneous overflow within editor Help screens. [#35552]

## 1.63.0
Expand Down

0 comments on commit 19614a3

Please sign in to comment.