Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RNMobile] Navigation in bottom-sheet #23782

Merged
merged 62 commits into from
Aug 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
3bb4399
Add navigation dependencies
dratwas Jul 7, 2020
826ec94
Add android links
dratwas Jul 7, 2020
8ce1446
link ios
dratwas Jul 7, 2020
5e1c216
WIP add height animation - needs polishing
dratwas Jul 7, 2020
5608682
Fix gradient picker
dratwas Jul 8, 2020
47db53a
remove unused variables
dratwas Jul 8, 2020
87931c7
Use FlatList inside the BottomSheet
dratwas Jul 8, 2020
fb12d7d
remove unused code
dratwas Jul 9, 2020
5627439
Move BottomSheetScreen to separate file
dratwas Jul 9, 2020
29c890a
Split color-settings to few files
dratwas Jul 9, 2020
98e6f14
add hardware back button support
dratwas Jul 9, 2020
77d797a
fix max height after back
dratwas Jul 9, 2020
5f3dafa
fix android padding when there is no safe area
dratwas Jul 9, 2020
2fe6c99
Add BottomSheet.NavigationContainer
dratwas Jul 10, 2020
2226c53
Merge branch 'master' into rnmobile/only-navigation
dratwas Jul 10, 2020
d5a735e
Update Podfile.lock
dratwas Jul 10, 2020
dff8665
Merge branch 'master' into rnmobile/only-navigation
dratwas Jul 13, 2020
e29eee3
revert changes with FlatList to make review easier
dratwas Jul 13, 2020
1159e6d
add mocks
dratwas Jul 15, 2020
9067fc3
use LayoutAnimmation
dratwas Jul 15, 2020
77249ff
update podfile.lock
dratwas Jul 15, 2020
77ed82e
Merge branch 'master' into rnmobile/only-navigation
dratwas Jul 15, 2020
ebec01e
add jitpack versions
dratwas Jul 16, 2020
df5316f
fix name of masked-view package
dratwas Jul 16, 2020
fdccb7d
Merge branch 'master' into rnmobile/only-navigation
dratwas Jul 16, 2020
6702ec5
add mocks for media
dratwas Jul 16, 2020
da2358e
fix css lint error
dratwas Jul 16, 2020
e9cfb16
update package-lock.json
dratwas Jul 16, 2020
8afbca2
fix dependencies
dratwas Jul 16, 2020
d953b7c
update masked-view package
dratwas Jul 17, 2020
6db1b4f
update lock file
dratwas Jul 17, 2020
eddfa38
update react-native-gesture-handler hash
dratwas Jul 17, 2020
9a0bff2
Merge branch 'master' into rnmobile/only-navigation
dratwas Jul 17, 2020
b97fe50
update deps
dratwas Jul 17, 2020
c4c3d9d
move names of screens to consts
dratwas Jul 17, 2020
ab1c66a
fix issue with import of blockSettingsScreen
dratwas Jul 20, 2020
5623d8b
bottom-sheet-context refactor
dratwas Jul 20, 2020
2e8ba6a
fix: rename handler prop in picker screen
dratwas Jul 20, 2020
b813d3a
fix spacing in slider
dratwas Jul 21, 2020
481dc18
set push animation
dratwas Jul 28, 2020
1079f27
use debounce to fix the initial animation
dratwas Jul 29, 2020
842d2e9
Merge branch 'master' into rnmobile/only-navigation
dratwas Jul 30, 2020
3d7c3d1
remove unused onReplaceSubsheet method
dratwas Jul 30, 2020
8995e69
refactor navigation screen and navigation container WIP
dratwas Jul 31, 2020
538dd5d
Merge branch 'master' into rnmobile/only-navigation
dratwas Aug 5, 2020
e3f8810
change animation to fade
dratwas Aug 5, 2020
746894e
change the in/out animation duration
dratwas Aug 6, 2020
0f0392e
Merge branch 'master' into rnmobile/only-navigation
dratwas Aug 10, 2020
14dcaf0
fix slider styles
dratwas Aug 10, 2020
9e4d12f
rename setMaxHeight to avoid confusion
dratwas Aug 11, 2020
9019740
fix js-lint
dratwas Aug 11, 2020
9bba9be
use configPath in jest config
dratwas Aug 11, 2020
2b58be6
performance optimisation
dratwas Aug 12, 2020
1cc94db
fix custom color from initial palette - cover block
dratwas Aug 13, 2020
08b9509
refactor navigation screen and navigation container
dratwas Aug 13, 2020
73bab86
Merge branch 'master' into rnmobile/only-navigation
dratwas Aug 13, 2020
537c5f2
Revert cell styles
dratwas Aug 13, 2020
ddbcfcd
Add readme for navigation in bottom sheet and refactor container and …
dratwas Aug 13, 2020
a19b4e8
rename dirname because manifest title
dratwas Aug 13, 2020
8f9ba55
update manifest
dratwas Aug 13, 2020
175012b
make custom-gradient-picker component independent of navigation
dratwas Aug 13, 2020
433d812
Merge branch 'master' into rnmobile/only-navigation
dratwas Aug 14, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,12 @@
"markdown_source": "../packages/components/src/menu-items-choice/README.md",
"parent": "components"
},
{
"title": "BottomSheetNavigation",
"slug": "bottom-sheet-navigation",
"markdown_source": "../packages/components/src/mobile/bottom-sheet/bottom-sheet-navigation/README.md",
"parent": "components"
},
{
"title": "Modal",
"slug": "modal",
Expand Down
177 changes: 174 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
/**
* WordPress dependencies
*/
import {
BottomSheet,
BottomSheetConsumer,
ColorSettings,
colorsUtils,
} from '@wordpress/components';
import { withSelect, withDispatch } from '@wordpress/data';
import { compose } from '@wordpress/compose';
import { InspectorControls } from '@wordpress/block-editor';

import { BottomSheet, ColorSettings } from '@wordpress/components';
import { compose } from '@wordpress/compose';
import { withDispatch, withSelect } from '@wordpress/data';
/**
* Internal dependencies
*/
import styles from './container.native.scss';

export const blockSettingsScreens = {
settings: 'Settings',
color: 'Color',
};

function BottomSheetSettings( {
editorSidebarOpened,
closeGeneralSidebar,
Expand All @@ -30,23 +29,18 @@ function BottomSheetSettings( {
contentStyle={ styles.content }
{ ...props }
>
<BottomSheetConsumer>
{ ( { currentScreen, extraProps, ...bottomSheetProps } ) => {
switch ( currentScreen ) {
case colorsUtils.subsheets.color:
return (
<ColorSettings
defaultSettings={ settings }
{ ...bottomSheetProps }
{ ...extraProps }
/>
);
case colorsUtils.subsheets.settings:
default:
return <InspectorControls.Slot />;
}
} }
</BottomSheetConsumer>
<BottomSheet.NavigationContainer animate main>
<BottomSheet.NavigationScreen
name={ blockSettingsScreens.settings }
>
<InspectorControls.Slot />
</BottomSheet.NavigationScreen>
<BottomSheet.NavigationScreen
name={ blockSettingsScreens.color }
>
<ColorSettings defaultSettings={ settings } />
</BottomSheet.NavigationScreen>
</BottomSheet.NavigationContainer>
</BottomSheet>
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
export { default as BlockSettingsButton } from './button';
export { default as BottomSheetSettings } from './container';
export {
default as BottomSheetSettings,
blockSettingsScreens,
} from './container';
Loading