-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RNMobile] Editor Onboarding: "The Basics" help section - Details Par…
…t 1 (#33790) * Add help menu option to iOS demo app * Add basic help topics bottom sheet * Add help option to Android demo app * Add new help topics icons * Add help topics to main help bottom sheet * Remove unused imports * Optimized new SVG images using https://jakearchibald.github.io/svgomg/ * Add navigation to help detail subsheet * Add react-native and react-navigation to package.json per lint * Fix lint errors * Add images for help detail sections * Add intro to blocks page * Add remaining help detail pages * Link help details to topics * WIP * Remove unnecessary dependency * Cleanup code, remove debugging * Patch to correct issues with asset loading at runtime * Fix lint errors by removing unused imports * Remove extreneous filename extension from import * Rename view property for clarity * Remove memoization * Fix Metro local static image paths (#33829) Loading local static assets from a different package within a monorepo appears broken in Metro for Android. The below fixes paths to packages within this project to include the necessary `/assets/..` that Metro's server expects to traverse to the correct directory. - https://git.io/JBV4e - https://git.io/JBFon Co-authored-by: David Calhoun <[email protected]>
- Loading branch information
Showing
22 changed files
with
335 additions
and
56 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
packages/editor/src/components/editor-help/add-blocks.native.js
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,35 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import { View } from 'react-native'; | ||
|
||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { __ } from '@wordpress/i18n'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import styles from './style.scss'; | ||
import { HelpDetailBodyText, HelpDetailImage } from './view-sections'; | ||
|
||
const AddBlocks = () => { | ||
return ( | ||
<View style={ styles.helpDetailContainer }> | ||
<HelpDetailImage source={ require( './images/add-blocks.png' ) } /> | ||
<HelpDetailBodyText | ||
text={ __( | ||
'Add a new block at any time by tapping on the + icon in the toolbar on the bottom left. ' | ||
) } | ||
/> | ||
<HelpDetailBodyText | ||
text={ __( | ||
'Once you become familiar with the names of different blocks, you can add a block by typing a forward slash followed by the block name — for example, /image or /heading.' | ||
) } | ||
/> | ||
</View> | ||
); | ||
}; | ||
|
||
export default AddBlocks; |
37 changes: 37 additions & 0 deletions
37
packages/editor/src/components/editor-help/customize-blocks.native.js
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,37 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import { View } from 'react-native'; | ||
|
||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { __ } from '@wordpress/i18n'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import styles from './style.scss'; | ||
import { HelpDetailBodyText, HelpDetailImage } from './view-sections'; | ||
|
||
const CustomizeBlocks = () => { | ||
return ( | ||
<View style={ styles.helpDetailContainer }> | ||
<HelpDetailImage | ||
source={ require( './images/customize-blocks.png' ) } | ||
/> | ||
<HelpDetailBodyText | ||
text={ __( | ||
'Each block has its own settings. To find them, click on a block. Its settings will appear on the toolbar at the bottom of the screen.' | ||
) } | ||
/> | ||
<HelpDetailBodyText | ||
text={ __( | ||
'Some blocks have additional settings. Tap the settings icon on the bottom right of the block to view more options.' | ||
) } | ||
/> | ||
</View> | ||
); | ||
}; | ||
|
||
export default CustomizeBlocks; |
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
48 changes: 11 additions & 37 deletions
48
packages/editor/src/components/editor-help/help-topic-row.native.js
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+50.4 KB
packages/editor/src/components/editor-help/images/customize-blocks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+50.4 KB
packages/editor/src/components/editor-help/images/cut-copy-duplicate-blocks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+59.2 KB
packages/editor/src/components/editor-help/images/edit-or-replace-media.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+69.8 KB
packages/editor/src/components/editor-help/images/what-is-a-block.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
71 changes: 71 additions & 0 deletions
71
packages/editor/src/components/editor-help/intro-to-blocks.native.js
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,71 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import { View, Text } from 'react-native'; | ||
|
||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { __ } from '@wordpress/i18n'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import styles from './style.scss'; | ||
import { | ||
HelpDetailBodyText, | ||
HelpDetailSectionHeadingText, | ||
HelpDetailImage, | ||
} from './view-sections'; | ||
|
||
const IntroToBlocks = () => { | ||
return ( | ||
<View style={ styles.helpDetailContainer }> | ||
<HelpDetailImage | ||
source={ require( './images/intro-blocks-1.png' ) } | ||
/> | ||
<Text style={ styles.helpDetailTitle }> | ||
{ __( 'Welcome to the world of blocks' ) } | ||
</Text> | ||
<HelpDetailBodyText | ||
text={ __( | ||
'Blocks are pieces of content that you can insert, rearrange, and style without needing to know how to code. Blocks are an easy and modern way for you to create beautiful layouts.' | ||
) } | ||
/> | ||
<HelpDetailSectionHeadingText text={ __( 'Rich text editing' ) } /> | ||
<HelpDetailBodyText | ||
text={ __( | ||
'Blocks allow you to focus on writing your content, knowing that all the formatting tools you need are there to help you get your message across.' | ||
) } | ||
/> | ||
<HelpDetailImage | ||
source={ require( './images/intro-blocks-2.png' ) } | ||
/> | ||
<HelpDetailSectionHeadingText text={ __( 'Embed media' ) } /> | ||
<HelpDetailBodyText | ||
text={ __( | ||
'Make your content stand out by adding images, gifs, videos, and embedded media to your pages.' | ||
) } | ||
/> | ||
<HelpDetailImage | ||
source={ require( './images/intro-blocks-3.png' ) } | ||
/> | ||
<HelpDetailSectionHeadingText text={ __( 'Build layouts' ) } /> | ||
<HelpDetailBodyText | ||
text={ __( | ||
'Arrange your content into columns, add Call to Action buttons, and overlay images with text.' | ||
) } | ||
/> | ||
<HelpDetailImage | ||
source={ require( './images/intro-blocks-4.png' ) } | ||
/> | ||
<HelpDetailBodyText | ||
text={ __( | ||
'Give it a try by adding a few blocks to your post or page!' | ||
) } | ||
/> | ||
</View> | ||
); | ||
}; | ||
|
||
export default IntroToBlocks; |
30 changes: 30 additions & 0 deletions
30
packages/editor/src/components/editor-help/move-blocks.native.js
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,30 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import { View } from 'react-native'; | ||
|
||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { __ } from '@wordpress/i18n'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import styles from './style.scss'; | ||
import { HelpDetailBodyText, HelpDetailImage } from './view-sections'; | ||
|
||
const MoveBlocks = () => { | ||
return ( | ||
<View style={ styles.helpDetailContainer }> | ||
<HelpDetailImage source={ require( './images/move-blocks.png' ) } /> | ||
<HelpDetailBodyText | ||
text={ __( | ||
'You can rearrange blocks by tapping a block and then tapping the up and down arrows that appear on the bottom left side of the block to move it above or below other blocks.' | ||
) } | ||
/> | ||
</View> | ||
); | ||
}; | ||
|
||
export default MoveBlocks; |
Oops, something went wrong.