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

Create a library/framework that can be used in the apps #163

Closed
koke opened this issue Oct 16, 2018 · 11 comments
Closed

Create a library/framework that can be used in the apps #163

koke opened this issue Oct 16, 2018 · 11 comments
Assignees
Milestone

Comments

@koke
Copy link
Member

koke commented Oct 16, 2018

We want to be able to use gutenberg-mobile in the mobile apps (Android and iOS). More specifically we should be able to:

  • run a debug build of the app in Android Studio. or Xcode, and be able to include a debug version of gutenberg-mobile inside it
  • include gutenberg-mobile in a release build of WPAndroid/WPiOS
@koke
Copy link
Member Author

koke commented Oct 22, 2018

@etoledom since you're already half way through this, can you make a task list of what needs to be done and add some estimations by Wednesday? @hypest can help with the Android bits

@koke
Copy link
Member Author

koke commented Oct 23, 2018

Also, as we work on this one, let's make sure to keep @wordpress-mobile/platform-9 involved

@loremattei
Copy link
Contributor

Hey! Thanks for pinging @koke!
@etoledom @hypest let me know when we can talk about this :-)

@etoledom
Copy link
Contributor

For the tasks mentioned, I believe that one sprint time is enough to have a first up-and-running Gutenberg inside the Native apps. But being aware that it will not be a definitive setup.

Ideally we will give a working starting point open to evolve with future requests, realizations and issues that we might encounter.

@hypest
Copy link
Contributor

hypest commented Nov 6, 2018

Android subtasks:

  • Debug version of wpandroid with Gutenberg-mobile integrated
  • Release version of wpandroid with Gutenberg-mobile integrated
  • Move from git submodule to git subtree to include the editor's code or decide to library-fy in a different way

@jtreanor
Copy link
Contributor

jtreanor commented Nov 12, 2018

👋I have been spending some time taking the feature branches for integration in the WordPress apps for a spin. I'm very impressed with all the progress that has been made.

One thing that I'd like to highlight is where the border between React Native and native should live. In my opinion, the ideal state would be that the apps are not required to have any React Native knowledge in order to consume Gutenberg.

On the feature branch for WP Android, GutenbergEditorFragment.java currently does much of the RN bridging logic within the app itself. This makes sense right now to help iterate quickly and feel out the best approach. However, I think we should revisit this closer to the final release. Perhaps this RN context could be moved back to gutenberg-mobile or even a new repo.

I discussed this with @hypest and he suggested I post here to capture these thoughts.

@etoledom
Copy link
Contributor

Thanks for taking the time to check this out @jtreanor !

On WPiOS, my effort is to expose this header file to the WordPress app:

https://github.com/wordpress-mobile/gutenberg-mobile/blob/master/react-native-gutenberg-bridge/ios/Gutenberg.h

It expose Gutenberg Editor as a UIView (similar to Aztec), a delegate to receive messages and methods to send messages to Gutenberg. And it doesn't have dependencies on React/React-Native.

My intentions is to firstly try an integration via Cocoapods. Not sure if it's the best option, but it's the one I have found more info about.

Waiting forward to know your opinion about it!

@loremattei
Copy link
Contributor

Hey! These messages make me realise that I'm very late in answering a ping from @koke here: #195 (comment). :-)
About it, I agree 100% with the target of having binary integration for release and no-GB dev builds and source level integration for working with GB in the apps.
Of course, let us know any help Platform9 can give on this.

@jtreanor
Copy link
Contributor

@etoledom That looks like a very promising approach and exactly what I was talking about above.

CocoaPods in some form will probably make sense for consistency with the rest of the app. Its possible that distributing the pod as a binary may make sense, though I'm not too sure.

I'll check out the in progress iOS integration some more and let you know if I have any thoughts.

As @loremattei said, if there is anything specific we can help with, just let us know 😄

@hypest
Copy link
Contributor

hypest commented Nov 12, 2018

if there is anything specific we can help with, just let us know

Thanks @jtreanor . I'd say that if there are any spare cycles you can donate, it's be awesome if you could try out what we said on Slack a few days back and is what @loremattei mentioned above: to have a way to rely on binary integration but still have source level integration for debug builds.

@hypest
Copy link
Contributor

hypest commented Nov 30, 2018

I think we have completed this task on both platforms so, closing as "done".

@hypest hypest closed this as completed Nov 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants