From 84631f890a50d6ab0c08e569574151d732ad3943 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Fri, 7 Jul 2017 17:24:43 +0200 Subject: [PATCH 01/55] Documentation: Try a new custom documentation tool to rule them all --- docs-tool/.gitignore | 21 ++++ docs-tool/bin/build.js | 15 +++ .../bin/helpers/extend-webpack-config.js | 33 ++++++ docs-tool/bin/start.js | 15 +++ docs-tool/package.json | 20 ++++ docs-tool/public/favicon.ico | Bin 0 -> 24838 bytes docs-tool/public/index.html | 42 +++++++ docs-tool/public/manifest.json | 15 +++ docs-tool/src/App.js | 37 ++++++ docs-tool/src/Sidebar.js | 46 ++++++++ docs-tool/src/config/index.js | 36 ++++++ docs-tool/src/index.js | 13 +++ docs-tool/src/registerServiceWorker.js | 108 ++++++++++++++++++ docs-tool/src/styles/main.css | 16 +++ docs/blocks-basic.md | 37 ++++++ docs/blocks-editable.md | 1 + docs/blocks-stylesheet.md | 65 +++++++++++ docs/blocks.md | 1 + docs/readme.md | 13 +++ docs/stories/index.js | 47 ++++++++ 20 files changed, 581 insertions(+) create mode 100644 docs-tool/.gitignore create mode 100644 docs-tool/bin/build.js create mode 100644 docs-tool/bin/helpers/extend-webpack-config.js create mode 100644 docs-tool/bin/start.js create mode 100644 docs-tool/package.json create mode 100644 docs-tool/public/favicon.ico create mode 100644 docs-tool/public/index.html create mode 100644 docs-tool/public/manifest.json create mode 100644 docs-tool/src/App.js create mode 100644 docs-tool/src/Sidebar.js create mode 100644 docs-tool/src/config/index.js create mode 100644 docs-tool/src/index.js create mode 100644 docs-tool/src/registerServiceWorker.js create mode 100644 docs-tool/src/styles/main.css create mode 100644 docs/blocks-basic.md create mode 100644 docs/blocks-editable.md create mode 100644 docs/blocks-stylesheet.md create mode 100644 docs/blocks.md create mode 100644 docs/readme.md create mode 100644 docs/stories/index.js diff --git a/docs-tool/.gitignore b/docs-tool/.gitignore new file mode 100644 index 0000000000000..d30f40ef4422f --- /dev/null +++ b/docs-tool/.gitignore @@ -0,0 +1,21 @@ +# See https://help.github.com/ignore-files/ for more about ignoring files. + +# dependencies +/node_modules + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/docs-tool/bin/build.js b/docs-tool/bin/build.js new file mode 100644 index 0000000000000..242187b662d79 --- /dev/null +++ b/docs-tool/bin/build.js @@ -0,0 +1,15 @@ +#!/usr/bin/env node +const path = require( 'path' ); +const extendsConfig = require( './helpers/extend-webpack-config' ); +const usersCwd = process.cwd(); + +// webpack.config.prod.js checks this. +process.env.NODE_ENV = 'production'; + +// Load and edit the create-react-app config. +process.chdir( path.resolve( __dirname, '../' ) ); +const webpackConfig = require( 'react-scripts/config/webpack.config.prod' ); +extendsConfig( webpackConfig, usersCwd ); + +// Run the build. +require( 'react-scripts/scripts/build' ); diff --git a/docs-tool/bin/helpers/extend-webpack-config.js b/docs-tool/bin/helpers/extend-webpack-config.js new file mode 100644 index 0000000000000..e590903b864c0 --- /dev/null +++ b/docs-tool/bin/helpers/extend-webpack-config.js @@ -0,0 +1,33 @@ +const path = require( 'path' ); + +module.exports = function( webpackConfig, usersCwd ) { + // Adding "glutenberg" alias + webpackConfig.resolve.alias.glutenberg = path.resolve( __dirname, '../../src/config/' ); + + // Loading the config folder + webpackConfig.resolve.alias.config = path.resolve( usersCwd, process.argv[ 2 ] ); + webpackConfig.resolve.modules = webpackConfig.resolve.modules.concat( [ webpackConfig.resolve.alias.config ] ); + + // Using the user's node_modules + const usersNodeModules = path.resolve( usersCwd, 'node_modules' ); + webpackConfig.resolve.modules = webpackConfig.resolve.modules.concat( [ usersNodeModules ] ); + + // Deleting CRA scoping + webpackConfig.resolve.plugins = []; + webpackConfig.module.rules.forEach( ( rule ) => { + if ( rule.include ) { + rule.include = [ rule.include, webpackConfig.resolve.alias.config ]; + } + } ); + + // Adding the markdown loader and exclude if from the file loader + webpackConfig.module.rules.forEach( rule => { + if ( rule.loader === require.resolve('file-loader') ) { + rule.exclude.push( /\.md/ ); + } + } ); + webpackConfig.module.rules.push( { + test: /\.md/, + use: require.resolve( 'raw-loader' ), + } ); +} diff --git a/docs-tool/bin/start.js b/docs-tool/bin/start.js new file mode 100644 index 0000000000000..7c6774b946e10 --- /dev/null +++ b/docs-tool/bin/start.js @@ -0,0 +1,15 @@ +#!/usr/bin/env node +const path = require( 'path' ); +const extendsConfig = require( './helpers/extend-webpack-config' ); +const usersCwd = process.cwd(); + +// webpack.config.prod.js checks this. +process.env.NODE_ENV = 'development'; + +// Load and edit the create-react-app config. +process.chdir( path.resolve( __dirname, '../' ) ); +const webpackConfig = require( 'react-scripts/config/webpack.config.dev' ); +extendsConfig( webpackConfig, usersCwd ); + +// Run the build. +require( 'react-scripts/scripts/start' ); diff --git a/docs-tool/package.json b/docs-tool/package.json new file mode 100644 index 0000000000000..0f7d2090bffbf --- /dev/null +++ b/docs-tool/package.json @@ -0,0 +1,20 @@ +{ + "name": "docs-tool", + "version": "0.1.0", + "private": true, + "dependencies": { + "prismjs": "^1.6.0", + "react": "^15.6.1", + "react-dom": "^15.6.1", + "react-markdown": "^2.5.0", + "react-router-dom": "^4.1.1", + "react-scripts": "1.0.10" + }, + "scripts": { + "start": "react-scripts start", + "build": "react-scripts build", + "test": "react-scripts test --env=jsdom", + "eject": "react-scripts eject" + }, + "devDependencies": {} +} diff --git a/docs-tool/public/favicon.ico b/docs-tool/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..5c125de5d897c1ff5692a656485b3216123dcd89 GIT binary patch literal 24838 zcmeI4X^>UL6@VY56)S&I{`6Nu0RscWCdj@GJHx(%?6_-;yKy1n;EEf9f}pr1CW5HA zYt$%U#C=}?jWH&%G@BaHBxsWAoUb3}&6%Ei@4Ii_JRa1`RQ23*yU)_wJ$?H0>6gj0 z${d_I^w5kvTW3xYEc?FvyP3>p$!py@`@T`|dVepIsjbbvR}af%KKy7YuQ%SDC^zmNWPYR^7avI5P-@dKev}UZ^aD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|4|u^7-pD|f z&OPc->UKu)=iHgIpysp;Lsbyj}GJWoBkufOA={CRTUjr%af zc5pUH9{pg?M5%+)oN`q9yBbBt@+3xHV)qGm8b)Cp-w7~CwEhtBUk0rbjrqM zTb|tQ3-5-pw^cul`T+X&s?O;?V(FD!(Q9Qg@(LTCNz{0-vBM^SX5lti3|GpxFn4;Ax6pGc~t)R!Bo${lYH(* z!F&5X*?S&}YoDCyzwv1H+XI(+rL`;RN9}iLxlfr-r&vGG8OQa@=>+a)+Ij)sd_{wu z1Am(+3-RFr4&N8N6+hqo19S#;SA1-hG>07p3}&*j4CR+rqdV)^6n; z_vFr!(a%-=#=kb{pYmNL@6|DWkw~%E2V2jYl*e1}c{e$fib?(O+hs}eoBLRo&9(;J}YV}0Mi;LZAe{U$(s= zT<-IaV$Z+q-P!~3{HxN>Kbw30jXzM&I(S<6Ksx^}HvU2Vntb!etSsm0>)j}Me^+L5{2yz--)?W`Q?az z!WLG4UNP}+#C+NKH+ZG-Q=E>IPp%LuKLx$$8NAOGr(#~P>!EA zDYlpXDR=xM?Xv5(-qp74Cw3LzBeASHSBY`OezkbOyjP!G%WSymju_C$VBl--z + + + + + + + + + + + + React App + + + +
+ + + diff --git a/docs-tool/public/manifest.json b/docs-tool/public/manifest.json new file mode 100644 index 0000000000000..be607e4177191 --- /dev/null +++ b/docs-tool/public/manifest.json @@ -0,0 +1,15 @@ +{ + "short_name": "React App", + "name": "Create React App Sample", + "icons": [ + { + "src": "favicon.ico", + "sizes": "192x192", + "type": "image/png" + } + ], + "start_url": "./index.html", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/docs-tool/src/App.js b/docs-tool/src/App.js new file mode 100644 index 0000000000000..ad940991e32e2 --- /dev/null +++ b/docs-tool/src/App.js @@ -0,0 +1,37 @@ +import React, { Component } from 'react'; +import { BrowserRouter, Route } from 'react-router-dom'; +import Prism from 'prismjs'; + +import { getStories } from 'glutenberg'; +import Sidebar from './Sidebar'; + +const createPage = ( Comp ) => class extends Component { + componentDidMount( prevProps ) { + Prism.highlightAll(); + } + + render() { + return ; + } +} + +const App = () => { + return ( + +
+
+
+ +
+ { getStories().map( ( { path, Component: Comp }, index ) => ( + + ) ) } +
+
+
+
+
+ ); +} + +export default App; diff --git a/docs-tool/src/Sidebar.js b/docs-tool/src/Sidebar.js new file mode 100644 index 0000000000000..71bb973d80695 --- /dev/null +++ b/docs-tool/src/Sidebar.js @@ -0,0 +1,46 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; + +import { getStoriesTree } from 'glutenberg'; + +function MenuItem( { item } ) { + return ( +
  • + { ! item.children.length && { item.title } } + { !! item.children.length && ( +
    + + { item.title } +
    + ) } + { !! item.children.length && ( +
      + { item.children.map( ( story, index) => ( + + ) ) } +
    + ) } +
  • + ); +} + +function Sidebar() { + return ( +
    +
    + +
    +
    + ); +} + +export default Sidebar; diff --git a/docs-tool/src/config/index.js b/docs-tool/src/config/index.js new file mode 100644 index 0000000000000..267eb16668c58 --- /dev/null +++ b/docs-tool/src/config/index.js @@ -0,0 +1,36 @@ +import React from 'react'; +import ReactMarkdown from 'react-markdown'; + +const stories = []; + +export function addStory( story ) { + const { name, parents = [], markdown } = story; + stories.push( { + path: '/' + parents.concat( name ).join( '/' ), + id: parents.concat( name ).join( '.' ), + parent: parents.join( '.' ), + Component: markdown ? () => : story.Component, + ...story, + } ); +} + +export function getStories() { + return stories; +} + +export function getStoriesTree() { + const buildTreeNode = ( story ) => { + return { + ...story, + children: buildTreeChildren( story.id ), + }; + } + + const buildTreeChildren = ( parentId = '' ) => { + return stories + .filter( ( story ) => story.parent === parentId ) + .map( buildTreeNode ); + }; + + return buildTreeChildren(); +} diff --git a/docs-tool/src/index.js b/docs-tool/src/index.js new file mode 100644 index 0000000000000..dd989ba8d12ae --- /dev/null +++ b/docs-tool/src/index.js @@ -0,0 +1,13 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; +import 'prismjs'; +import 'prismjs/themes/prism.css'; + +import 'config'; + +import App from './App'; +import registerServiceWorker from './registerServiceWorker'; +import './styles/main.css'; + +ReactDOM.render(, document.getElementById('root')); +registerServiceWorker(); diff --git a/docs-tool/src/registerServiceWorker.js b/docs-tool/src/registerServiceWorker.js new file mode 100644 index 0000000000000..4a3ccf02124e9 --- /dev/null +++ b/docs-tool/src/registerServiceWorker.js @@ -0,0 +1,108 @@ +// In production, we register a service worker to serve assets from local cache. + +// This lets the app load faster on subsequent visits in production, and gives +// it offline capabilities. However, it also means that developers (and users) +// will only see deployed updates on the "N+1" visit to a page, since previously +// cached resources are updated in the background. + +// To learn more about the benefits of this model, read https://goo.gl/KwvDNy. +// This link also includes instructions on opting out of this behavior. + +const isLocalhost = Boolean( + window.location.hostname === 'localhost' || + // [::1] is the IPv6 localhost address. + window.location.hostname === '[::1]' || + // 127.0.0.1/8 is considered localhost for IPv4. + window.location.hostname.match( + /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ + ) +); + +export default function register() { + if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { + // The URL constructor is available in all browsers that support SW. + const publicUrl = new URL(process.env.PUBLIC_URL, window.location); + if (publicUrl.origin !== window.location.origin) { + // Our service worker won't work if PUBLIC_URL is on a different origin + // from what our page is served on. This might happen if a CDN is used to + // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374 + return; + } + + window.addEventListener('load', () => { + const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; + + if (!isLocalhost) { + // Is not local host. Just register service worker + registerValidSW(swUrl); + } else { + // This is running on localhost. Lets check if a service worker still exists or not. + checkValidServiceWorker(swUrl); + } + }); + } +} + +function registerValidSW(swUrl) { + navigator.serviceWorker + .register(swUrl) + .then(registration => { + registration.onupdatefound = () => { + const installingWorker = registration.installing; + installingWorker.onstatechange = () => { + if (installingWorker.state === 'installed') { + if (navigator.serviceWorker.controller) { + // At this point, the old content will have been purged and + // the fresh content will have been added to the cache. + // It's the perfect time to display a "New content is + // available; please refresh." message in your web app. + console.log('New content is available; please refresh.'); + } else { + // At this point, everything has been precached. + // It's the perfect time to display a + // "Content is cached for offline use." message. + console.log('Content is cached for offline use.'); + } + } + }; + }; + }) + .catch(error => { + console.error('Error during service worker registration:', error); + }); +} + +function checkValidServiceWorker(swUrl) { + // Check if the service worker can be found. If it can't reload the page. + fetch(swUrl) + .then(response => { + // Ensure service worker exists, and that we really are getting a JS file. + if ( + response.status === 404 || + response.headers.get('content-type').indexOf('javascript') === -1 + ) { + // No service worker found. Probably a different app. Reload the page. + navigator.serviceWorker.ready.then(registration => { + registration.unregister().then(() => { + window.location.reload(); + }); + }); + } else { + // Service worker found. Proceed as normal. + registerValidSW(swUrl); + } + }) + .catch(() => { + console.log( + 'No internet connection found. App is running in offline mode.' + ); + }); +} + +export function unregister() { + if ('serviceWorker' in navigator) { + navigator.serviceWorker.ready.then(registration => { + registration.unregister(); + }); + } +} diff --git a/docs-tool/src/styles/main.css b/docs-tool/src/styles/main.css new file mode 100644 index 0000000000000..c94c58da76b1b --- /dev/null +++ b/docs-tool/src/styles/main.css @@ -0,0 +1,16 @@ +body { + margin: 0; +} + +#secondary { + padding: 4rem 0 0; +} + +code { + tab-size: 4; +} + +:not(pre) > code[class*="language-"], +pre[class*="language-"] { + background-color: #f7f7f7 !important; +} diff --git a/docs/blocks-basic.md b/docs/blocks-basic.md new file mode 100644 index 0000000000000..7dc13531811f2 --- /dev/null +++ b/docs/blocks-basic.md @@ -0,0 +1,37 @@ +# Writing your first block + +```js +// block.js (ES5) +var el = wp.element.createElement; +var blockStyle = { backgroundColor: '#900', color: '#fff', padding: '20px' }; + +wp.blocks.registerBlockType( 'mytheme/block', { + title: 'Hello World (step 1)', + icon: 'universal-access-alt', + category: 'layout', + edit: function() { + return el( 'p', { style: blockStyle }, 'Hello World' ); + }, + save: function() { + return el( 'p', { style: blockStyle }, 'Hello World' ); + }, +} ); +``` + +```js +// block.js (ESnext) +const { registerBlockType } = wp.blocks; +const blockStyle = { backgroundColor: '#900', color: '#fff', padding: '20px' }; + +registerBlockType( 'mytheme/block', { + title: 'Hello Block', + icon: 'universal-access-alt', + category: 'layout', + edit() { + return
    Hello World
    ; + }, + save() { + return
    Hello World
    ; + }, +} ); +``` diff --git a/docs/blocks-editable.md b/docs/blocks-editable.md new file mode 100644 index 0000000000000..6f078b090f685 --- /dev/null +++ b/docs/blocks-editable.md @@ -0,0 +1 @@ +# Editable block diff --git a/docs/blocks-stylesheet.md b/docs/blocks-stylesheet.md new file mode 100644 index 0000000000000..832c38cd53d30 --- /dev/null +++ b/docs/blocks-stylesheet.md @@ -0,0 +1,65 @@ +# Adding a stylesheet + +```js +// block.js (ES5) +var el = wp.element.createElement; + +wp.blocks.registerBlockType( 'mytheme/block', { + title: 'Hello World (step 2)', + icon: 'universal-access-alt', + category: 'layout', + edit: function( props ) { + return el( 'p', { className: props.className }, 'Hello World' ); + }, + save: function() { + return el( 'p', 'Hello World' ); + }, +} ); +``` + +```js +// block.js (ESnext) +const { registerBlockType } = wp.blocks; + +registerBlockType( 'mytheme/block', { + title: 'Hello Block', + icon: 'universal-access-alt', + category: 'layout', + edit( { className } ) { + return
    Hello World
    ; + }, + save() { + return
    Hello World
    ; + }, +} ); +``` + +```css +/* style.css */ + +/** + * Note that these styles are loaded *before* editor styles, so that + * editor-specific styles using the same selectors will take precedence. + */ +.wp-block-mytheme-block { + color: darkred; + background: #fcc; + border: 2px solid #c99; + padding: 20px; +} +``` + +```css +/* editor.css */ + +/** + * Note that these styles are loaded *after* common styles, so that + * editor-specific styles using the same selectors will take precedence. + */ +.wp-block-mytheme-block { + color: green; + background: #cfc; + border: 2px solid #9c9; + padding: 20px; +} +``` diff --git a/docs/blocks.md b/docs/blocks.md new file mode 100644 index 0000000000000..54e0a5ff9fea2 --- /dev/null +++ b/docs/blocks.md @@ -0,0 +1 @@ +# Blocks diff --git a/docs/readme.md b/docs/readme.md new file mode 100644 index 0000000000000..55afe27762232 --- /dev/null +++ b/docs/readme.md @@ -0,0 +1,13 @@ +# Introduction + +"Gutenberg" is the codename for the 2017 WordPress editor focus. The goal if this focus is to create a new post and page editing experience that makes it easy for anyone to create rich post layouts. This was the kickoff goal: + +> The editor will endeavour to create a new page and post building experience that makes writing rich posts effortless, and has “blocks” to make it easy what today might take shortcodes, custom HTML, or “mystery meat” embed discovery. + +Key take-aways from parsing that paragraph: + +- Authoring richly laid out posts is a key strength of WordPress. +- By embracing "the block", we can potentially unify multiple different interfaces into one. Instead of learning how to write shortcodes, custom HTML, or paste URLs to embed, you should do with just learning the block, and all the pieces should fall in place. +- "Mystery meat" refers to hidden features in software, features that you have to discover. WordPress already supports a large amount of blocks and 30+ embeds, so let's surface them. + +Gutenberg is being developed on [GitHub](https://github.com/WordPress/gutenberg), and you can try [an early beta version today from the plugin repository](https://wordpress.org/plugins/gutenberg/). Though keep in mind it's not fully functional, feature complete, or production ready. diff --git a/docs/stories/index.js b/docs/stories/index.js new file mode 100644 index 0000000000000..3dd5336f50481 --- /dev/null +++ b/docs/stories/index.js @@ -0,0 +1,47 @@ +import { addStory } from 'glutenberg'; + +import intro from '../readme.md'; +import faq from '../faq.md'; +import step1 from '../blocks-basic.md'; +import step2 from '../blocks-stylesheet.md'; +import step3 from '../blocks-editable.md'; + +addStory( { + name: 'intro', + title: 'Introduction', + path: '/', + markdown: intro, +} ); + +addStory( { + name: 'faq', + title: 'FAQ', + markdown: faq, +} ); + +addStory( { + name: 'blocks', + title: 'Creating Blocks', + markdown: '# Creating Blocks', +} ); + +addStory( { + parents: [ 'blocks' ], + name: 'step1', + title: 'Step 1', + markdown: step1, +} ); + +addStory( { + parents: [ 'blocks' ], + name: 'step2', + title: 'Step 2', + markdown: step2, +} ); + +addStory( { + parents: [ 'blocks' ], + name: 'step3', + title: 'Step 3', + markdown: step3, +} ); From 92b72c904adfe9dc497db48e2a52b91dcb93833c Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Sat, 8 Jul 2017 11:39:28 +0200 Subject: [PATCH 02/55] Documentation: Adding Previous/Next Page links --- docs-tool/package.json | 1 + docs-tool/src/App.js | 34 +++++++++++---------------- docs-tool/src/Page.js | 39 +++++++++++++++++++++++++++++++ docs-tool/src/Sidebar.js | 22 ++++++++++-------- docs-tool/src/config/index.js | 43 +++++++++++++++++++++++------------ 5 files changed, 94 insertions(+), 45 deletions(-) create mode 100644 docs-tool/src/Page.js diff --git a/docs-tool/package.json b/docs-tool/package.json index 0f7d2090bffbf..51507b6b6eeca 100644 --- a/docs-tool/package.json +++ b/docs-tool/package.json @@ -3,6 +3,7 @@ "version": "0.1.0", "private": true, "dependencies": { + "lodash": "^4.17.4", "prismjs": "^1.6.0", "react": "^15.6.1", "react-dom": "^15.6.1", diff --git a/docs-tool/src/App.js b/docs-tool/src/App.js index ad940991e32e2..ce072f92f099f 100644 --- a/docs-tool/src/App.js +++ b/docs-tool/src/App.js @@ -1,37 +1,29 @@ -import React, { Component } from 'react'; +import React from 'react'; import { BrowserRouter, Route } from 'react-router-dom'; -import Prism from 'prismjs'; import { getStories } from 'glutenberg'; import Sidebar from './Sidebar'; +import Page from './Page'; -const createPage = ( Comp ) => class extends Component { - componentDidMount( prevProps ) { - Prism.highlightAll(); - } - - render() { - return ; - } -} - -const App = () => { - return ( - +function App() { + return ( +
    -
    +
    - { getStories().map( ( { path, Component: Comp }, index ) => ( - + { getStories().map( ( story, index ) => ( + + } /> ) ) }
    -
    +
    -
    - ); +
    + ); } export default App; diff --git a/docs-tool/src/Page.js b/docs-tool/src/Page.js new file mode 100644 index 0000000000000..5fdf7b57e014b --- /dev/null +++ b/docs-tool/src/Page.js @@ -0,0 +1,39 @@ +import React, { Component } from 'react'; +import { Link } from 'react-router-dom'; +import Prism from 'prismjs'; + +import { getNextStory, getPreviousStory } from 'glutenberg'; + +class Page extends Component { + componentDidMount() { + Prism.highlightAll(); + } + + render() { + const { story } = this.props; + const nextStory = getNextStory( story.id ); + const previousStory = getPreviousStory( story.id ); + const Comp = story.Component; + + return ( +
    + + +
    + { !! previousStory && ( +

    + { '←' } { previousStory.title } +

    + ) } + { !! nextStory && ( +

    + { nextStory.title } { '→' } +

    + ) } +
    +
    + ); + } +} + +export default Page; diff --git a/docs-tool/src/Sidebar.js b/docs-tool/src/Sidebar.js index 71bb973d80695..eb8ee4b56d57e 100644 --- a/docs-tool/src/Sidebar.js +++ b/docs-tool/src/Sidebar.js @@ -1,21 +1,22 @@ import React from 'react'; import { Link } from 'react-router-dom'; -import { getStoriesTree } from 'glutenberg'; +import { getStories, getChildren } from 'glutenberg'; -function MenuItem( { item } ) { +function MenuItem( { item } ) { + const children = getChildren( item.id ); return (
  • - { ! item.children.length && { item.title } } - { !! item.children.length && ( + { ! children.length && { item.title } } + { !! children.length && (
    { item.title }
    ) } - { !! item.children.length && ( + { !! children.length && (
      - { item.children.map( ( story, index) => ( + { children.map( ( story, index ) => ( ) ) }
    @@ -32,9 +33,12 @@ function Sidebar() {

    Documentation

      - { getStoriesTree().map( ( story, index ) => ( - - ) ) } + { getStories() + .filter( ( story ) => ! story.parent ) + .map( ( story, index ) => ( + + ) ) + }
    diff --git a/docs-tool/src/config/index.js b/docs-tool/src/config/index.js index 267eb16668c58..95eb007751fd9 100644 --- a/docs-tool/src/config/index.js +++ b/docs-tool/src/config/index.js @@ -1,4 +1,5 @@ import React from 'react'; +import { find } from 'lodash'; import ReactMarkdown from 'react-markdown'; const stories = []; @@ -18,19 +19,31 @@ export function getStories() { return stories; } -export function getStoriesTree() { - const buildTreeNode = ( story ) => { - return { - ...story, - children: buildTreeChildren( story.id ), - }; - } - - const buildTreeChildren = ( parentId = '' ) => { - return stories - .filter( ( story ) => story.parent === parentId ) - .map( buildTreeNode ); - }; - - return buildTreeChildren(); +export function getStory( id ) { + return find( stories, ( story ) => story.id === id ); +} + +export function getChildren( id ) { + return stories.filter( ( story ) => story.parent === id ); +} + +export function getOrderedPageList( parentId = '' ) { + return getChildren( parentId ).reduce( ( memo, story ) => { + memo.push( story ); + return memo.concat( getOrderedPageList( story.id ) ); + }, [] ); +} + +export function getNextStory( id ) { + const orderedList = getOrderedPageList(); + const index = orderedList.indexOf( getStory( id ) ); + + return orderedList[ index + 1 ]; +} + +export function getPreviousStory( id ) { + const orderedList = getOrderedPageList(); + const index = orderedList.indexOf( getStory( id ) ); + + return orderedList[ index - 1 ]; } From 4079c80d58921638f1e137603237d9629f902e80 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Sat, 8 Jul 2017 15:03:42 +0200 Subject: [PATCH 03/55] Documentation: Parsing markdown blocks (code blocks) --- .../bin/helpers/extend-webpack-config.js | 4 +- docs-tool/package.json | 2 +- docs-tool/src/Page.js | 39 ------- docs-tool/src/{ => components}/App.js | 0 docs-tool/src/components/Page.js | 100 ++++++++++++++++++ docs-tool/src/{ => components}/Sidebar.js | 0 docs-tool/src/config/index.js | 5 +- docs-tool/src/index.js | 2 +- docs-tool/src/markdown/index.js | 51 +++++++++ docs/blocks-basic.md | 9 +- docs/blocks-stylesheet.md | 10 +- 11 files changed, 168 insertions(+), 54 deletions(-) delete mode 100644 docs-tool/src/Page.js rename docs-tool/src/{ => components}/App.js (100%) create mode 100644 docs-tool/src/components/Page.js rename docs-tool/src/{ => components}/Sidebar.js (100%) create mode 100644 docs-tool/src/markdown/index.js diff --git a/docs-tool/bin/helpers/extend-webpack-config.js b/docs-tool/bin/helpers/extend-webpack-config.js index e590903b864c0..d6a188b7f5317 100644 --- a/docs-tool/bin/helpers/extend-webpack-config.js +++ b/docs-tool/bin/helpers/extend-webpack-config.js @@ -22,7 +22,7 @@ module.exports = function( webpackConfig, usersCwd ) { // Adding the markdown loader and exclude if from the file loader webpackConfig.module.rules.forEach( rule => { - if ( rule.loader === require.resolve('file-loader') ) { + if ( rule.loader === require.resolve( 'file-loader' ) ) { rule.exclude.push( /\.md/ ); } } ); @@ -30,4 +30,4 @@ module.exports = function( webpackConfig, usersCwd ) { test: /\.md/, use: require.resolve( 'raw-loader' ), } ); -} +}; diff --git a/docs-tool/package.json b/docs-tool/package.json index 51507b6b6eeca..7496b36fb5fbd 100644 --- a/docs-tool/package.json +++ b/docs-tool/package.json @@ -4,10 +4,10 @@ "private": true, "dependencies": { "lodash": "^4.17.4", + "markdown-it": "^8.3.1", "prismjs": "^1.6.0", "react": "^15.6.1", "react-dom": "^15.6.1", - "react-markdown": "^2.5.0", "react-router-dom": "^4.1.1", "react-scripts": "1.0.10" }, diff --git a/docs-tool/src/Page.js b/docs-tool/src/Page.js deleted file mode 100644 index 5fdf7b57e014b..0000000000000 --- a/docs-tool/src/Page.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, { Component } from 'react'; -import { Link } from 'react-router-dom'; -import Prism from 'prismjs'; - -import { getNextStory, getPreviousStory } from 'glutenberg'; - -class Page extends Component { - componentDidMount() { - Prism.highlightAll(); - } - - render() { - const { story } = this.props; - const nextStory = getNextStory( story.id ); - const previousStory = getPreviousStory( story.id ); - const Comp = story.Component; - - return ( -
    - - -
    - { !! previousStory && ( -

    - { '←' } { previousStory.title } -

    - ) } - { !! nextStory && ( -

    - { nextStory.title } { '→' } -

    - ) } -
    -
    - ); - } -} - -export default Page; diff --git a/docs-tool/src/App.js b/docs-tool/src/components/App.js similarity index 100% rename from docs-tool/src/App.js rename to docs-tool/src/components/App.js diff --git a/docs-tool/src/components/Page.js b/docs-tool/src/components/Page.js new file mode 100644 index 0000000000000..03d2cb3174ce6 --- /dev/null +++ b/docs-tool/src/components/Page.js @@ -0,0 +1,100 @@ +import React, { Component } from 'react'; +import { Link } from 'react-router-dom'; +import Prism from 'prismjs'; + +import { getNextStory, getPreviousStory } from 'glutenberg'; +import markdown from '../markdown'; + +class Tabs extends Component { + constructor() { + super( ...arguments ); + this.state = { + activeTab: 0, + }; + } + + selectTab( index ) { + return () => { + this.setState( { activeTab: index } ); + }; + } + + componentDidUpdate() { + Prism.highlightAll(); + } + + render() { + const { tabs } = this.props; + const activeTab = tabs[ this.state.activeTab ]; + + return ( +
    +
    + { tabs.map( ( tab, index ) => ( + + ) ) } + { activeTab &&
    } +
    +
    + ); + } +} + +function MarkdownContent( { content } ) { + const blocks = markdown( content ); + + return ( +
    + { blocks.map( ( block, index ) => { + if ( block.type === 'raw' ) { + return
    ; + } + if ( block.type === 'codetabs' ) { + return ; + } + + return null; + } ) } +
    + ); +} + +class Page extends Component { + componentDidMount() { + Prism.highlightAll(); + } + + render() { + const { story } = this.props; + const nextStory = getNextStory( story.id ); + const previousStory = getPreviousStory( story.id ); + + return ( +
    + { !! story.Component && } + { !! story.markdown && } + +
    + { !! previousStory && ( +

    + { '←' } { previousStory.title } +

    + ) } + { !! nextStory && ( +

    + { nextStory.title } { '→' } +

    + ) } +
    +
    + ); + } +} + +export default Page; diff --git a/docs-tool/src/Sidebar.js b/docs-tool/src/components/Sidebar.js similarity index 100% rename from docs-tool/src/Sidebar.js rename to docs-tool/src/components/Sidebar.js diff --git a/docs-tool/src/config/index.js b/docs-tool/src/config/index.js index 95eb007751fd9..b0fb83f0abdf8 100644 --- a/docs-tool/src/config/index.js +++ b/docs-tool/src/config/index.js @@ -1,16 +1,13 @@ -import React from 'react'; import { find } from 'lodash'; -import ReactMarkdown from 'react-markdown'; const stories = []; export function addStory( story ) { - const { name, parents = [], markdown } = story; + const { name, parents = [] } = story; stories.push( { path: '/' + parents.concat( name ).join( '/' ), id: parents.concat( name ).join( '.' ), parent: parents.join( '.' ), - Component: markdown ? () => : story.Component, ...story, } ); } diff --git a/docs-tool/src/index.js b/docs-tool/src/index.js index dd989ba8d12ae..54f0eec1283b3 100644 --- a/docs-tool/src/index.js +++ b/docs-tool/src/index.js @@ -5,7 +5,7 @@ import 'prismjs/themes/prism.css'; import 'config'; -import App from './App'; +import App from './components/App'; import registerServiceWorker from './registerServiceWorker'; import './styles/main.css'; diff --git a/docs-tool/src/markdown/index.js b/docs-tool/src/markdown/index.js new file mode 100644 index 0000000000000..15dca0a201a60 --- /dev/null +++ b/docs-tool/src/markdown/index.js @@ -0,0 +1,51 @@ +import MarkdownIt from 'markdown-it'; +import { compact } from 'lodash'; + +const parser = new MarkdownIt(); + +const blockParsers = { + raw( content ) { + return { + type: 'raw', + content: parser.render( content ), + }; + }, + + codetabs( content ) { + const tabsRegex = /{%\s+([\w]+)\s+%}/gm; + const splittedTabs = compact( content.trim().split( tabsRegex ) ); + const tabs = []; + for ( let i = 0; i < splittedTabs.length; i = i + 2 ) { + tabs.push( { + name: splittedTabs[ i ], + content: parser.render( splittedTabs[ i + 1 ] ), + } ); + } + + return { + type: 'codetabs', + tabs, + }; + }, +}; + +function parse( markdown ) { + const blocksRegex = /({%\s+[\w]+\s+%}(?:.|\n|\r)*?{%\s+end\s+%})/gm; + const blockRegex = /{%\s+([\w]+)\s+%}((?:.|\n|\r)*?){%\s+end\s+%}/gm; + const blocks = markdown.split( blocksRegex ); + return blocks + .map( ( block ) => { + const matches = blockRegex.exec( block ); + if ( ! matches ) { + return { type: 'raw', content: block }; + } + return { type: matches[ 1 ], content: matches[ 2 ] }; + } ) + .map( ( block ) => { + const blockParser = blockParsers[ block.type ] || blockParsers.raw; + + return blockParser( block.content ); + } ); +} + +export default parse; diff --git a/docs/blocks-basic.md b/docs/blocks-basic.md index 7dc13531811f2..aa931b2f82284 100644 --- a/docs/blocks-basic.md +++ b/docs/blocks-basic.md @@ -1,7 +1,9 @@ # Writing your first block +{% codetabs %} +{% ES5 %} ```js -// block.js (ES5) +// block.js var el = wp.element.createElement; var blockStyle = { backgroundColor: '#900', color: '#fff', padding: '20px' }; @@ -17,9 +19,9 @@ wp.blocks.registerBlockType( 'mytheme/block', { }, } ); ``` - +{% ESnext %} ```js -// block.js (ESnext) +// block.js const { registerBlockType } = wp.blocks; const blockStyle = { backgroundColor: '#900', color: '#fff', padding: '20px' }; @@ -35,3 +37,4 @@ registerBlockType( 'mytheme/block', { }, } ); ``` +{% end %} diff --git a/docs/blocks-stylesheet.md b/docs/blocks-stylesheet.md index 832c38cd53d30..3d2a9b0aa618b 100644 --- a/docs/blocks-stylesheet.md +++ b/docs/blocks-stylesheet.md @@ -1,7 +1,9 @@ # Adding a stylesheet +{% codetabs %} +{% ES5 %} ```js -// block.js (ES5) +// block.js var el = wp.element.createElement; wp.blocks.registerBlockType( 'mytheme/block', { @@ -16,9 +18,9 @@ wp.blocks.registerBlockType( 'mytheme/block', { }, } ); ``` - +{% ESnext %} ```js -// block.js (ESnext) +// block.js const { registerBlockType } = wp.blocks; registerBlockType( 'mytheme/block', { @@ -33,7 +35,7 @@ registerBlockType( 'mytheme/block', { }, } ); ``` - +{% end %} ```css /* style.css */ From 05ffe5da75f74bc3b74712ae0c3119f3f1183580 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Sat, 8 Jul 2017 15:25:48 +0200 Subject: [PATCH 04/55] Documentation: Fix the doc tool title and metadata --- docs-tool/public/favicon.ico | Bin 24838 -> 0 bytes docs-tool/public/index.html | 3 +-- docs-tool/public/manifest.json | 11 ++--------- 3 files changed, 3 insertions(+), 11 deletions(-) delete mode 100644 docs-tool/public/favicon.ico diff --git a/docs-tool/public/favicon.ico b/docs-tool/public/favicon.ico deleted file mode 100644 index 5c125de5d897c1ff5692a656485b3216123dcd89..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24838 zcmeI4X^>UL6@VY56)S&I{`6Nu0RscWCdj@GJHx(%?6_-;yKy1n;EEf9f}pr1CW5HA zYt$%U#C=}?jWH&%G@BaHBxsWAoUb3}&6%Ei@4Ii_JRa1`RQ23*yU)_wJ$?H0>6gj0 z${d_I^w5kvTW3xYEc?FvyP3>p$!py@`@T`|dVepIsjbbvR}af%KKy7YuQ%SDC^zmNWPYR^7avI5P-@dKev}UZ^aDAOyci9Nn zwR4qEz~tSvrp|#ACvWzo9`3B;`}^{t18dxaH;?xT7#hmJiKAaI;|O=$yxzXNOHGw~ z^!5pE^SW`av%t_$22LFPsM^l%=PSp!3r`>9w%s+^ZQYnnTQ*Ggd9-1~kj_o$YdW@b ztCkJ(ZGYjusqV5L4{^)R9Gt@gzU1t|?xhE&c^q(|(R#oa*}Sj5c({A$mhrB8*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