-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Plan for merging in the native mobile (React Native) app #11491
Comments
I was wondering if we could speed it up by trying to integrate a scaffolded RN project into Gutenberg and then only repeat steps for Gutenberg mobile. To do so you would need to do the following git clone git@github.com:WordPress/gutenberg.git
cd gutenberg
npm install -g react-native-cli
react-native init mobile and try to set this project as a local private npm package controlled by Lerna. |
Thanks @gziolo . BTW, that's what the current mobile repo and app is structured on. Besides, that scaffolded project will have zero integration with Gutenberg so, not sure what to add to it next to try the integration. That said,
I have zero experience with Lerna so, can you expand what that will give us? Maybe we can do it directly to a a subtree'd mobile repo? |
Opened #11533 with a proof of concept, I left my comments there. |
Sounds like a very sane plan 👍 I think preparation could have a few more steps though to make the merge process a little bit easier. We could start adopting gutenberg coding guidelines first, meaning:
We could also switch to using the gutenberg store in |
Some things I did in #11533:
Something I could do:
Things we have to do later:
|
Is that a hard requirement on Gutenberg-web's side? Like, does the pipeline break if Flow is enabled on the mobile code? |
I don't know if it breaks, but it would be nice to drop it for consistency. |
Ok, cool.
In principal yes and makes sense. In practice, as the mobile side team still tries to gain experience in the JS/RN and the ecosystem and RN projects seem to favor Flow and even Typescript, I'd prefer it if we try and keep it in for now, especially if it doesn't break anything. |
👋 @gziolo . Yes, there is still the need to remove the chore of having 2 PRs opened for most of the work on mobile so, we should at least try to implement Phase A and B from the proposal on this ticket. My impression is that we still need feedback from the web side of things on this plan. The attempt to dive directly to fully-merged projects was interesting but not usable for assessing Phase A and Phase B and this ticket overall. So, the status of this ticket is: needs feedback from the web teams. Let's keep the ticket open for that reason. To help make it more specific and hopefully more actionable, the proposal here can be simplified to: let's merge the repos but not the projects just yet and please, provide feedback on the steps on the ticket or share other proposals on how to accomplish that. |
It has happened already 🎉 If there’s anything left, let’s file individual more targeted issues. Great team work 👏 |
For some time now, the native mobile project has its own life in https://github.com/wordpress-mobile/gutenberg-mobile while still using the main Gutenberg code as a subproject (git submodule at the time of writing).
Rather recently, we had a basic integration back into the main Gutenberg repo by having the native mobile tests running as part of the main Travis jobs (#9883). Unfortunately, that effort drifted, become unmaintained and was forced to get reverted #11318.
The current state of affairs still creates extra effort to both sides, native mobile and web, to keep things moving forward but also in sync. It would be awesome if we pick up the integration again.
Let's lay a new plan.
Statement of the current problem
Currently, to develop a feature on the native mobile app, one needs to open a PR on the web repo with the necessary changes, a PR on the mobile side make sure the git submodule references are kept up to date as the PRs progress and then juggle merging them close in time. Sometimes, it's not even clear which side to merge first. In every case, after merging, PRs have to get updated to point to the ref in
master
s or new PRs need to open to do that part.Proposed solution
Let's merge the two codebases and have to open single PRs.
Ideally, we'd like the teams to be able to be productive while the plan is executed. I'm thinking, a step-by-step plan that also allows some time to assess viability would be great.
Here's what I currently have in mind. Please, add your thoughts and suggestions so we can cross-check this can be made work for everyone:
Phase A (preparation step):
gutenberg
submodule itself), either by merging their code into the mobile repo (git subtree
or justgit add
ing their code) or by transforming them into simple npm package deps.gutenberg
submodule which will get replaced in the next phase. While at this stage, the repo is still usable and devs can work as normal.Phase B (repo merge):
git subtree
the mobile repo into that.gutenberg
submodule. Make sure mobile pipeline can use web's code directly to have hot-reloading enabled and working for fast turnaround times while developing3b. Expand the integration tests so native mobile ones can run locally too
Phase C (deep integration):
yarn
in favor ofnpm
for the mobile build pipelinepackage.json
s to the extend the mobile app can be build from the root of the repoPhase D (clients)
Feedback request
What do you think? Anything missing? Anything going down in the wrong direction? Any adjustments to make to the plan or the steps? Any thoughts on having the native mobile code as a npm package? How would that work? Any different plans?
As it stands, Phases C, D are the most "hazy" at the moment and would like to ask for help and ideas about expanding them.
Pinging some people here in particular to have their thoughts early on: @mtias , @youknowriad , @gziolo, @koke and CC @Tug to keep in the loop early on too.
The text was updated successfully, but these errors were encountered: