-
Notifications
You must be signed in to change notification settings - Fork 58
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
Add post title to Gutenberg Mobile #450
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. |
@@ -17,7 +17,7 @@ Hello World | |||
<!-- /wp:title --> | |||
|
|||
<!-- wp:heading {"level": 2} --> | |||
<h2>Welcome to Gutenberg</h2> | |||
<h2>What is Gutenberg?</h2> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, cool, I see.
@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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
… 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Noto
font family to the repository.Focus points:
For @hypest and anyone else wanting to chime in:
AppContainer.js
makes 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: