-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Handle gutenberg request "open media picker" #10430
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
Conversation
|
I updated the react-native-aztec subrepo ref with the last commit, so following lines will allow you to test the code with XCode via WPiOS by default: // USE "WordPress-Swift.h" to run on WPiOS, or "RNTAztecView-Swift.h" to run Example App. If you want to run the example app via "yarn ios" you should switch the imports here |
|
I included the child PR about the image block toolbar WordPress/gutenberg#11660 into this PR with the last commit because it has very similar test steps with this PR so same person can easily test. |
|
I added a new commit to fix the example app. To test that you should refer to Test 4. |
|
Tested:
|
Generated by 🚫 Danger |
etoledom
left a comment
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.
It's looking super good! 🎉
I had one small observation and one question (out of curiosity mostly):
GutenbergMediaPickerHelper looks super similar to the AztecPostViewController media picker handling. I can see small differences but I think that's because of this simplified first implementation.
Do you think that GutenbergMediaPickerHelper could grow enough to be shared between AztecPostViewController and GutenbergController?
I know I'm going a bit (a lot) ahead of time.
I'm happy to merge GutenbergMediaPickerHelper as it is now 👍
|
|
||
| let navBarManager = PostEditorNavigationBarManager() | ||
|
|
||
| var mediaPickerHelper: GutenbergMediaPickerHelper! |
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.
Maybe we can use a lazy var instead of a❗️optional?
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.
Done. Much better now :)
Yes absolutely, once gutenberg has the same(or similar enough) media picker functionality with aztec we can extract all related code to GutenbergMediaPickerHelper and make them both use it. in this case we'd rename it also. Of course it depends on how much functionality they will share but we should definitely look for ways to decrease code duplication. |
|
Let's get #10441 merged first so that we won't need the hacky fix to make this CI builds pass and we can get rid of branch react-native-aztec/temp-import-for-react-native. |
This makes react-native-aztec & gutenberg subrepos to point to master
|
We can merge this after merging wordpress-mobile/gutenberg-mobile#229 |
etoledom
left a comment
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.
Fixes wordpress-mobile/gutenberg-mobile#192
This has child PRs so we need to merge them first:
wordpress-mobile/gutenberg-mobile#229 (merged)
WordPress/gutenberg#11635 (merged)
WordPress/gutenberg#11660 (merged)
To test:
Test 1:
Test 2:
Test 3:
Please refer to child PR to find specific test cases related to toolbar.
Test 4:(Testing example app)
There's an example app under: WordPress-iOS/Gutenberg/ios/gutenberg.xcodeproj it should also work ok after this PR. It should be run by "yarn ios"
Open RCTAztecViewManager.m
Update it as
#import "RNTAztecView-Swift.h"
//#import "WordPress-Swift.h"