Add post title to Gutenberg Mobile#450
Conversation
|
@diegoreymendez Just wanted to check, did you update the JS bundles intentionally for this PR or are they some side effect of merges? If the second one is true I'd say we can just reset those changes. They seem to conflict anyway. |
|
|
||
| <!-- wp:heading {"level": 2} --> | ||
| <h2>Welcome to Gutenberg</h2> | ||
| <h2>What is Gutenberg?</h2> |
There was a problem hiding this comment.
Is this a change needed for the PR? Asking since it introduces a trivial chance in a test as well and, not sure it's important for some reason.
There was a problem hiding this comment.
Well only because the post looks weird with "Welcome to Gutenberg" written twice. Once in the title and the other in this header down in the content.
|
@pinarol -
I updated them on purpose so that testing this PR integrated into WPiOS is easier. I can regenerate them before merging the PR if all looks fine.
That's interestingly broken. I'll look into this. |
|
@pinarol - All of the issues with title focus should be resolved now. I believe I've covered all of the existing feedback from your end, but let me know if I missed anything. Thanks for the help. This is ready to review again. |
… bridge code, and use it the glue code called from the parent wp-android app.
…o-gb-mobile Android - Add post title to Gutenberg Mobile
|
|
||
| const html = serialize( this.props.getBlocks() ); | ||
| RNReactNativeGutenbergBridge.provideToNative_Html( html, this.lastHtml !== html ); | ||
| const hasChanges = this.state.title !== this.lastTitle || this.lastHtml !== html; |
There was a problem hiding this comment.
Noticed that hasChanges is returned to the Android (wp-android) side as false, even if i changed the content of the post in the editor. The first time the native side calls the method to retrieve the content from RN, true is returned, and then the next calls to retrieve the content return false.
There was a problem hiding this comment.
Is this a regression or is this a problem with the original logic (before my changes) too?
The reason I'm asking is that the condition and logic haven't changed much in terms of what happens when you edit the content, and if this issue was part of the original logic, fixing it is outside of the purpose of this PR.
…ng content from the React side. This was necessary since the call to retrieve content and title are separate on Android.
…rg-mobile into issue/372-add-title-to-gutenberg-mobile * 'develop' of https://github.com/wordpress-mobile/gutenberg-mobile: Make sure to use `setContent` when initializating the GlueCode Dock the keyboard hide button to the right side of the screen (#480) RNAztecView: Removing branch spec from podspec Moving RNTAztecView.podspec to the gutenberg-mobile root dir. Aztec iOS: Force send height information to JS after pasting text # Conflicts: # gutenberg # react-native-gutenberg-bridge/android/src/main/java/org/wordpress/mobile/WPAndroidGlue/WPAndroidGlueCode.java
|
Merging, but I'll be going through these PRs tomorrow to list any pending work. Thanks for the feedback everyone. |

Description:
Implements the editor title in RN for Gutenberg, also removes the native title.
This PR also adds the
Notofont family to the repository.Focus points:
For @hypest and anyone else wanting to chime in:
AppContainer.jsmakes sense. I'm not sure how it would work to have that in redux so I just went for a simple initial solution.Related PRs:
gutenberg: WordPress/gutenberg#13199
WPiOS: wordpress-mobile/WordPress-iOS#10794
WPAndroid: wordpress-mobile/WordPress-Android#9027
Testing:
Test 1:
Check the iOS console log that the title is properly retrieved. (not sure if there's a similar log in Android)
Test 2: