-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Move out documentation website into a separate repo #8582
Conversation
Personally I like the current workflow and think it is simple and elegant, as it keeps everything together, and the way you can update the docs now, or bundle doc changes for features which will come into the next release is working very nicely from my point of view, but then again I don't deal with releases which sounds like where the pain is coming from.
|
Yeah, it has been a huge pain, and also a source of significant release delays. It's the reason why pretty much half of the history for the docs folder looks like this:
I believe issues related to API docs will stay here, while issues related to the website itself (like a menu not working) can be opened there. We can transfer issues freely between the two — GitHub now makes it easy. Most of the docs fixes will go to this repo because they will be targeting JSDoc comments, and close corresponding issues when the PR is merged.
That's true, although with the split, retaining examples in this repo also means it's more difficult to update and add examples between releases, so given these two use cases, I chose the latter as more important and also simpler to implement (since otherwise we'd have to decouple example content from the website architecture like Batfish templates, while keeping code & metadata together). Would you prefer adding/updating examples only on releases but keeping them together with the code? (For important fixes, we could always cherry-pick into a release branch and then update the pin in the docs).
Sure.
I tried migrating the history to the new repo at first (with
Thanks for the thorough feedback @andrewharvey! This architecture isn't set in stone yet, so we'll be very happy to hear your suggestions and make the new system work well for everyone involved. |
Yeah I saw that, so I'll jump onboard to the changes on the basis that this will ease issues for doing releases.
Oh right, i didn't realise you can transfer issues. That should make this less off a mess.
No I think it's better to just move examples across to the new repo, if the example depends on features from the next release, the PR can be marked as such, and then merged once the release happens, all other PRs that don't depend on the next release can be merged whenever.
Okay, fair enough. Whatever works best. |
From looking at the current setup of the examples pages - there is an html page with the source and a js page with the metadata. Keeping the examples in this repo would either split the examples source and meta data pages across two repos, or require maintaining both here at the risk of keeping the batfish and other dependencies. @mourner I think you've already mentioned this in our previous discussion. Either way - contributing an example in this repo would not directly publish updated docs. Given that link is being broken now, having the examples in the docs repo with direct publish availability seems like a worthy reason to move. Separating the examples is harder for local debugging and testing too, but it should be fairly easy for developers to work on the docs repo and pin the gl-js submodule to their branch for local testing. This type of workflow has been common on the team when porting features to the mapbox-gl-native repo. |
That's true, I'll often have some local changes to gl-js and then start-docs to test out the example with those local changes. Is it possible to have that gl-js submodule from docs point to a local gl-js repo to support that use case? |
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.
@mourner this looks ok to me -- not sure if you want to tag anyone else who's familiar with non-docs files to take a look and confirm all non-docs workflows are not affected.
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.
🎉
Should we go through and move over issues that are related to the docs website/workflow that are currently here to mapbox-gl-js-docs? |
Yes @andrewharvey! I'm going to take the lead on this. |
@mourner I think moving controls to separate repo also worth consideration 😉 |
This PR removes everything related to the GL JS docs website in favor of having an independent mapbox-gl-js-docs repo that pulls
mapbox-gl-js
in as a submodule.The rationale behind this is simplifying an incredibly error-prone documentation maintenance process that bit us during releases many times — currently we to manage docs through complicated two-way branch merges with frequent conflicts (
master
branches intorelease-<name>
which gets merged intopublisher-production
which gets PRs on its own and then gets merged back tomaster
), with a lot of code and heavy dependencies entangled together.With the new structure, we will have a simple one-way relation —
mapbox-gl-js-docs
includesmapbox-gl-js
as a submodule for building API documentation from its source but is otherwise completely independent, and updating the website to a new release is just a matter of updating the submodule pin. Additionally, website improvements can happen independently, have their own PRs/issues, CI, processes and conventions, which will simplify GL JS docs maintenance work for our docs team significantly. Maintaining dependencies in GL JS will also get much easier with half of theyarn.lock
(7k lines) gone.One consequence of the change is that contributions to our examples should now target the new repository. This is a small price to pay for all the benefits the split does. Initially I tried to keep examples in the main repo, but it turned out that technically it would be much easier to have them in the new repo. Portions of the style spec docs will have to be maintained there as well.
Do not merge until
mapbox-gl-js-docs
goes live on docs.mapbox.com.cc @andrewharvey