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] Editor Onboarding: "The Basics" help section - Details Part 1 #33790

Merged
merged 25 commits into from
Aug 3, 2021
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c02c659
Add help menu option to iOS demo app
AmandaRiu Jul 6, 2021
d23f810
Add basic help topics bottom sheet
AmandaRiu Jul 6, 2021
6de6287
Add help option to Android demo app
AmandaRiu Jul 6, 2021
478447d
Add new help topics icons
AmandaRiu Jul 7, 2021
fd3ad45
Add help topics to main help bottom sheet
AmandaRiu Jul 7, 2021
1cd48a1
Remove unused imports
AmandaRiu Jul 7, 2021
7eff1a7
Optimized new SVG images using https://jakearchibald.github.io/svgomg/
AmandaRiu Jul 7, 2021
6f2a617
Merge branch 'trunk' into rnmobile/editor-onboarding-basic-help-2
AmandaRiu Jul 8, 2021
23c3531
Add navigation to help detail subsheet
AmandaRiu Jul 8, 2021
80ce670
Add react-native and react-navigation to package.json per lint
AmandaRiu Jul 8, 2021
5bfec94
Fix lint errors
AmandaRiu Jul 8, 2021
59ead05
Add images for help detail sections
AmandaRiu Jul 9, 2021
cca5bde
Add intro to blocks page
AmandaRiu Jul 9, 2021
787aa4f
Add remaining help detail pages
AmandaRiu Jul 9, 2021
c8d56fc
Link help details to topics
AmandaRiu Jul 9, 2021
556d1d9
WIP
AmandaRiu Jul 31, 2021
4bfd81d
Merge branch 'trunk' into rnmobile/editor-onboarding-basic-help-4
AmandaRiu Jul 31, 2021
8b11125
Remove unnecessary dependency
AmandaRiu Jul 31, 2021
0544993
Cleanup code, remove debugging
AmandaRiu Jul 31, 2021
dce0398
Patch to correct issues with asset loading at runtime
AmandaRiu Jul 31, 2021
4a1ca51
Fix lint errors by removing unused imports
AmandaRiu Aug 2, 2021
b2b1363
Remove extreneous filename extension from import
AmandaRiu Aug 2, 2021
af28285
Rename view property for clarity
AmandaRiu Aug 2, 2021
b68013c
Remove memoization
AmandaRiu Aug 2, 2021
c559402
Fix Metro local static image paths (#33829)
dcalhoun Aug 2, 2021
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
Prev Previous commit
Next Next commit
Link help details to topics
AmandaRiu committed Jul 9, 2021
commit c8d56fc4c0c2dfd9c4e063f0d8e1ec2232d3de74
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
/**
* External dependencies
*/
import { View, Text } from 'react-native';
import { View } from 'react-native';

/**
* WordPress dependencies
*/
import { BottomSheet } from '@wordpress/components';
import { useNavigation } from '@react-navigation/native';
import { __ } from '@wordpress/i18n';

/**
* Internal dependencies
*/
import styles from './style.scss';
import { __ } from '@wordpress/i18n';

const HelpDetailNavigationScreen = ( { name } ) => {
const HelpDetailNavigationScreen = ( { name, view } ) => {
const navigation = useNavigation();

const goBack = () => {
@@ -29,7 +29,7 @@ const HelpDetailNavigationScreen = ( { name } ) => {
leftButtonOnPress={ goBack }
/>
<View style={ styles.separator } />
<Text>Amanda todo</Text>
{ view }
</BottomSheet.NavigationScreen>
);
};
29 changes: 24 additions & 5 deletions packages/editor/src/components/editor-help/index.native.js
Original file line number Diff line number Diff line change
@@ -24,13 +24,30 @@ import {
import styles from './style.scss';
import HelpDetailNavigationScreen from './help-detail-navigation-screen.js';
import HelpTopicRow from './help-topic-row.js';
import IntroToBlocks from './intro-to-blocks';
import AddBlocks from './add-blocks';
import MoveBlocks from './move-blocks';
import RemoveBlocks from './remove-blocks';
import CustomizeBlocks from './customize-blocks';

const HELP_TOPICS = [
{ label: __( 'What is a block?' ), icon: helpFilled },
{ label: __( 'Add blocks' ), icon: plusCircleFilled },
{ label: __( 'Move blocks' ), icon: alignJustifyAlt },
{ label: __( 'Remove blocks' ), icon: trashFilled },
{ label: __( 'Customize blocks' ), icon: cogAlt },
{
label: __( 'What is a block?' ),
icon: helpFilled,
view: <IntroToBlocks />,
},
{
label: __( 'Add blocks' ),
icon: plusCircleFilled,
view: <AddBlocks />,
},
{ label: __( 'Move blocks' ), icon: alignJustifyAlt, view: <MoveBlocks /> },
{ label: __( 'Remove blocks' ), icon: trashFilled, view: <RemoveBlocks /> },
{
label: __( 'Customize blocks' ),
icon: cogAlt,
view: <CustomizeBlocks />,
},
];

function EditorHelpTopics( { isVisible, onClose, getStylesFromColorScheme } ) {
@@ -45,6 +62,7 @@ function EditorHelpTopics( { isVisible, onClose, getStylesFromColorScheme } ) {
onClose={ onClose }
hideHeader
hasNavigation
contentStyle={ styles.contentContainer }
>
<BottomSheet.NavigationContainer animate main>
<BottomSheet.NavigationScreen name={ 'Topics' }>
@@ -81,6 +99,7 @@ function EditorHelpTopics( { isVisible, onClose, getStylesFromColorScheme } ) {
<HelpDetailNavigationScreen
key={ key }
name={ topic.label }
view={ topic.view }
/>
);
} ) }