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

Correct the docs manifest #12411

Merged
merged 9 commits into from
Nov 29, 2018
Merged

Correct the docs manifest #12411

merged 9 commits into from
Nov 29, 2018

Conversation

dd32
Copy link
Member

@dd32 dd32 commented Nov 29, 2018

Description

As mentioned in #meta following #11817 the handbook import process failed to pick up the changed files, and resulted in a number of orphaned items.

The cause of this is several fold:

  1. The manifest file in Gutenberg was changed to use a full path as the parent field, where the importer only supports a singular slug (ie. developers not designers-developers/developers)
  2. The import process on the WordPress.org side never deletes pages, so a number of old pages were still hanging around. (These have since been marked as drafts)
  3. The manifest file included some incorrect slug fields for root-level pages
  4. The toc.json file which was used to generate the root-manifest.json didn't have the contributors or users handbook added to it, and as a result root-manifest.json was never updated either (I couldn't find a tool which does this automatically, See 700e159 for the script I borrowed from Reorganise documentation #11817 and modified).

Known Bugs

(Some of these are not bugs or should be individual issues/bugs/PRs, I'm noting it here though)

  1. The Users handbook wasn't added to the TOC as nothing exists within it. The Gutenberg handbook landing page links to it though. Once content is added it'll need to be added to toc.json and root-manifest.json.
  2. The Contributors handbook index page has no text, and so is now blank.
  3. The importer on the WordPress.org side has a few bugs, some of which requires it to run twice to actually import everything correctly when pages are moved between children.
  4. The handbook plugin on WordPress.org only handles 1-level-deep, so the entire developers & designers is expanded and makes it hard to follow hierarchy in the menu of https://wordpress.org/gutenberg/handbook/designers-developers/
  5. https://wordpress.org/gutenberg/handbook/designers-developers/key-concepts/#more-on-blocks should link to the other pages
  6. Until this is merged (and the page deleted), the import of the existing gutenberg manifest file will create https://wordpress.org/gutenberg/handbook/readme-2/ - that duplicate page will be manually removed by me afterwards.
  7. As mentioned in no 2 above, a number of old pages have been marked as drafts on the WordPress.org side, these should be deleted after ensuring that they're intended on being removed. If they're not, and a future page is created using the same slug it'll result in a $slug-2 url, etc.

How has this been tested?

It was used to import the docs onto https://wordpress.org/gutenberg/handbook/

@jasmussen jasmussen requested review from chrisvanpatten and a team November 29, 2018 10:12
@jasmussen jasmussen added the [Type] Developer Documentation Documentation for developers label Nov 29, 2018
@chrisvanpatten
Copy link
Member

Oh @dd32 you are my hero. I’ll review this today!

Copy link
Member

@chrisvanpatten chrisvanpatten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks great to me. I have some clarifying questions but this should definitely land as-is — you know this infrastructure better than me! ❤️

@chrisvanpatten
Copy link
Member

This all makes sense and obviously based on the live handbook it works really well!

It's not clear yet if we will end up adding the users handbook into GitHub so that might end up being a non-issue and I'll remove it from the README.

I'm happy to help with the cleanup on .org but I don't have access there right now. In the future, if I expect a docs change to cause problems on import (moving an item between children, renaming something, etc.) should I just mention you, or ask for access myself?

@chrisvanpatten
Copy link
Member

Restarted Travis… it's an e2e failure so totally unrelated to these changes.

@youknowriad youknowriad merged commit c446d06 into WordPress:master Nov 29, 2018
daniloercoli added a commit that referenced this pull request Nov 30, 2018
…rnmobile/danilo-try-to-fix-undo-redo

* 'master' of https://github.com/WordPress/gutenberg:
  Autocompleters: Consider block category (#12287)
  Only init TinyMCE once per instance (#12386)
  RichText: convert HTML formatting whitespace to spaces (#12166)
  Notices: Remove "files" block in package.json (#12438)
  Edit Post: Avoid rendering AdminNotices compatibility component (#12444)
  Correct the docs manifest (#12411)
daniloercoli added a commit that referenced this pull request Nov 30, 2018
…HEAD

* 'master' of https://github.com/WordPress/gutenberg:
  [RNmobile] Fix problems with undo/redo on Android (#12417)
  Add registry param to withDispatch component (#11851)
  Autocompleters: Consider block category (#12287)
  Only init TinyMCE once per instance (#12386)
  RichText: convert HTML formatting whitespace to spaces (#12166)
  Notices: Remove "files" block in package.json (#12438)
  Edit Post: Avoid rendering AdminNotices compatibility component (#12444)
  Correct the docs manifest (#12411)
ntwb pushed a commit that referenced this pull request Dec 4, 2018
## Description
Following on from #12411 and #11817 it was noticed that some pages were skipped, as they weren't included in the `toc.json` file previously.

This PR includes several specific fixes which are all interconnected:
1. Adds the Internationalization page along with the Block Tutorial to the handbook hierarchy
1. An additional landing page for the Tutorials index was added
1. `Components` was added to the developers handbook alongside `Packages` and `Data Package Reference` pages.
1. In order to handle the above move, the duplicative declarations of `Packages`, `Data Package Reference` and `Components` were removed from `docs/tool/manifest.js` to prevent them adding as top-level-items. (Are these intended to be top-level-handbook-pages or deep within the developers handbook as the TOC seems to suggest?)

I also took the opportunity to convert `generate.php` from the previous PR into a JS command that allows for `docs/root-manifest.json` to be removed entirely and dynamically generated from `docs/toc.json` so it only needs updating in a single location.  That's the `getRootManifest()` and `generateRootManifestFromTOCItems()` functions which are rather messy, but work (I'm sure someone else could clean that up significantly).

## How has this been tested?
The only testing done so far is the manual review of the final `docs/manifest.json`.
@youknowriad youknowriad added this to the 4.7 milestone Dec 4, 2018
@mtias mtias modified the milestones: 4.7, Documentation & Handbook Dec 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants