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] Native mobile release v1.16.0 #18210

Merged
merged 106 commits into from
Nov 1, 2019

Conversation

hypest
Copy link
Contributor

@hypest hypest commented Oct 31, 2019

Description

This PR tracks the release v1.16.0 of the native mobile block editor.

How has this been tested?

Using gutenberg-mobile side PR: wordpress-mobile/gutenberg-mobile#1521

Types of changes

No new changes, everything was introduced in separate PRs that have been merged to master.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

Ryan Welcher and others added 30 commits October 14, 2019 08:43
…res (#17858)

* Add an apiFetch middleware to automatically handle media upload failures

* Remove the attachement on failures

* Handle errors properly

* limit the media upload middleware to the 500 responses

* Fix the error handling and unit tests

* Api Fetch: Check for 502s and parse uncaught errors in Media Upload middleware.
…nction (#17893)

* Fix issue-7378 - change name of accumulated variables when using reduce function

* fix issue-7378 - update variables names

* fix issue-7378 - update variables names
* Update the regex used when removing NEW_TAB_REL and add trimming (+2 squashed commits)
Squashed commits:
[cf71759c3] Accessibility:Image Block:Link Editor: Move Link Rel field below Open new tab toggle
[310a23c33] Fix:Image Block:Link Editor: Hide 'noreferrer' and 'noopener' in Link Rel field

* post rebases fixes


Co-authored-by: Jorge Costa <jorge.costa@developer.pt>
 - @wordpress/a11y@2.5.1
 - @wordpress/annotations@1.7.2
 - @wordpress/api-fetch@3.6.2
 - @wordpress/autop@2.5.1
 - @wordpress/babel-preset-default@4.6.2
 - @wordpress/blob@2.5.1
 - @wordpress/block-directory@1.0.2
 - @wordpress/block-editor@3.2.2
 - @wordpress/block-library@2.9.2
 - @wordpress/block-serialization-default-parser@3.4.1
 - @wordpress/block-serialization-spec-parser@3.3.1
 - @wordpress/blocks@6.7.2
 - @wordpress/components@8.3.2
 - @wordpress/compose@3.7.2
 - @wordpress/core-data@2.7.2
 - @wordpress/data-controls@1.3.2
 - @wordpress/data@4.9.2
 - @wordpress/deprecated@2.6.1
 - @wordpress/dom-ready@2.5.1
 - @wordpress/dom@2.5.2
 - @wordpress/e2e-test-utils@2.4.2
 - @wordpress/e2e-tests@1.7.2
 - @wordpress/edit-post@3.8.2
 - @wordpress/edit-widgets@0.7.2
 - @wordpress/editor@9.7.2
 - @wordpress/element@2.8.2
 - @wordpress/escape-html@1.5.1
 - @wordpress/format-library@1.9.2
 - @wordpress/is-shallow-equal@1.6.1
 - @wordpress/keycodes@2.6.2
 - @wordpress/list-reusable-blocks@1.8.2
 - @wordpress/media-utils@1.2.2
 - @wordpress/notices@1.8.2
 - @wordpress/nux@3.7.2
 - @wordpress/plugins@2.7.2
 - @wordpress/priority-queue@1.3.1
 - @wordpress/redux-routine@3.6.2
 - @wordpress/rich-text@3.7.2
 - @wordpress/scripts@5.1.0
 - @wordpress/server-side-render@1.3.2
 - @wordpress/url@2.8.1
 - @wordpress/viewport@2.8.2
 - @wordpress/wordcount@2.6.2
* Check that url is defined before passing into prependHttp

* Shift check from component to url lib
* Add checkbox control stories for Storybook

* Update README example to match story, useState

* Apply suggestions from code review

👍

Co-Authored-By: Enrique Piqueras <epiqueras@users.noreply.github.com>

* Update story to match README

* Add variants for heading, label, help

* Update packages/components/src/checkbox-control/README.md

Co-Authored-By: Grzegorz (Greg) Ziółkowski <grzegorz@gziolo.pl>

* Add Knobs addon to Storybook

* Move storybook addon to dev-dependencies

* Solve lint dependency by excluding stories, dont need in package.json

* Apply suggestions from code review

Co-Authored-By: Enrique Piqueras <epiqueras@users.noreply.github.com>

* Update with story level decorators

* Switch back to global withKnobs, per story not working

* Change the name of the example in ChecboxControl story

* Try with the uppercase name of the component exported from stories
* [RNMobile] Native mobile release v1.11.0 (#17181)

* [RNMobile] Fix crash when adding separator

* Build: remove global install of latest npm since we want to use the paired node/npm version (#17134)

* Build: remove global install of latest npm since we want to use the paired node/npm version
* Also update travis to remove --latest-npm flag

* [RNMobile] Try dark mode (iOS) (#17067)

* Adding dark mode component implemented on list and list block

* Adding DarkMode handling to RichText, ToolBar and SafeArea

* Mobile: Using DarkMode as HOC

* iOS DarkMode: Modified colors on block list and block container

* iOS DarkMode: Improved Header Toolbar colors

* iOS DarkMode: Removing background from buttons

* iOS DarkMode warning and unsupported

* iOS DarkMode: MediaPlaceholder

* iOS DarkMode: BottomSheets

* iOS DarkMode: Inserter

* iOS DarkMode: DefaultBlockAppender

* iOS DarkMode: PostTite

* Update hardcoded colors with variables

* iOS DarkMode: Fix bottom-sheet cell value color

* iOS DarkMode: More - PageBreak - Add Block Here

* iOS DarkMode: Better text color

* iOS Darkmode: Code block

* iOS DarkMode: HTML View

* iOS DarkMode: Improve colors on SafeArea

* Fix toolbar not avoiding keyboard regression

* Fix native unit tests

* Fix gutenberg-mobile unit tests

* Adding RNDarkMode mocks

* RNMobile: Fix crash when viewing HTML on iOS

* [RNMobile] Remove toolbar from html view

* [RNMobile] Fix MaxListenersExceededWarning caused by dark-mode event emitter (#17186)

* Fix MaxListenersExceededWarning caused by dark-mode event emitter

* Checking for setMaxListeners trying to avoid CI error

* Adding remove listener to DarkMode HOC

* DarkMode: Binding this.onModeChanged to `this`

* DarkMode: Adding conditional needed to pass UI Tests on CI

* Fix focus title on new posts regression (#17180)

* BottomSheet: Setting DashIcon color directly when theme is default (light) (#17193)

* Activate Travis CI on rnmobile/master branch (#17229)

* Added ability to update image size options (sizeSlug) through a new InspectorControl Cell that leads to a Picker.

* Added a style for Size Inspector Controls cell to align it will other cells that have icons.

* Add native support for the MediaText block (#16305)

* First working version of the MediaText component for native mobile

* Fix adding a block to an innerblock list

* Disable mediaText on production

* MediaText native: improve editor visuals

* Move BlockToolbar from BlockList to Layout

* Remove BlockEditorProvider from BlockList and add native version of EditorProvider to Editor. Plus support InsertionPoint and BlockListAppender

* Update BlockMover for native to hide if locked or if it's the only block

* Make the vertical align button work, add more styling options for toolbar buttons

* Make sure registerCoreBlocks does not break in production

* Copy docblock comment from the web version for registerCoreBlocks

* Fix focusing on the media placeholder

* Only support adding image for now

* Update usage of MediaPlaceholder in MediaContainer

* Enable autoScroll for just the out most block list

* Fix JS Unit tests

* Roll back to IconButton refactor and fix tests

* Fix BlockVerticalAlignmentToolbar buttons style on mobile

* Fix thing for web and ensure ariaPressed is always passed down

* Use AriaPressed directly to style SVG on mobile

* Update snapshots

* Swtiched to react-native Modal onDismiss property for signaling Picker is ready to show

* Added a prop for catching modal dismissal on Android. (onDismiss is iOS only and onModalHide works on Android but breaks on iOS)

* Added icon for Inspector Controls size option. Removed style we no longer need.

* Added title to size option iOS ActionSheet and left alignstyle to size options BottomSheet

* MediaUpload and MediaPlaceholder unify props (#17145)

* Unify media placeholder and upload props within media-text (#17268)

* [RNMobile] Fix dismiss keyboard button for the post title (#17260)

* Set unused functions to undefined instead of false in BottomSheet Modal props

* Recover border colors (#17269)

* [RNMobile] Insure tapping at end of post inserts at end

Previously, tapping at the end of the post would insert a block
immediately after the currently selected block. In addition, this commit
is cleaning out a few unusued props in the block-list file.

* Support group block on mobile (#17251)

* First working version of the MediaText component for native mobile

* Fix adding a block to an innerblock list

* Disable mediaText on production

* MediaText native: improve editor visuals

* Move BlockToolbar from BlockList to Layout

* Remove BlockEditorProvider from BlockList and add native version of EditorProvider to Editor. Plus support InsertionPoint and BlockListAppender

* Update BlockMover for native to hide if locked or if it's the only block

* Make the vertical align button work, add more styling options for toolbar buttons

* Make sure registerCoreBlocks does not break in production

* Copy docblock comment from the web version for registerCoreBlocks

* Fix focusing on the media placeholder

* Only support adding image for now

* Update usage of MediaPlaceholder in MediaContainer

* Enable autoScroll for just the out most block list

* Fix JS Unit tests

* Roll back to IconButton refactor and fix tests

* Fix BlockVerticalAlignmentToolbar buttons style on mobile

* Fix thing for web and ensure ariaPressed is always passed down

* Use AriaPressed directly to style SVG on mobile

* Update snapshots

* Support group block on mobile

* Extend shouldShowInsertionPoint condition to be false when group is selected

* Code refactor

* Update package-lock

* Removing old style reference.

* Moved Picker for image size options into new ImageSizePicker component. Cleaned up sizeOptionLabels.

* Updated total left margin on Android Image size options to be 24 px instead of 28 px

* Image Size options hidden behind __DEV__ flag

* Remove redundant bg color within button appender (#17325)

* [RNMobile] DarkMode improvements (#17309)

* Remove the need to import `useStyle` and pass the theme prop on every instance that `withStyle` is used

* Implement dark-mode refactor on all components

* Fix broken native tests

* Fix default block appender background color on DarkMode

* DarkMode: Make `useStyle` a class function

* Cleaned up default true properties and replaced code with lodash map.

* Updated to use BottomSheetPickerCell. Eliminated code, but size options now open over top inspector controls menu.

* Added leftalign to PickerCell.

* [RNMobile] Add autosave to mobile apps (#17329)

* [RNMobile] Fix crash when adding separator

* Build: remove global install of latest npm since we want to use the paired node/npm version (#17134)

* Build: remove global install of latest npm since we want to use the paired node/npm version
* Also update travis to remove --latest-npm flag

* [RNMobile] Try dark mode (iOS) (#17067)

* Adding dark mode component implemented on list and list block

* Adding DarkMode handling to RichText, ToolBar and SafeArea

* Mobile: Using DarkMode as HOC

* iOS DarkMode: Modified colors on block list and block container

* iOS DarkMode: Improved Header Toolbar colors

* iOS DarkMode: Removing background from buttons

* iOS DarkMode warning and unsupported

* iOS DarkMode: MediaPlaceholder

* iOS DarkMode: BottomSheets

* iOS DarkMode: Inserter

* iOS DarkMode: DefaultBlockAppender

* iOS DarkMode: PostTite

* Update hardcoded colors with variables

* iOS DarkMode: Fix bottom-sheet cell value color

* iOS DarkMode: More - PageBreak - Add Block Here

* iOS DarkMode: Better text color

* iOS Darkmode: Code block

* iOS DarkMode: HTML View

* iOS DarkMode: Improve colors on SafeArea

* Fix toolbar not avoiding keyboard regression

* Fix native unit tests

* Fix gutenberg-mobile unit tests

* Adding RNDarkMode mocks

* RNMobile: Fix crash when viewing HTML on iOS

* [RNMobile] Remove toolbar from html view

* [RNMobile] Fix MaxListenersExceededWarning caused by dark-mode event emitter (#17186)

* Fix MaxListenersExceededWarning caused by dark-mode event emitter

* Checking for setMaxListeners trying to avoid CI error

* Adding remove listener to DarkMode HOC

* DarkMode: Binding this.onModeChanged to `this`

* DarkMode: Adding conditional needed to pass UI Tests on CI

* Fix focus title on new posts regression (#17180)

* BottomSheet: Setting DashIcon color directly when theme is default (light) (#17193)

* Add a preliminary version of the AutosaveMonitor for mobile that calls the "bridge" and asks the native side to save the content

* Add autosave mock function for tests

* Fix merge conflicts

* Fix lint

* Re-add autosave on mobile that was removed erroneously during import-merge from rnmobile/master

* Remove native variant of AutosaveMonitor and introduces changes at  editor store level

* Default to false for `isEditedPostAutosaveable` on mobile. There was a typo in the returing value on the previous commit.

* Make sure to consider edits to the Title when checking if auto-save is needed

* Fix lint

*  Add isAppender functionality on mobile (#17195)

* Add isAppender functionality on mobile

* refactor isAppender conditions

* Replace dropZoneUIOnly in favour of showMediaSelectionUI

* deprecate dropZoneUIOnly and add disableMediaSelection prop

* Update test

* Refactor tests and change prop name

* Remove redundant empty lines

* Refactor conditions inside MediaPlaceholder

* Update block-editor CHANGELOG

* Update packages/block-editor/CHANGELOG.md

Co-Authored-By: Grzegorz (Greg) Ziółkowski <grzegorz@gziolo.pl>

* Autosave monitor - Make the mobile editor ping the native at each keystroke, since the deboucing logic is already well defined in the apps. (#17548)

* [RNMobile] Refactor Dark Mode HOC (#17552)

* [RNMobile] Refactor the Dark Mode HOC to fix naming antipatterns

* Fix lint errors

* Add .native.js suffix to usePreferredColorScheme

* Update usage of theme props renamed to preferredColorScheme

* Update usage of theme props renamed to preferredColorScheme

* Add missing heading levels to the UI (H4, H5, H6) (#17533)

* Fix lint issue (#17598)

* Fix list filter on paste for RN mobile. (#17550)

* Fix method for RN mobile.

* Use array.From instead of slice.

* Remove comment and use Array.from directly

* Convert from NodeList spreadable to Array.from

* Fix lint errors.

* Fix documentation examples to use Array.from

* Add empty line.

* [RNMobile] Move MediaUploadPorgress to its own component folder (#17392)

* Move MediaUploadPorgress to its own component folder (native)

* MediaUploadProgress - Fix import to code standards

* MediaUploadProgress readme

* Mobile - MediaUploadProgress README update

* Rnmobile/fix link editing on start (#17631)

* Don't try to clear links if text is clean.

* Commented LinkUI removal test when no URL.

* Don't try to remove link if we are at start of link and no actual selection is

* Re-implementing #17802, affected by merge. Fixed extra space and unused code.

* Fixing lint error, trailing space.
* 💁 add 'upstream' remote

* 🐛 origin / remote
…17969)

* Fix: Invalid import statement for deprecated in the modal component

* Font Size Picker: Update E2E test to work with new Core changes.
* Really simple first attempt at showing a display name in the navigator

* Strip any RichText formatting

* Add display name for navigation menu item block

* Refactor to use displayNameAttribute property

* Change name of displayName options
Adds `sideEffects:false` to `package.json` so that unused exports can be optimized away
by the bundler.

Moves the `compose` definition (i.e., reexport from Lodash) to its own module, so that
we don't pull in Lodash just by importing something from `@wordpress/compose`. After this
patch, one needs to import `compose` explicitly to trigger the Lodash import.
* Intrdouce groupin in the block settings inspector

* Adjust PanelBody to design

* Adjust padding when section doesnt have title

* Rewirte arrow function to function

* Fix lint issue

* Create a PanelActions component for handling action buttons in the block settings inspector

* Remove useless separator type and fix typo

* Refactor after CR

* Correct label styles

* Fix overriding mechanism on label style
* Add knobs to ColorIndicator

* Lint: new line
Copy link
Contributor

@SergioEstevao SergioEstevao left a comment

Choose a reason for hiding this comment

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

Tested using the PR for version 1.16 on the main app and it's looking good.

Copy link
Contributor

@etoledom etoledom left a comment

Choose a reason for hiding this comment

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

Tested on WPiOS and approved via wordpress-mobile/WordPress-iOS#12813 (review)

@SergioEstevao SergioEstevao merged commit f6b72f2 into rnmobile/releases Nov 1, 2019
@SergioEstevao SergioEstevao deleted the rnmobile/release-1.16.0 branch November 1, 2019 15:47
@hypest hypest restored the rnmobile/release-1.16.0 branch November 4, 2019 09:30
@etoledom etoledom deleted the rnmobile/release-1.16.0 branch November 4, 2019 10:17
hypest added a commit that referenced this pull request Nov 4, 2019
hypest added a commit that referenced this pull request Nov 4, 2019
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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.