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] Improvements to Getting Started Guides #40964

Merged
merged 9 commits into from
May 23, 2022

Conversation

SiobhyB
Copy link
Contributor

@SiobhyB SiobhyB commented May 10, 2022

What?

With this PR, some updates are made to the Getting Started guides for the React Native demo app.

Why?

These updates were prompted by some recent recommendations for M1 machines (including a JDK recommendation). By updating the MacOS set up guide and linking to React Native's doc in the general guide, it is hoped the docs will make the set up process smoother for newcomers.

How?

Getting Started - General Guide

The following paragraph has been added to the general guide:

If the Android emulator doesn't start correctly, or compiling fails with `Could not initialize class org.codehaus.groovy.runtime.InvokerHelper` or similar, it may help to double check the set up of your development environment against the latest requirements in [React Native's documentation](https://reactnative.dev/docs/environment-setup). With Android Studio, for example, you will need to configure the `ANDROID_HOME` environment variable and ensure that your version of JDK matches the latest requirements.

This is taken from the guide in the Gutenberg Mobile repository and brings the Gutenberg guide in alignment. An aim behind linking directly to React Native's official documentation is to guide anyone who may be struggling with issues related to their JDK version or similar, as we can trust the official documentation to have the most recent recommendations.

Getting Started - In-Depth MacOS Guide

The following is an overview of the main changes that have been made to the more in-depth MacOS guide:

  • The sections have been rearranged in order to improve the overall flow of the guide. There are now five main sections, arranged as follows: 1. Clone Gutenberg. 2. iOS. 3. Android. 4. Unit Tests. 5. Integration Tests.
  • A Cocoapods sub-section has been added under the iOS section.
  • A Java Development Kit (JDK) sub-section has been added under the Android section.
  • The images have been set to the same width in order to tidy up the overall look of the document.
  • Several tweaks to the copy have been made, with an aim to keep the tone concise and inline with the copy guidelines.

Testing Instructions

  • Visit the guides directly (vs. looking at the "files changed", as the formatting is hard to read).
  • Review for overall accuracy, clarity, and completeness.

Siobhan Bamber added 7 commits May 10, 2022 12:50
Gutenberg Mobile's readme had some copy in the troubleshooting section that wasn't included in Gutenberg's how-to: https://github.com/wordpress-mobile/gutenberg-mobile/edit/trunk/README.md

This commit fixes that issue by updating Gutenberg's how-to with the latest from Gutenberg Mobile.
With this commit, I've tidied up some of the copy, attempting to make the instructions as concise and helpful as possible. I've also set the images to the same width to tidy up the overall look of the document (the images will appear small on mobile devices, but can be tapped on to get the full image).
- The "Unit Tests" is moved towards the bottom of the document, so that's it's closer to the instructions for integration tests. the document flows as follows:
- The steps for installing Xcode are moved under the "iOS" section.
- The overall flow of the document has been updated to the following: Clone Gutenberg > iOS > Android > Tests
@SiobhyB SiobhyB changed the title [RNMobile] Updates to React Native tutorial [RNMobile] Updates to Getting Started Guides May 10, 2022
@SiobhyB SiobhyB added Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Type] Developer Documentation Documentation for developers labels May 10, 2022
@SiobhyB SiobhyB changed the title [RNMobile] Updates to Getting Started Guides [RNMobile] Improvements to Getting Started Guides May 10, 2022
@SiobhyB SiobhyB marked this pull request as ready for review May 10, 2022 21:17
@SiobhyB SiobhyB requested review from hypest and fluiddot May 10, 2022 21:17
@@ -105,37 +92,46 @@ In another terminal type:
npm run native ios
```

After waiting for everything to build we should see:
After waiting for everything to build, the demo app should be running from the iOS simulator:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one, it's better to be more explicit on what the image below is supposed to show.

Copy link
Contributor

@hypest hypest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had a look @SiobhyB and these are cool updates and souping up, thanks!

I left a couple of non-trivial comments about the M1 related instructions, since I'm not sure those are needed lately. Let's discuss, thanks!

@SiobhyB SiobhyB requested a review from fabiankaegy as a code owner May 16, 2022 14:55
@SiobhyB SiobhyB requested a review from hypest May 17, 2022 10:03
Some versions of Ruby may not require the `ffi` to be manually installed, which is noted with this commit.
Copy link
Contributor

@hypest hypest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@hypest hypest merged commit 1a1396e into trunk May 23, 2022
@hypest hypest deleted the rnmobile/update/getting-started-docs branch May 23, 2022 12:15
@github-actions github-actions bot added this to the Gutenberg 13.4 milestone May 23, 2022
westonruter added a commit that referenced this pull request May 23, 2022
…p-tests-config

* 'trunk' of github.com:WordPress/gutenberg: (88 commits)
  Components: refactor `AlignmentMatrixControl` to pass `exhaustive-deps` (#41167)
  [RNMobile] Add 'Insert from URL' option to Image block (#40334)
  [RNMobile] Improvements to Getting Started Guides (#40964)
  Post Author Name: Add to and from Post Author transformations (#41151)
  CheckboxControl: Add unit tests (#41165)
  Improve inline documentation (#41209)
  Mobile Release v1.76.1 (#41196)
  Use explicit type definitions for entity configuration (#40995)
  Scripts: Convert file extension to js in `block.json` during build (#41068)
  Reflects revert in 6446878 (#41221)
  get_style_nodes should be compatible with parent method. (#41217)
  Gallery: Opt-in to axial (column/row) block spacing controls (#41175)
  Table of Contents block: convert line breaks to spaces in headings. (#41206)
  Add support for button elements to theme.json (#40260)
  Global Styles: Load block CSS conditionally (#41160)
  Update URL (#41188)
  Improve autocompleter performance (#41197)
  Site Editor: Set min-width for styles preview (#41198)
  Remove Navigation Editor screen from experiments page (#40878)
  Fix broken Page title for pages created inline within in Nav block (#41063)
  ...
SiobhyB pushed a commit that referenced this pull request May 24, 2022
* Update with copy from Gutenberg Mobile

Gutenberg Mobile's readme had some copy in the troubleshooting section that wasn't included in Gutenberg's how-to: https://github.com/wordpress-mobile/gutenberg-mobile/edit/trunk/README.md

This commit fixes that issue by updating Gutenberg's how-to with the latest from Gutenberg Mobile.

* Tweak wording, update inconsistent capitalisation

* Tweaks to copy and formatting

With this commit, I've tidied up some of the copy, attempting to make the instructions as concise and helpful as possible. I've also set the images to the same width to tidy up the overall look of the document (the images will appear small on mobile devices, but can be tapped on to get the full image).

* Set all images to fixed width, for consistency

* Rearrange sections to improve overall flow

- The "Unit Tests" is moved towards the bottom of the document, so that's it's closer to the instructions for integration tests. the document flows as follows:
- The steps for installing Xcode are moved under the "iOS" section.
- The overall flow of the document has been updated to the following: Clone Gutenberg > iOS > Android > Tests

* Add details about recommended JDK

* Add details about Cocoapods

* Refine instructions for installing Cocoapods

* Note `ffi` may already be installed

Some versions of Ruby may not require the `ffi` to be manually installed, which is noted with this commit.
fluiddot added a commit that referenced this pull request Jun 3, 2022
* Release script: Update react-native-editor version to 1.76.0

* Release script: Update with changes from 'npm run core preios'

* Update Changelog

* Release script: Update react-native-editor version to 1.76.1

* Release script: Update with changes from 'npm run core preios'

* [Mobile] - BlockList - Add internal onLayout from CellRendererComponent to BlockListItemCell (#41105)

* Mobile - BlockList - Pass FlatList internal onLayout through CellRendererComponent

* Mobile - Update onLayout naming for BlockListItemCell

* [Mobile] - Fix Drag & Drop Chip positioning issue with RTL languages (#41053)

* Mobile - Fix - Drag & drop chip issue with RTL languages

* Mobile - BlockDraggable - Rename maxWidth variable to contentWidth

* Mobile - BlockDraggable - Add custom exiting animation that uses the same functionality as ZoomOutEasyDown but customizing the translateX value taking into account RTL languages.

* [RNMobile] Add drag & drop help guide in Help & Support screen (#40961)

* Add drag & drop help guide

* Update content of help screen related to moving blocks

* Update drand-and-drop images

* Update styles of heading component of help screen

* Add HelpDetailBadge component

This component will be rendered in `HelpDetailSectionHeadingText` component via the `badge` prop.

* Add NEW badge to move blocks help section

* Optimize drag-and-drop images

* Add move-blocks icon to Help & Support screen

* Update react-native-editor changelog

* Add HelpSectionTitle component

* Prevent rendering separator on last help topic item

* [RNMobile] Fix drag mode not being enabled when long-pressing over Shortcode block (#41155)

* Add prop for disabling suggestions button

* Use allowed formats in format types calculation

* Add RichText version to PlainText component

* Use experimental version of PlainText in Shortcode block

* Add disableAutocorrection prop to RichText

* Disable autocorrection in Shortcode block

* Update PlainText props in Shortcode block

* Use pre as tagName in PlainText

* Rename replaceLineBreaks function

* Update shortcode block unit tests

* Prevent text input focus when selecting Shortcode block

* Force text color in Shortcode block

* Remove tagName prop from PlainText component

* Mobile - Update changelog

* Translate NEW badge in Move blocks help screen

* Release script: Update react-native-editor version to 1.77.0

* Release script: Update with changes from 'npm run core preios'

* [RNMobile] Improve text read by screen readers for BottomSheetSelectControl  (#41036)

Improves the text that's read by screen readers by the BottomSheetSelectControl component, adding extra context and making its purpose clearer.

* [RNMobile] Add 'Insert from URL' option to Image block (#40334)

* Add 'Insert from URL' option to Video and Image blocks

* Update code style from linting

* Improve test cases for Media Upload capture options

* Fix whitespace issue

* Update Media Upload option tests to be asynchronous

* Update native image block to use correct image URL

* Add error handling for invalid URLs to native Image block

* Clear invalid URL error on Image URL success

* Fix synchronicity of Media Upload option tests

* Add check for URL handler to native Image block picker options

* Update code style

* Remove Video block from urlSource options

Why: to be introduced in a later PR

* Remove URL option from Video block for Media Upload test

* Use Notice snackbar for native Image block error handling

* Update Image/Media Upload code style and helpers

* Use getImage to determine if URL is a valid image within Image block

* Add loading indicator and isURL check to native Image block URL behavior

* Add loading indicator to native Image block media placeholder

* Fix whitespace issue in native Image block code style

* Reuse native Image block loading indicator

* Use undefined dimension attributes for the native Image block URL behavior

Co-authored-by: Derek Blank <derekblank@Dereks-MacBook-Pro.local>

* [RNMobile] - E2E Simplify heading and lists blocks functions (#40670)

* update tests using paragraph, heading and list blocks

* fix slash inserter tests to work in ci

* lint fixes

* wait for ordered list to appear

* lint fixes

* extra click only on local env

* wait to get backspace click reflected

* re-add extra click only for local env

* add wait to wait for backspace key to be reflected

* lint fixes

* break function, set position to get list block

* lint fixes

* use correct params, update function name

* lint fixes

* make maxIteration a parameter for isElementVisible

* update xpath for list block

* utilize waitForVisible for isElementVisible

* lint fixes

* add wait to getNumberOfParagraphBlocks and update xpath for android list block

* update edit text xpath to be read from any level

Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>

* Add ruby version file (#41013)

Use same version of ruby that is used on WP iOS

* [RNMobile] Improvements to Getting Started Guides (#40964)

* Update with copy from Gutenberg Mobile

Gutenberg Mobile's readme had some copy in the troubleshooting section that wasn't included in Gutenberg's how-to: https://github.com/wordpress-mobile/gutenberg-mobile/edit/trunk/README.md

This commit fixes that issue by updating Gutenberg's how-to with the latest from Gutenberg Mobile.

* Tweak wording, update inconsistent capitalisation

* Tweaks to copy and formatting

With this commit, I've tidied up some of the copy, attempting to make the instructions as concise and helpful as possible. I've also set the images to the same width to tidy up the overall look of the document (the images will appear small on mobile devices, but can be tapped on to get the full image).

* Set all images to fixed width, for consistency

* Rearrange sections to improve overall flow

- The "Unit Tests" is moved towards the bottom of the document, so that's it's closer to the instructions for integration tests. the document flows as follows:
- The steps for installing Xcode are moved under the "iOS" section.
- The overall flow of the document has been updated to the following: Clone Gutenberg > iOS > Android > Tests

* Add details about recommended JDK

* Add details about Cocoapods

* Refine instructions for installing Cocoapods

* Note `ffi` may already be installed

Some versions of Ruby may not require the `ffi` to be manually installed, which is noted with this commit.

* update expected html for file block (#41300)

Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>

* Add waitForVisible() to all blocks (#41126)

* add waits to all block - 1st try

* fix failing tests

* correct if else condition

* fix failing cover block test

* update spaces

* update to use new click helper

* wait for blocks to be visible first in getFirstBlock and getLastBlock

* remove length as a parameter

* update timing for long press since it's failing intermittently in ci

* remove deleted param, revert space changes

* remove redundant code

* exit function once condition is met

* increse wait time for long press

* remove unneccesary condition, update message, return click value

Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>

* Update CHANGELOG

* Revert "update expected html for file block (#41300)"

This reverts commit a046a61.

* [RNMobile] Ensure post title gets focused when is notified from native side (#41371)

* Release script: Update react-native-editor version to 1.77.1

* Release script: Update with changes from 'npm run core preios'

* [RNMobile] Bump `react-native-reanimated` version to `2.4.1-wp-3` (#41482)

* Update react-native-editor changelog

Co-authored-by: jhnstn <jason@readysetandco.com>
Co-authored-by: Gerardo <gerardo.pacheco@automattic.com>
Co-authored-by: Siobhan <siobhan@automattic.com>
Co-authored-by: Derek Blank <derekpblank@gmail.com>
Co-authored-by: Derek Blank <derekblank@Dereks-MacBook-Pro.local>
Co-authored-by: Jos <jostnes@users.noreply.github.com>
Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>
Co-authored-by: Jason Johnston <jhnstn@users.noreply.github.com>
fluiddot added a commit that referenced this pull request Jun 13, 2022
* Release script: Update react-native-editor version to 1.76.0

* Release script: Update with changes from 'npm run core preios'

* Update Changelog

* Release script: Update react-native-editor version to 1.76.1

* Release script: Update with changes from 'npm run core preios'

* [Mobile] - BlockList - Add internal onLayout from CellRendererComponent to BlockListItemCell (#41105)

* Mobile - BlockList - Pass FlatList internal onLayout through CellRendererComponent

* Mobile - Update onLayout naming for BlockListItemCell

* [Mobile] - Fix Drag & Drop Chip positioning issue with RTL languages (#41053)

* Mobile - Fix - Drag & drop chip issue with RTL languages

* Mobile - BlockDraggable - Rename maxWidth variable to contentWidth

* Mobile - BlockDraggable - Add custom exiting animation that uses the same functionality as ZoomOutEasyDown but customizing the translateX value taking into account RTL languages.

* [RNMobile] Add drag & drop help guide in Help & Support screen (#40961)

* Add drag & drop help guide

* Update content of help screen related to moving blocks

* Update drand-and-drop images

* Update styles of heading component of help screen

* Add HelpDetailBadge component

This component will be rendered in `HelpDetailSectionHeadingText` component via the `badge` prop.

* Add NEW badge to move blocks help section

* Optimize drag-and-drop images

* Add move-blocks icon to Help & Support screen

* Update react-native-editor changelog

* Add HelpSectionTitle component

* Prevent rendering separator on last help topic item

* [RNMobile] Fix drag mode not being enabled when long-pressing over Shortcode block (#41155)

* Add prop for disabling suggestions button

* Use allowed formats in format types calculation

* Add RichText version to PlainText component

* Use experimental version of PlainText in Shortcode block

* Add disableAutocorrection prop to RichText

* Disable autocorrection in Shortcode block

* Update PlainText props in Shortcode block

* Use pre as tagName in PlainText

* Rename replaceLineBreaks function

* Update shortcode block unit tests

* Prevent text input focus when selecting Shortcode block

* Force text color in Shortcode block

* Remove tagName prop from PlainText component

* Mobile - Update changelog

* Translate NEW badge in Move blocks help screen

* Release script: Update react-native-editor version to 1.77.0

* Release script: Update with changes from 'npm run core preios'

* [RNMobile] Improve text read by screen readers for BottomSheetSelectControl  (#41036)

Improves the text that's read by screen readers by the BottomSheetSelectControl component, adding extra context and making its purpose clearer.

* [RNMobile] Add 'Insert from URL' option to Image block (#40334)

* Add 'Insert from URL' option to Video and Image blocks

* Update code style from linting

* Improve test cases for Media Upload capture options

* Fix whitespace issue

* Update Media Upload option tests to be asynchronous

* Update native image block to use correct image URL

* Add error handling for invalid URLs to native Image block

* Clear invalid URL error on Image URL success

* Fix synchronicity of Media Upload option tests

* Add check for URL handler to native Image block picker options

* Update code style

* Remove Video block from urlSource options

Why: to be introduced in a later PR

* Remove URL option from Video block for Media Upload test

* Use Notice snackbar for native Image block error handling

* Update Image/Media Upload code style and helpers

* Use getImage to determine if URL is a valid image within Image block

* Add loading indicator and isURL check to native Image block URL behavior

* Add loading indicator to native Image block media placeholder

* Fix whitespace issue in native Image block code style

* Reuse native Image block loading indicator

* Use undefined dimension attributes for the native Image block URL behavior

Co-authored-by: Derek Blank <derekblank@Dereks-MacBook-Pro.local>

* [RNMobile] - E2E Simplify heading and lists blocks functions (#40670)

* update tests using paragraph, heading and list blocks

* fix slash inserter tests to work in ci

* lint fixes

* wait for ordered list to appear

* lint fixes

* extra click only on local env

* wait to get backspace click reflected

* re-add extra click only for local env

* add wait to wait for backspace key to be reflected

* lint fixes

* break function, set position to get list block

* lint fixes

* use correct params, update function name

* lint fixes

* make maxIteration a parameter for isElementVisible

* update xpath for list block

* utilize waitForVisible for isElementVisible

* lint fixes

* add wait to getNumberOfParagraphBlocks and update xpath for android list block

* update edit text xpath to be read from any level

Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>

* Add ruby version file (#41013)

Use same version of ruby that is used on WP iOS

* [RNMobile] Improvements to Getting Started Guides (#40964)

* Update with copy from Gutenberg Mobile

Gutenberg Mobile's readme had some copy in the troubleshooting section that wasn't included in Gutenberg's how-to: https://github.com/wordpress-mobile/gutenberg-mobile/edit/trunk/README.md

This commit fixes that issue by updating Gutenberg's how-to with the latest from Gutenberg Mobile.

* Tweak wording, update inconsistent capitalisation

* Tweaks to copy and formatting

With this commit, I've tidied up some of the copy, attempting to make the instructions as concise and helpful as possible. I've also set the images to the same width to tidy up the overall look of the document (the images will appear small on mobile devices, but can be tapped on to get the full image).

* Set all images to fixed width, for consistency

* Rearrange sections to improve overall flow

- The "Unit Tests" is moved towards the bottom of the document, so that's it's closer to the instructions for integration tests. the document flows as follows:
- The steps for installing Xcode are moved under the "iOS" section.
- The overall flow of the document has been updated to the following: Clone Gutenberg > iOS > Android > Tests

* Add details about recommended JDK

* Add details about Cocoapods

* Refine instructions for installing Cocoapods

* Note `ffi` may already be installed

Some versions of Ruby may not require the `ffi` to be manually installed, which is noted with this commit.

* update expected html for file block (#41300)

Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>

* Add waitForVisible() to all blocks (#41126)

* add waits to all block - 1st try

* fix failing tests

* correct if else condition

* fix failing cover block test

* update spaces

* update to use new click helper

* wait for blocks to be visible first in getFirstBlock and getLastBlock

* remove length as a parameter

* update timing for long press since it's failing intermittently in ci

* remove deleted param, revert space changes

* remove redundant code

* exit function once condition is met

* increse wait time for long press

* remove unneccesary condition, update message, return click value

Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>

* Update CHANGELOG

* Revert "update expected html for file block (#41300)"

This reverts commit a046a61.

* [RNMobile] Ensure post title gets focused when is notified from native side (#41371)

* Release script: Update react-native-editor version to 1.77.1

* Release script: Update with changes from 'npm run core preios'

* [RNMobile] Bump `react-native-reanimated` version to `2.4.1-wp-3` (#41482)

* Update react-native-editor changelog

* Release script: Update react-native-editor version to 1.78.0

* Release script: Update with changes from 'npm run core preios'

* [RNMobile] Bump `react-native-gesture-handler` to version `2.3.2` (#41337)

* Update react-native-editor changelog

* Remove react-native-editor changelog duplicate entries

Co-authored-by: jhnstn <jason@readysetandco.com>
Co-authored-by: Gerardo <gerardo.pacheco@automattic.com>
Co-authored-by: Siobhan <siobhan@automattic.com>
Co-authored-by: Derek Blank <derekpblank@gmail.com>
Co-authored-by: Derek Blank <derekblank@Dereks-MacBook-Pro.local>
Co-authored-by: Jos <jostnes@users.noreply.github.com>
Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>
Co-authored-by: Jason Johnston <jhnstn@users.noreply.github.com>
jhnstn added a commit to jhnstn/gutenberg that referenced this pull request Jun 15, 2022
* Release script: Update react-native-editor version to 1.76.0

* Release script: Update with changes from 'npm run core preios'

* Update Changelog

* Release script: Update react-native-editor version to 1.76.1

* Release script: Update with changes from 'npm run core preios'

* [Mobile] - BlockList - Add internal onLayout from CellRendererComponent to BlockListItemCell (WordPress#41105)

* Mobile - BlockList - Pass FlatList internal onLayout through CellRendererComponent

* Mobile - Update onLayout naming for BlockListItemCell

* [Mobile] - Fix Drag & Drop Chip positioning issue with RTL languages (WordPress#41053)

* Mobile - Fix - Drag & drop chip issue with RTL languages

* Mobile - BlockDraggable - Rename maxWidth variable to contentWidth

* Mobile - BlockDraggable - Add custom exiting animation that uses the same functionality as ZoomOutEasyDown but customizing the translateX value taking into account RTL languages.

* [RNMobile] Add drag & drop help guide in Help & Support screen (WordPress#40961)

* Add drag & drop help guide

* Update content of help screen related to moving blocks

* Update drand-and-drop images

* Update styles of heading component of help screen

* Add HelpDetailBadge component

This component will be rendered in `HelpDetailSectionHeadingText` component via the `badge` prop.

* Add NEW badge to move blocks help section

* Optimize drag-and-drop images

* Add move-blocks icon to Help & Support screen

* Update react-native-editor changelog

* Add HelpSectionTitle component

* Prevent rendering separator on last help topic item

* [RNMobile] Fix drag mode not being enabled when long-pressing over Shortcode block (WordPress#41155)

* Add prop for disabling suggestions button

* Use allowed formats in format types calculation

* Add RichText version to PlainText component

* Use experimental version of PlainText in Shortcode block

* Add disableAutocorrection prop to RichText

* Disable autocorrection in Shortcode block

* Update PlainText props in Shortcode block

* Use pre as tagName in PlainText

* Rename replaceLineBreaks function

* Update shortcode block unit tests

* Prevent text input focus when selecting Shortcode block

* Force text color in Shortcode block

* Remove tagName prop from PlainText component

* Mobile - Update changelog

* Translate NEW badge in Move blocks help screen

* Release script: Update react-native-editor version to 1.77.0

* Release script: Update with changes from 'npm run core preios'

* [RNMobile] Improve text read by screen readers for BottomSheetSelectControl  (WordPress#41036)

Improves the text that's read by screen readers by the BottomSheetSelectControl component, adding extra context and making its purpose clearer.

* [RNMobile] Add 'Insert from URL' option to Image block (WordPress#40334)

* Add 'Insert from URL' option to Video and Image blocks

* Update code style from linting

* Improve test cases for Media Upload capture options

* Fix whitespace issue

* Update Media Upload option tests to be asynchronous

* Update native image block to use correct image URL

* Add error handling for invalid URLs to native Image block

* Clear invalid URL error on Image URL success

* Fix synchronicity of Media Upload option tests

* Add check for URL handler to native Image block picker options

* Update code style

* Remove Video block from urlSource options

Why: to be introduced in a later PR

* Remove URL option from Video block for Media Upload test

* Use Notice snackbar for native Image block error handling

* Update Image/Media Upload code style and helpers

* Use getImage to determine if URL is a valid image within Image block

* Add loading indicator and isURL check to native Image block URL behavior

* Add loading indicator to native Image block media placeholder

* Fix whitespace issue in native Image block code style

* Reuse native Image block loading indicator

* Use undefined dimension attributes for the native Image block URL behavior

Co-authored-by: Derek Blank <derekblank@Dereks-MacBook-Pro.local>

* [RNMobile] - E2E Simplify heading and lists blocks functions (WordPress#40670)

* update tests using paragraph, heading and list blocks

* fix slash inserter tests to work in ci

* lint fixes

* wait for ordered list to appear

* lint fixes

* extra click only on local env

* wait to get backspace click reflected

* re-add extra click only for local env

* add wait to wait for backspace key to be reflected

* lint fixes

* break function, set position to get list block

* lint fixes

* use correct params, update function name

* lint fixes

* make maxIteration a parameter for isElementVisible

* update xpath for list block

* utilize waitForVisible for isElementVisible

* lint fixes

* add wait to getNumberOfParagraphBlocks and update xpath for android list block

* update edit text xpath to be read from any level

Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>

* Add ruby version file (WordPress#41013)

Use same version of ruby that is used on WP iOS

* [RNMobile] Improvements to Getting Started Guides (WordPress#40964)

* Update with copy from Gutenberg Mobile

Gutenberg Mobile's readme had some copy in the troubleshooting section that wasn't included in Gutenberg's how-to: https://github.com/wordpress-mobile/gutenberg-mobile/edit/trunk/README.md

This commit fixes that issue by updating Gutenberg's how-to with the latest from Gutenberg Mobile.

* Tweak wording, update inconsistent capitalisation

* Tweaks to copy and formatting

With this commit, I've tidied up some of the copy, attempting to make the instructions as concise and helpful as possible. I've also set the images to the same width to tidy up the overall look of the document (the images will appear small on mobile devices, but can be tapped on to get the full image).

* Set all images to fixed width, for consistency

* Rearrange sections to improve overall flow

- The "Unit Tests" is moved towards the bottom of the document, so that's it's closer to the instructions for integration tests. the document flows as follows:
- The steps for installing Xcode are moved under the "iOS" section.
- The overall flow of the document has been updated to the following: Clone Gutenberg > iOS > Android > Tests

* Add details about recommended JDK

* Add details about Cocoapods

* Refine instructions for installing Cocoapods

* Note `ffi` may already be installed

Some versions of Ruby may not require the `ffi` to be manually installed, which is noted with this commit.

* update expected html for file block (WordPress#41300)

Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>

* Add waitForVisible() to all blocks (WordPress#41126)

* add waits to all block - 1st try

* fix failing tests

* correct if else condition

* fix failing cover block test

* update spaces

* update to use new click helper

* wait for blocks to be visible first in getFirstBlock and getLastBlock

* remove length as a parameter

* update timing for long press since it's failing intermittently in ci

* remove deleted param, revert space changes

* remove redundant code

* exit function once condition is met

* increse wait time for long press

* remove unneccesary condition, update message, return click value

Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>

* Update CHANGELOG

* Revert "update expected html for file block (WordPress#41300)"

This reverts commit a046a61.

* [RNMobile] Ensure post title gets focused when is notified from native side (WordPress#41371)

* Release script: Update react-native-editor version to 1.77.1

* Release script: Update with changes from 'npm run core preios'

* [RNMobile] Bump `react-native-reanimated` version to `2.4.1-wp-3` (WordPress#41482)

* Update react-native-editor changelog

Co-authored-by: jhnstn <jason@readysetandco.com>
Co-authored-by: Gerardo <gerardo.pacheco@automattic.com>
Co-authored-by: Siobhan <siobhan@automattic.com>
Co-authored-by: Derek Blank <derekpblank@gmail.com>
Co-authored-by: Derek Blank <derekblank@Dereks-MacBook-Pro.local>
Co-authored-by: Jos <jostnes@users.noreply.github.com>
Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>
Co-authored-by: Jason Johnston <jhnstn@users.noreply.github.com>
jhnstn added a commit to jhnstn/gutenberg that referenced this pull request Jun 15, 2022
* Release script: Update react-native-editor version to 1.76.0

* Release script: Update with changes from 'npm run core preios'

* Update Changelog

* Release script: Update react-native-editor version to 1.76.1

* Release script: Update with changes from 'npm run core preios'

* [Mobile] - BlockList - Add internal onLayout from CellRendererComponent to BlockListItemCell (WordPress#41105)

* Mobile - BlockList - Pass FlatList internal onLayout through CellRendererComponent

* Mobile - Update onLayout naming for BlockListItemCell

* [Mobile] - Fix Drag & Drop Chip positioning issue with RTL languages (WordPress#41053)

* Mobile - Fix - Drag & drop chip issue with RTL languages

* Mobile - BlockDraggable - Rename maxWidth variable to contentWidth

* Mobile - BlockDraggable - Add custom exiting animation that uses the same functionality as ZoomOutEasyDown but customizing the translateX value taking into account RTL languages.

* [RNMobile] Add drag & drop help guide in Help & Support screen (WordPress#40961)

* Add drag & drop help guide

* Update content of help screen related to moving blocks

* Update drand-and-drop images

* Update styles of heading component of help screen

* Add HelpDetailBadge component

This component will be rendered in `HelpDetailSectionHeadingText` component via the `badge` prop.

* Add NEW badge to move blocks help section

* Optimize drag-and-drop images

* Add move-blocks icon to Help & Support screen

* Update react-native-editor changelog

* Add HelpSectionTitle component

* Prevent rendering separator on last help topic item

* [RNMobile] Fix drag mode not being enabled when long-pressing over Shortcode block (WordPress#41155)

* Add prop for disabling suggestions button

* Use allowed formats in format types calculation

* Add RichText version to PlainText component

* Use experimental version of PlainText in Shortcode block

* Add disableAutocorrection prop to RichText

* Disable autocorrection in Shortcode block

* Update PlainText props in Shortcode block

* Use pre as tagName in PlainText

* Rename replaceLineBreaks function

* Update shortcode block unit tests

* Prevent text input focus when selecting Shortcode block

* Force text color in Shortcode block

* Remove tagName prop from PlainText component

* Mobile - Update changelog

* Translate NEW badge in Move blocks help screen

* Release script: Update react-native-editor version to 1.77.0

* Release script: Update with changes from 'npm run core preios'

* [RNMobile] Improve text read by screen readers for BottomSheetSelectControl  (WordPress#41036)

Improves the text that's read by screen readers by the BottomSheetSelectControl component, adding extra context and making its purpose clearer.

* [RNMobile] Add 'Insert from URL' option to Image block (WordPress#40334)

* Add 'Insert from URL' option to Video and Image blocks

* Update code style from linting

* Improve test cases for Media Upload capture options

* Fix whitespace issue

* Update Media Upload option tests to be asynchronous

* Update native image block to use correct image URL

* Add error handling for invalid URLs to native Image block

* Clear invalid URL error on Image URL success

* Fix synchronicity of Media Upload option tests

* Add check for URL handler to native Image block picker options

* Update code style

* Remove Video block from urlSource options

Why: to be introduced in a later PR

* Remove URL option from Video block for Media Upload test

* Use Notice snackbar for native Image block error handling

* Update Image/Media Upload code style and helpers

* Use getImage to determine if URL is a valid image within Image block

* Add loading indicator and isURL check to native Image block URL behavior

* Add loading indicator to native Image block media placeholder

* Fix whitespace issue in native Image block code style

* Reuse native Image block loading indicator

* Use undefined dimension attributes for the native Image block URL behavior

Co-authored-by: Derek Blank <derekblank@Dereks-MacBook-Pro.local>

* [RNMobile] - E2E Simplify heading and lists blocks functions (WordPress#40670)

* update tests using paragraph, heading and list blocks

* fix slash inserter tests to work in ci

* lint fixes

* wait for ordered list to appear

* lint fixes

* extra click only on local env

* wait to get backspace click reflected

* re-add extra click only for local env

* add wait to wait for backspace key to be reflected

* lint fixes

* break function, set position to get list block

* lint fixes

* use correct params, update function name

* lint fixes

* make maxIteration a parameter for isElementVisible

* update xpath for list block

* utilize waitForVisible for isElementVisible

* lint fixes

* add wait to getNumberOfParagraphBlocks and update xpath for android list block

* update edit text xpath to be read from any level

Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>

* Add ruby version file (WordPress#41013)

Use same version of ruby that is used on WP iOS

* [RNMobile] Improvements to Getting Started Guides (WordPress#40964)

* Update with copy from Gutenberg Mobile

Gutenberg Mobile's readme had some copy in the troubleshooting section that wasn't included in Gutenberg's how-to: https://github.com/wordpress-mobile/gutenberg-mobile/edit/trunk/README.md

This commit fixes that issue by updating Gutenberg's how-to with the latest from Gutenberg Mobile.

* Tweak wording, update inconsistent capitalisation

* Tweaks to copy and formatting

With this commit, I've tidied up some of the copy, attempting to make the instructions as concise and helpful as possible. I've also set the images to the same width to tidy up the overall look of the document (the images will appear small on mobile devices, but can be tapped on to get the full image).

* Set all images to fixed width, for consistency

* Rearrange sections to improve overall flow

- The "Unit Tests" is moved towards the bottom of the document, so that's it's closer to the instructions for integration tests. the document flows as follows:
- The steps for installing Xcode are moved under the "iOS" section.
- The overall flow of the document has been updated to the following: Clone Gutenberg > iOS > Android > Tests

* Add details about recommended JDK

* Add details about Cocoapods

* Refine instructions for installing Cocoapods

* Note `ffi` may already be installed

Some versions of Ruby may not require the `ffi` to be manually installed, which is noted with this commit.

* update expected html for file block (WordPress#41300)

Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>

* Add waitForVisible() to all blocks (WordPress#41126)

* add waits to all block - 1st try

* fix failing tests

* correct if else condition

* fix failing cover block test

* update spaces

* update to use new click helper

* wait for blocks to be visible first in getFirstBlock and getLastBlock

* remove length as a parameter

* update timing for long press since it's failing intermittently in ci

* remove deleted param, revert space changes

* remove redundant code

* exit function once condition is met

* increse wait time for long press

* remove unneccesary condition, update message, return click value

Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>

* Update CHANGELOG

* Revert "update expected html for file block (WordPress#41300)"

This reverts commit a046a61.

* [RNMobile] Ensure post title gets focused when is notified from native side (WordPress#41371)

* Release script: Update react-native-editor version to 1.77.1

* Release script: Update with changes from 'npm run core preios'

* [RNMobile] Bump `react-native-reanimated` version to `2.4.1-wp-3` (WordPress#41482)

* Update react-native-editor changelog

* Release script: Update react-native-editor version to 1.78.0

* Release script: Update with changes from 'npm run core preios'

* [RNMobile] Bump `react-native-gesture-handler` to version `2.3.2` (WordPress#41337)

* Update react-native-editor changelog

* Remove react-native-editor changelog duplicate entries

Co-authored-by: jhnstn <jason@readysetandco.com>
Co-authored-by: Gerardo <gerardo.pacheco@automattic.com>
Co-authored-by: Siobhan <siobhan@automattic.com>
Co-authored-by: Derek Blank <derekpblank@gmail.com>
Co-authored-by: Derek Blank <derekblank@Dereks-MacBook-Pro.local>
Co-authored-by: Jos <jostnes@users.noreply.github.com>
Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>
Co-authored-by: Jason Johnston <jhnstn@users.noreply.github.com>
fluiddot added a commit that referenced this pull request Jun 17, 2022
* Release script: Update react-native-editor version to 1.76.0

* Release script: Update with changes from 'npm run core preios'

* Update Changelog

* Release script: Update react-native-editor version to 1.76.1

* Release script: Update with changes from 'npm run core preios'

* [Mobile] - BlockList - Add internal onLayout from CellRendererComponent to BlockListItemCell (#41105)

* Mobile - BlockList - Pass FlatList internal onLayout through CellRendererComponent

* Mobile - Update onLayout naming for BlockListItemCell

* [Mobile] - Fix Drag & Drop Chip positioning issue with RTL languages (#41053)

* Mobile - Fix - Drag & drop chip issue with RTL languages

* Mobile - BlockDraggable - Rename maxWidth variable to contentWidth

* Mobile - BlockDraggable - Add custom exiting animation that uses the same functionality as ZoomOutEasyDown but customizing the translateX value taking into account RTL languages.

* [RNMobile] Add drag & drop help guide in Help & Support screen (#40961)

* Add drag & drop help guide

* Update content of help screen related to moving blocks

* Update drand-and-drop images

* Update styles of heading component of help screen

* Add HelpDetailBadge component

This component will be rendered in `HelpDetailSectionHeadingText` component via the `badge` prop.

* Add NEW badge to move blocks help section

* Optimize drag-and-drop images

* Add move-blocks icon to Help & Support screen

* Update react-native-editor changelog

* Add HelpSectionTitle component

* Prevent rendering separator on last help topic item

* [RNMobile] Fix drag mode not being enabled when long-pressing over Shortcode block (#41155)

* Add prop for disabling suggestions button

* Use allowed formats in format types calculation

* Add RichText version to PlainText component

* Use experimental version of PlainText in Shortcode block

* Add disableAutocorrection prop to RichText

* Disable autocorrection in Shortcode block

* Update PlainText props in Shortcode block

* Use pre as tagName in PlainText

* Rename replaceLineBreaks function

* Update shortcode block unit tests

* Prevent text input focus when selecting Shortcode block

* Force text color in Shortcode block

* Remove tagName prop from PlainText component

* Mobile - Update changelog

* Translate NEW badge in Move blocks help screen

* Release script: Update react-native-editor version to 1.77.0

* Release script: Update with changes from 'npm run core preios'

* [RNMobile] Improve text read by screen readers for BottomSheetSelectControl  (#41036)

Improves the text that's read by screen readers by the BottomSheetSelectControl component, adding extra context and making its purpose clearer.

* [RNMobile] Add 'Insert from URL' option to Image block (#40334)

* Add 'Insert from URL' option to Video and Image blocks

* Update code style from linting

* Improve test cases for Media Upload capture options

* Fix whitespace issue

* Update Media Upload option tests to be asynchronous

* Update native image block to use correct image URL

* Add error handling for invalid URLs to native Image block

* Clear invalid URL error on Image URL success

* Fix synchronicity of Media Upload option tests

* Add check for URL handler to native Image block picker options

* Update code style

* Remove Video block from urlSource options

Why: to be introduced in a later PR

* Remove URL option from Video block for Media Upload test

* Use Notice snackbar for native Image block error handling

* Update Image/Media Upload code style and helpers

* Use getImage to determine if URL is a valid image within Image block

* Add loading indicator and isURL check to native Image block URL behavior

* Add loading indicator to native Image block media placeholder

* Fix whitespace issue in native Image block code style

* Reuse native Image block loading indicator

* Use undefined dimension attributes for the native Image block URL behavior

Co-authored-by: Derek Blank <derekblank@Dereks-MacBook-Pro.local>

* [RNMobile] - E2E Simplify heading and lists blocks functions (#40670)

* update tests using paragraph, heading and list blocks

* fix slash inserter tests to work in ci

* lint fixes

* wait for ordered list to appear

* lint fixes

* extra click only on local env

* wait to get backspace click reflected

* re-add extra click only for local env

* add wait to wait for backspace key to be reflected

* lint fixes

* break function, set position to get list block

* lint fixes

* use correct params, update function name

* lint fixes

* make maxIteration a parameter for isElementVisible

* update xpath for list block

* utilize waitForVisible for isElementVisible

* lint fixes

* add wait to getNumberOfParagraphBlocks and update xpath for android list block

* update edit text xpath to be read from any level

Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>

* Add ruby version file (#41013)

Use same version of ruby that is used on WP iOS

* [RNMobile] Improvements to Getting Started Guides (#40964)

* Update with copy from Gutenberg Mobile

Gutenberg Mobile's readme had some copy in the troubleshooting section that wasn't included in Gutenberg's how-to: https://github.com/wordpress-mobile/gutenberg-mobile/edit/trunk/README.md

This commit fixes that issue by updating Gutenberg's how-to with the latest from Gutenberg Mobile.

* Tweak wording, update inconsistent capitalisation

* Tweaks to copy and formatting

With this commit, I've tidied up some of the copy, attempting to make the instructions as concise and helpful as possible. I've also set the images to the same width to tidy up the overall look of the document (the images will appear small on mobile devices, but can be tapped on to get the full image).

* Set all images to fixed width, for consistency

* Rearrange sections to improve overall flow

- The "Unit Tests" is moved towards the bottom of the document, so that's it's closer to the instructions for integration tests. the document flows as follows:
- The steps for installing Xcode are moved under the "iOS" section.
- The overall flow of the document has been updated to the following: Clone Gutenberg > iOS > Android > Tests

* Add details about recommended JDK

* Add details about Cocoapods

* Refine instructions for installing Cocoapods

* Note `ffi` may already be installed

Some versions of Ruby may not require the `ffi` to be manually installed, which is noted with this commit.

* update expected html for file block (#41300)

Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>

* Add waitForVisible() to all blocks (#41126)

* add waits to all block - 1st try

* fix failing tests

* correct if else condition

* fix failing cover block test

* update spaces

* update to use new click helper

* wait for blocks to be visible first in getFirstBlock and getLastBlock

* remove length as a parameter

* update timing for long press since it's failing intermittently in ci

* remove deleted param, revert space changes

* remove redundant code

* exit function once condition is met

* increse wait time for long press

* remove unneccesary condition, update message, return click value

Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>

* Update CHANGELOG

* Revert "update expected html for file block (#41300)"

This reverts commit a046a61.

* [RNMobile] Ensure post title gets focused when is notified from native side (#41371)

* Release script: Update react-native-editor version to 1.77.1

* Release script: Update with changes from 'npm run core preios'

* [RNMobile] Bump `react-native-reanimated` version to `2.4.1-wp-3` (#41482)

* Update react-native-editor changelog

* Release script: Update react-native-editor version to 1.78.0

* Release script: Update with changes from 'npm run core preios'

* [RNMobile] Bump `react-native-gesture-handler` to version `2.3.2` (#41337)

* Update react-native-editor changelog

* Release script: Update react-native-editor version to 1.78.1

* Release script: Update with changes from 'npm run core preios'

* [RNMobile] Gallery block: Re-introduce `v1` (#41533)

* Fix isGalleryV2Enabled calculation for the native version

* Update comment in isGalleryV2Enabled function

Co-authored-by: David Calhoun <438664+dcalhoun@users.noreply.github.com>

Co-authored-by: David Calhoun <438664+dcalhoun@users.noreply.github.com>

* [RNMobile] Fix missing translations for locales that include region (only on Android) (#41685)

* Update CHANGELOG

Co-authored-by: jhnstn <jason@readysetandco.com>
Co-authored-by: Gerardo <gerardo.pacheco@automattic.com>
Co-authored-by: Carlos Garcia <fluiddot@gmail.com>
Co-authored-by: Derek Blank <derekpblank@gmail.com>
Co-authored-by: Derek Blank <derekblank@Dereks-MacBook-Pro.local>
Co-authored-by: Jos <jostnes@users.noreply.github.com>
Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>
Co-authored-by: Jason Johnston <jhnstn@users.noreply.github.com>
Co-authored-by: David Calhoun <438664+dcalhoun@users.noreply.github.com>
dcalhoun added a commit that referenced this pull request Jul 8, 2022
* Release script: Update react-native-editor version to 1.76.0

* Release script: Update with changes from 'npm run core preios'

* Update Changelog

* Release script: Update react-native-editor version to 1.76.1

* Release script: Update with changes from 'npm run core preios'

* [Mobile] - BlockList - Add internal onLayout from CellRendererComponent to BlockListItemCell (#41105)

* Mobile - BlockList - Pass FlatList internal onLayout through CellRendererComponent

* Mobile - Update onLayout naming for BlockListItemCell

* [Mobile] - Fix Drag & Drop Chip positioning issue with RTL languages (#41053)

* Mobile - Fix - Drag & drop chip issue with RTL languages

* Mobile - BlockDraggable - Rename maxWidth variable to contentWidth

* Mobile - BlockDraggable - Add custom exiting animation that uses the same functionality as ZoomOutEasyDown but customizing the translateX value taking into account RTL languages.

* [RNMobile] Add drag & drop help guide in Help & Support screen (#40961)

* Add drag & drop help guide

* Update content of help screen related to moving blocks

* Update drand-and-drop images

* Update styles of heading component of help screen

* Add HelpDetailBadge component

This component will be rendered in `HelpDetailSectionHeadingText` component via the `badge` prop.

* Add NEW badge to move blocks help section

* Optimize drag-and-drop images

* Add move-blocks icon to Help & Support screen

* Update react-native-editor changelog

* Add HelpSectionTitle component

* Prevent rendering separator on last help topic item

* [RNMobile] Fix drag mode not being enabled when long-pressing over Shortcode block (#41155)

* Add prop for disabling suggestions button

* Use allowed formats in format types calculation

* Add RichText version to PlainText component

* Use experimental version of PlainText in Shortcode block

* Add disableAutocorrection prop to RichText

* Disable autocorrection in Shortcode block

* Update PlainText props in Shortcode block

* Use pre as tagName in PlainText

* Rename replaceLineBreaks function

* Update shortcode block unit tests

* Prevent text input focus when selecting Shortcode block

* Force text color in Shortcode block

* Remove tagName prop from PlainText component

* Mobile - Update changelog

* Translate NEW badge in Move blocks help screen

* Release script: Update react-native-editor version to 1.77.0

* Release script: Update with changes from 'npm run core preios'

* [RNMobile] Improve text read by screen readers for BottomSheetSelectControl  (#41036)

Improves the text that's read by screen readers by the BottomSheetSelectControl component, adding extra context and making its purpose clearer.

* [RNMobile] Add 'Insert from URL' option to Image block (#40334)

* Add 'Insert from URL' option to Video and Image blocks

* Update code style from linting

* Improve test cases for Media Upload capture options

* Fix whitespace issue

* Update Media Upload option tests to be asynchronous

* Update native image block to use correct image URL

* Add error handling for invalid URLs to native Image block

* Clear invalid URL error on Image URL success

* Fix synchronicity of Media Upload option tests

* Add check for URL handler to native Image block picker options

* Update code style

* Remove Video block from urlSource options

Why: to be introduced in a later PR

* Remove URL option from Video block for Media Upload test

* Use Notice snackbar for native Image block error handling

* Update Image/Media Upload code style and helpers

* Use getImage to determine if URL is a valid image within Image block

* Add loading indicator and isURL check to native Image block URL behavior

* Add loading indicator to native Image block media placeholder

* Fix whitespace issue in native Image block code style

* Reuse native Image block loading indicator

* Use undefined dimension attributes for the native Image block URL behavior

Co-authored-by: Derek Blank <derekblank@Dereks-MacBook-Pro.local>

* [RNMobile] - E2E Simplify heading and lists blocks functions (#40670)

* update tests using paragraph, heading and list blocks

* fix slash inserter tests to work in ci

* lint fixes

* wait for ordered list to appear

* lint fixes

* extra click only on local env

* wait to get backspace click reflected

* re-add extra click only for local env

* add wait to wait for backspace key to be reflected

* lint fixes

* break function, set position to get list block

* lint fixes

* use correct params, update function name

* lint fixes

* make maxIteration a parameter for isElementVisible

* update xpath for list block

* utilize waitForVisible for isElementVisible

* lint fixes

* add wait to getNumberOfParagraphBlocks and update xpath for android list block

* update edit text xpath to be read from any level

Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>

* Add ruby version file (#41013)

Use same version of ruby that is used on WP iOS

* [RNMobile] Improvements to Getting Started Guides (#40964)

* Update with copy from Gutenberg Mobile

Gutenberg Mobile's readme had some copy in the troubleshooting section that wasn't included in Gutenberg's how-to: https://github.com/wordpress-mobile/gutenberg-mobile/edit/trunk/README.md

This commit fixes that issue by updating Gutenberg's how-to with the latest from Gutenberg Mobile.

* Tweak wording, update inconsistent capitalisation

* Tweaks to copy and formatting

With this commit, I've tidied up some of the copy, attempting to make the instructions as concise and helpful as possible. I've also set the images to the same width to tidy up the overall look of the document (the images will appear small on mobile devices, but can be tapped on to get the full image).

* Set all images to fixed width, for consistency

* Rearrange sections to improve overall flow

- The "Unit Tests" is moved towards the bottom of the document, so that's it's closer to the instructions for integration tests. the document flows as follows:
- The steps for installing Xcode are moved under the "iOS" section.
- The overall flow of the document has been updated to the following: Clone Gutenberg > iOS > Android > Tests

* Add details about recommended JDK

* Add details about Cocoapods

* Refine instructions for installing Cocoapods

* Note `ffi` may already be installed

Some versions of Ruby may not require the `ffi` to be manually installed, which is noted with this commit.

* update expected html for file block (#41300)

Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>

* Add waitForVisible() to all blocks (#41126)

* add waits to all block - 1st try

* fix failing tests

* correct if else condition

* fix failing cover block test

* update spaces

* update to use new click helper

* wait for blocks to be visible first in getFirstBlock and getLastBlock

* remove length as a parameter

* update timing for long press since it's failing intermittently in ci

* remove deleted param, revert space changes

* remove redundant code

* exit function once condition is met

* increse wait time for long press

* remove unneccesary condition, update message, return click value

Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>

* Update CHANGELOG

* Revert "update expected html for file block (#41300)"

This reverts commit a046a61.

* [RNMobile] Ensure post title gets focused when is notified from native side (#41371)

* Release script: Update react-native-editor version to 1.77.1

* Release script: Update with changes from 'npm run core preios'

* [RNMobile] Bump `react-native-reanimated` version to `2.4.1-wp-3` (#41482)

* Update react-native-editor changelog

* Release script: Update react-native-editor version to 1.78.0

* Release script: Update with changes from 'npm run core preios'

* [RNMobile] Bump `react-native-gesture-handler` to version `2.3.2` (#41337)

* Update react-native-editor changelog

* Release script: Update react-native-editor version to 1.78.1

* Release script: Update with changes from 'npm run core preios'

* [RNMobile] Gallery block: Re-introduce `v1` (#41533)

* Fix isGalleryV2Enabled calculation for the native version

* Update comment in isGalleryV2Enabled function

Co-authored-by: David Calhoun <438664+dcalhoun@users.noreply.github.com>

Co-authored-by: David Calhoun <438664+dcalhoun@users.noreply.github.com>

* [RNMobile] Fix missing translations for locales that include region (only on Android) (#41685)

* Update CHANGELOG

* Release script: Update react-native-editor version to 1.79.0

* Release script: Update with changes from 'npm run core preios'

* [RNMobile] Add integration tests to cover Drag & Drop functionality (#41364)

* Add testID prop to Draggable components

* Add unit tests for Draggable component

* Set draggingId shared value before enable dragging

This change is required for testing, otherwise the dragging id is not passed when the dragging gesture begins.

* Mock generateHapticFeedback function

* Add testID to draggable chip component

* Add testID to BlockDraggable component

* Add test helpers for BlockDraggable component

Additionally, helpers related to fake timers have been added and updated in the global helpers file.

* Add drag and drop integration tests

* Update react-native-aztec mock to use AztecInputState

* [Mobile] - Add E2E tests for the Drag & Drop blocks feature (#41368)

* Mobile - Add E2E tests for the Drag & Drop blocks feature

* Update longPress action

* Use clickIfClickable

* Use longPress instead of press

* Fix clipboard typo

* Add setClipboard and clearClipboard helpers

* Mobile - Skip some of the Drag & Drop E2E on iOS (#41529)

* Mobile - Skip some of the Drag & Drop E2E on iOS

* Replace if condition to use onlyOnAndroid wrapper instead

* where it can change to use clickIfClickable(), add new param for waitForVisible() to control return value (#41367)

Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>

* [RNMobile] Add 'Insert from URL' option to Video block (#41493)

* Add onSelectURL function to mobile Video block edit

* Add notices store to mobile Video block

* Display Insert from URL in Video block media options menu

* Allow native video block to use Embed block for embeddable URLs

* Update native Video block src onSelectURL attribute

* Update CHANGELOG

* Upgrade Aztec to v1.5.9 (#41828)

* fix: Image block preserves alt text from media library (#41839)

* fix: Image block preserves alt text from media library

When the alt text for a media item is present in the media library, that
value should be copied into the Image block when inserted. This behavior
avoids the need to re-enter the alt text for each image inserted into
the post content.

* fix: Allow Media with and without alt text

Previous code required an alt text value, which broken existing code.
This overrides the method to support both contexts. It also updates
existing code to use the same method of generating media throughout the
source.

* test: Update alt text for demo editor test data

Consistently setting the alt text for all platforms will likely help
avoid confusion.

* test: Update outdated test fixture data

The demo editor now returns an alt text for the test image media.

* docs: Update changelog

* [RNMobile] Implement recovery option for invalid blocks (#41988)

If a block's validation fails within the mobile app, users are shown an error but not provided with any options for recovering the block. This PR introduces an option for users to attempt block recovery. They'll be prompted to tap on a block if they wish to attempt recovery.

* docs: Update change log

* [RNMobile] Upgrades Gradle to 7.4.2 & Android Gradle Plugin to 7.2.1 (#42136)

* Update Gradle to 7.4.1

* Update AGP to 7.2.1

* Update Aztec-Android version to v1.6.0 (#42243)

Co-authored-by: jhnstn <jason@readysetandco.com>
Co-authored-by: Gerardo <gerardo.pacheco@automattic.com>
Co-authored-by: Carlos Garcia <fluiddot@gmail.com>
Co-authored-by: Siobhan <siobhan@automattic.com>
Co-authored-by: Derek Blank <derekpblank@gmail.com>
Co-authored-by: Derek Blank <derekblank@Dereks-MacBook-Pro.local>
Co-authored-by: Jos <jostnes@users.noreply.github.com>
Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>
Co-authored-by: Jason Johnston <jhnstn@users.noreply.github.com>
Co-authored-by: Oguz Kocer <oguzkocer@users.noreply.github.com>
dcalhoun added a commit that referenced this pull request Jul 20, 2022
* Release script: Update react-native-editor version to 1.76.0

* Release script: Update with changes from 'npm run core preios'

* Update Changelog

* Release script: Update react-native-editor version to 1.76.1

* Release script: Update with changes from 'npm run core preios'

* [Mobile] - BlockList - Add internal onLayout from CellRendererComponent to BlockListItemCell (#41105)

* Mobile - BlockList - Pass FlatList internal onLayout through CellRendererComponent

* Mobile - Update onLayout naming for BlockListItemCell

* [Mobile] - Fix Drag & Drop Chip positioning issue with RTL languages (#41053)

* Mobile - Fix - Drag & drop chip issue with RTL languages

* Mobile - BlockDraggable - Rename maxWidth variable to contentWidth

* Mobile - BlockDraggable - Add custom exiting animation that uses the same functionality as ZoomOutEasyDown but customizing the translateX value taking into account RTL languages.

* [RNMobile] Add drag & drop help guide in Help & Support screen (#40961)

* Add drag & drop help guide

* Update content of help screen related to moving blocks

* Update drand-and-drop images

* Update styles of heading component of help screen

* Add HelpDetailBadge component

This component will be rendered in `HelpDetailSectionHeadingText` component via the `badge` prop.

* Add NEW badge to move blocks help section

* Optimize drag-and-drop images

* Add move-blocks icon to Help & Support screen

* Update react-native-editor changelog

* Add HelpSectionTitle component

* Prevent rendering separator on last help topic item

* [RNMobile] Fix drag mode not being enabled when long-pressing over Shortcode block (#41155)

* Add prop for disabling suggestions button

* Use allowed formats in format types calculation

* Add RichText version to PlainText component

* Use experimental version of PlainText in Shortcode block

* Add disableAutocorrection prop to RichText

* Disable autocorrection in Shortcode block

* Update PlainText props in Shortcode block

* Use pre as tagName in PlainText

* Rename replaceLineBreaks function

* Update shortcode block unit tests

* Prevent text input focus when selecting Shortcode block

* Force text color in Shortcode block

* Remove tagName prop from PlainText component

* Mobile - Update changelog

* Translate NEW badge in Move blocks help screen

* Release script: Update react-native-editor version to 1.77.0

* Release script: Update with changes from 'npm run core preios'

* [RNMobile] Improve text read by screen readers for BottomSheetSelectControl  (#41036)

Improves the text that's read by screen readers by the BottomSheetSelectControl component, adding extra context and making its purpose clearer.

* [RNMobile] Add 'Insert from URL' option to Image block (#40334)

* Add 'Insert from URL' option to Video and Image blocks

* Update code style from linting

* Improve test cases for Media Upload capture options

* Fix whitespace issue

* Update Media Upload option tests to be asynchronous

* Update native image block to use correct image URL

* Add error handling for invalid URLs to native Image block

* Clear invalid URL error on Image URL success

* Fix synchronicity of Media Upload option tests

* Add check for URL handler to native Image block picker options

* Update code style

* Remove Video block from urlSource options

Why: to be introduced in a later PR

* Remove URL option from Video block for Media Upload test

* Use Notice snackbar for native Image block error handling

* Update Image/Media Upload code style and helpers

* Use getImage to determine if URL is a valid image within Image block

* Add loading indicator and isURL check to native Image block URL behavior

* Add loading indicator to native Image block media placeholder

* Fix whitespace issue in native Image block code style

* Reuse native Image block loading indicator

* Use undefined dimension attributes for the native Image block URL behavior

Co-authored-by: Derek Blank <derekblank@Dereks-MacBook-Pro.local>

* [RNMobile] - E2E Simplify heading and lists blocks functions (#40670)

* update tests using paragraph, heading and list blocks

* fix slash inserter tests to work in ci

* lint fixes

* wait for ordered list to appear

* lint fixes

* extra click only on local env

* wait to get backspace click reflected

* re-add extra click only for local env

* add wait to wait for backspace key to be reflected

* lint fixes

* break function, set position to get list block

* lint fixes

* use correct params, update function name

* lint fixes

* make maxIteration a parameter for isElementVisible

* update xpath for list block

* utilize waitForVisible for isElementVisible

* lint fixes

* add wait to getNumberOfParagraphBlocks and update xpath for android list block

* update edit text xpath to be read from any level

Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>

* Add ruby version file (#41013)

Use same version of ruby that is used on WP iOS

* [RNMobile] Improvements to Getting Started Guides (#40964)

* Update with copy from Gutenberg Mobile

Gutenberg Mobile's readme had some copy in the troubleshooting section that wasn't included in Gutenberg's how-to: https://github.com/wordpress-mobile/gutenberg-mobile/edit/trunk/README.md

This commit fixes that issue by updating Gutenberg's how-to with the latest from Gutenberg Mobile.

* Tweak wording, update inconsistent capitalisation

* Tweaks to copy and formatting

With this commit, I've tidied up some of the copy, attempting to make the instructions as concise and helpful as possible. I've also set the images to the same width to tidy up the overall look of the document (the images will appear small on mobile devices, but can be tapped on to get the full image).

* Set all images to fixed width, for consistency

* Rearrange sections to improve overall flow

- The "Unit Tests" is moved towards the bottom of the document, so that's it's closer to the instructions for integration tests. the document flows as follows:
- The steps for installing Xcode are moved under the "iOS" section.
- The overall flow of the document has been updated to the following: Clone Gutenberg > iOS > Android > Tests

* Add details about recommended JDK

* Add details about Cocoapods

* Refine instructions for installing Cocoapods

* Note `ffi` may already be installed

Some versions of Ruby may not require the `ffi` to be manually installed, which is noted with this commit.

* update expected html for file block (#41300)

Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>

* Add waitForVisible() to all blocks (#41126)

* add waits to all block - 1st try

* fix failing tests

* correct if else condition

* fix failing cover block test

* update spaces

* update to use new click helper

* wait for blocks to be visible first in getFirstBlock and getLastBlock

* remove length as a parameter

* update timing for long press since it's failing intermittently in ci

* remove deleted param, revert space changes

* remove redundant code

* exit function once condition is met

* increse wait time for long press

* remove unneccesary condition, update message, return click value

Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>

* Update CHANGELOG

* Revert "update expected html for file block (#41300)"

This reverts commit a046a61.

* [RNMobile] Ensure post title gets focused when is notified from native side (#41371)

* Release script: Update react-native-editor version to 1.77.1

* Release script: Update with changes from 'npm run core preios'

* [RNMobile] Bump `react-native-reanimated` version to `2.4.1-wp-3` (#41482)

* Update react-native-editor changelog

* Release script: Update react-native-editor version to 1.78.0

* Release script: Update with changes from 'npm run core preios'

* [RNMobile] Bump `react-native-gesture-handler` to version `2.3.2` (#41337)

* Update react-native-editor changelog

* Release script: Update react-native-editor version to 1.78.1

* Release script: Update with changes from 'npm run core preios'

* [RNMobile] Gallery block: Re-introduce `v1` (#41533)

* Fix isGalleryV2Enabled calculation for the native version

* Update comment in isGalleryV2Enabled function

Co-authored-by: David Calhoun <438664+dcalhoun@users.noreply.github.com>

Co-authored-by: David Calhoun <438664+dcalhoun@users.noreply.github.com>

* [RNMobile] Fix missing translations for locales that include region (only on Android) (#41685)

* Update CHANGELOG

* Release script: Update react-native-editor version to 1.79.0

* Release script: Update with changes from 'npm run core preios'

* [RNMobile] Add integration tests to cover Drag & Drop functionality (#41364)

* Add testID prop to Draggable components

* Add unit tests for Draggable component

* Set draggingId shared value before enable dragging

This change is required for testing, otherwise the dragging id is not passed when the dragging gesture begins.

* Mock generateHapticFeedback function

* Add testID to draggable chip component

* Add testID to BlockDraggable component

* Add test helpers for BlockDraggable component

Additionally, helpers related to fake timers have been added and updated in the global helpers file.

* Add drag and drop integration tests

* Update react-native-aztec mock to use AztecInputState

* [Mobile] - Add E2E tests for the Drag & Drop blocks feature (#41368)

* Mobile - Add E2E tests for the Drag & Drop blocks feature

* Update longPress action

* Use clickIfClickable

* Use longPress instead of press

* Fix clipboard typo

* Add setClipboard and clearClipboard helpers

* Mobile - Skip some of the Drag & Drop E2E on iOS (#41529)

* Mobile - Skip some of the Drag & Drop E2E on iOS

* Replace if condition to use onlyOnAndroid wrapper instead

* where it can change to use clickIfClickable(), add new param for waitForVisible() to control return value (#41367)

Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>

* [RNMobile] Add 'Insert from URL' option to Video block (#41493)

* Add onSelectURL function to mobile Video block edit

* Add notices store to mobile Video block

* Display Insert from URL in Video block media options menu

* Allow native video block to use Embed block for embeddable URLs

* Update native Video block src onSelectURL attribute

* Update CHANGELOG

* Upgrade Aztec to v1.5.9 (#41828)

* fix: Image block preserves alt text from media library (#41839)

* fix: Image block preserves alt text from media library

When the alt text for a media item is present in the media library, that
value should be copied into the Image block when inserted. This behavior
avoids the need to re-enter the alt text for each image inserted into
the post content.

* fix: Allow Media with and without alt text

Previous code required an alt text value, which broken existing code.
This overrides the method to support both contexts. It also updates
existing code to use the same method of generating media throughout the
source.

* test: Update alt text for demo editor test data

Consistently setting the alt text for all platforms will likely help
avoid confusion.

* test: Update outdated test fixture data

The demo editor now returns an alt text for the test image media.

* docs: Update changelog

* [RNMobile] Implement recovery option for invalid blocks (#41988)

If a block's validation fails within the mobile app, users are shown an error but not provided with any options for recovering the block. This PR introduces an option for users to attempt block recovery. They'll be prompted to tap on a block if they wish to attempt recovery.

* docs: Update change log

* [RNMobile] Upgrades Gradle to 7.4.2 & Android Gradle Plugin to 7.2.1 (#42136)

* Update Gradle to 7.4.1

* Update AGP to 7.2.1

* Update Aztec-Android version to v1.6.0 (#42243)

* Release script: Update react-native-editor version to 1.79.1

* Release script: Update with changes from 'npm run core preios'

* fix: Workaround Android 12 webview crash (#42517)

* fix: Workaround Android 12 webview crash

A crash occurred due to combining webviews with Android 12's new scroll
overflow behavior. Applying `opacity: 0.99` prevents the crash from
occurring. This change should be viewed as a temporary fix while we
await a more appropriate solution for the `react-native-webview`
library.

react-native-webview/react-native-webview#1915 (comment)

* docs: Add change log entry

Co-authored-by: jhnstn <jason@readysetandco.com>
Co-authored-by: Gerardo <gerardo.pacheco@automattic.com>
Co-authored-by: Carlos Garcia <fluiddot@gmail.com>
Co-authored-by: Siobhan <siobhan@automattic.com>
Co-authored-by: Derek Blank <derekpblank@gmail.com>
Co-authored-by: Derek Blank <derekblank@Dereks-MacBook-Pro.local>
Co-authored-by: Jos <jostnes@users.noreply.github.com>
Co-authored-by: jos <17252150+jostnes@users.noreply.github.com>
Co-authored-by: Jason Johnston <jhnstn@users.noreply.github.com>
Co-authored-by: Oguz Kocer <oguzkocer@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants