From c69574aa284b96ee2683f5518a5cc7424d4245fa Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Thu, 25 Apr 2019 15:11:38 -0400 Subject: [PATCH] Block Editor: Docs: Add DocBlock `see` references to component READMEs --- packages/block-editor/README.md | 56 ++++++++++++++----- .../src/components/autocomplete/index.js | 3 + .../block-vertical-alignment-toolbar/index.js | 3 + .../components/button-block-appender/index.js | 7 ++- .../src/components/inner-blocks/index.js | 3 + .../components/inspector-controls/index.js | 3 + .../src/components/media-placeholder/index.js | 3 + .../src/components/media-upload/check.js | 3 + .../src/components/media-upload/index.js | 4 +- .../src/components/observe-typing/index.js | 3 + .../src/components/plain-text/index.js | 3 + .../src/components/rich-text/index.js | 3 + .../src/components/url-input/button.js | 3 + .../src/components/url-input/index.js | 3 + .../src/components/url-popover/index.js | 3 + 15 files changed, 87 insertions(+), 16 deletions(-) diff --git a/packages/block-editor/README.md b/packages/block-editor/README.md index ff189e70ba88a..d5d432fa94482 100644 --- a/packages/block-editor/README.md +++ b/packages/block-editor/README.md @@ -74,7 +74,9 @@ Undocumented declaration. # **Autocomplete** -Undocumented declaration. +_Related_ + +- # **BlockAlignmentToolbar** @@ -138,11 +140,15 @@ Undocumented declaration. # **BlockVerticalAlignmentToolbar** -Undocumented declaration. +_Related_ + +- # **ButtonBlockerAppender** -Undocumented declaration. +_Related_ + +- # **ColorPalette** @@ -261,7 +267,9 @@ _Returns_ # **InnerBlocks** -Undocumented declaration. +_Related_ + +- # **Inserter** @@ -273,19 +281,27 @@ Undocumented declaration. # **InspectorControls** -Undocumented declaration. +_Related_ + +- # **MediaPlaceholder** -Undocumented declaration. +_Related_ + +- # **MediaUpload** -Undocumented declaration. +_Related_ + +- # **MediaUploadCheck** -Undocumented declaration. +_Related_ + +- # **MultiBlocksSwitcher** @@ -301,7 +317,9 @@ Undocumented declaration. # **ObserveTyping** -Undocumented declaration. +_Related_ + +- # **PanelColorSettings** @@ -309,7 +327,9 @@ Undocumented declaration. # **PlainText** -Undocumented declaration. +_Related_ + +- # **PreserveScrollInReorder** @@ -317,7 +337,9 @@ Undocumented declaration. # **RichText** -Undocumented declaration. +_Related_ + +- # **RichTextShortcut** @@ -354,15 +376,21 @@ Undocumented declaration. # **URLInput** -Undocumented declaration. +_Related_ + +- # **URLInputButton** -Undocumented declaration. +_Related_ + +- # **URLPopover** -Undocumented declaration. +_Related_ + +- # **Warning** diff --git a/packages/block-editor/src/components/autocomplete/index.js b/packages/block-editor/src/components/autocomplete/index.js index 419ae8a8af812..4e6e9475d2617 100644 --- a/packages/block-editor/src/components/autocomplete/index.js +++ b/packages/block-editor/src/components/autocomplete/index.js @@ -114,6 +114,9 @@ export function withFilteredAutocompleters( Autocomplete ) { }; } +/** + * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/autocomplete/README.md + */ export default compose( [ withBlockEditContext( ( { name } ) => { return { diff --git a/packages/block-editor/src/components/block-vertical-alignment-toolbar/index.js b/packages/block-editor/src/components/block-vertical-alignment-toolbar/index.js index f75f324b52e5d..e7d0014cdecbc 100644 --- a/packages/block-editor/src/components/block-vertical-alignment-toolbar/index.js +++ b/packages/block-editor/src/components/block-vertical-alignment-toolbar/index.js @@ -57,6 +57,9 @@ export function BlockVerticalAlignmentToolbar( { isCollapsed, value, onChange, c ); } +/** + * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/block-vertical-alignment-toolbar/README.md + */ export default compose( withBlockEditContext( ( { clientId } ) => { return { diff --git a/packages/block-editor/src/components/button-block-appender/index.js b/packages/block-editor/src/components/button-block-appender/index.js index 8e56596d1827f..1d0ee924bf153 100644 --- a/packages/block-editor/src/components/button-block-appender/index.js +++ b/packages/block-editor/src/components/button-block-appender/index.js @@ -14,7 +14,7 @@ import { __ } from '@wordpress/i18n'; */ import Inserter from '../inserter'; -export default function ButtonBlockAppender( { rootClientId, className } ) { +function ButtonBlockAppender( { rootClientId, className } ) { return ( ); } + +/** + * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/button-block-appender/README.md + */ +export default ButtonBlockAppender; diff --git a/packages/block-editor/src/components/inner-blocks/index.js b/packages/block-editor/src/components/inner-blocks/index.js index 3ee0947fd5081..2a69e5305fc3f 100644 --- a/packages/block-editor/src/components/inner-blocks/index.js +++ b/packages/block-editor/src/components/inner-blocks/index.js @@ -177,4 +177,7 @@ InnerBlocks.Content = withBlockContentContext( ( { BlockContent } ) => ); +/** + * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/inner-blocks/README.md + */ export default InnerBlocks; diff --git a/packages/block-editor/src/components/inspector-controls/index.js b/packages/block-editor/src/components/inspector-controls/index.js index e808e987adbdc..b97df2f8d245e 100644 --- a/packages/block-editor/src/components/inspector-controls/index.js +++ b/packages/block-editor/src/components/inspector-controls/index.js @@ -14,4 +14,7 @@ const InspectorControls = ifBlockEditSelected( Fill ); InspectorControls.Slot = Slot; +/** + * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/inspector-controls/README.md + */ export default InspectorControls; diff --git a/packages/block-editor/src/components/media-placeholder/index.js b/packages/block-editor/src/components/media-placeholder/index.js index 096ce44ef9717..8f042ed1d893a 100644 --- a/packages/block-editor/src/components/media-placeholder/index.js +++ b/packages/block-editor/src/components/media-placeholder/index.js @@ -416,6 +416,9 @@ const applyWithSelect = withSelect( ( select ) => { }; } ); +/** + * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/media-placeholder/README.md + */ export default compose( applyWithSelect, withFilters( 'editor.MediaPlaceholder' ), diff --git a/packages/block-editor/src/components/media-upload/check.js b/packages/block-editor/src/components/media-upload/check.js index 3d94e3b3dd905..6f2903be5b1e1 100644 --- a/packages/block-editor/src/components/media-upload/check.js +++ b/packages/block-editor/src/components/media-upload/check.js @@ -7,6 +7,9 @@ export function MediaUploadCheck( { hasUploadPermissions, fallback = null, child return hasUploadPermissions ? children : fallback; } +/** + * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/media-upload/README.md + */ export default withSelect( ( select ) => { const { getSettings } = select( 'core/block-editor' ); diff --git a/packages/block-editor/src/components/media-upload/index.js b/packages/block-editor/src/components/media-upload/index.js index 38743329f818f..1cb3e51109727 100644 --- a/packages/block-editor/src/components/media-upload/index.js +++ b/packages/block-editor/src/components/media-upload/index.js @@ -12,5 +12,7 @@ import { withFilters } from '@wordpress/components'; */ const MediaUpload = () => null; -// Todo: rename the filter +/** + * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/media-upload/README.md + */ export default withFilters( 'editor.MediaUpload' )( MediaUpload ); diff --git a/packages/block-editor/src/components/observe-typing/index.js b/packages/block-editor/src/components/observe-typing/index.js index 6998eb771bf9e..c3ad69b3d834f 100644 --- a/packages/block-editor/src/components/observe-typing/index.js +++ b/packages/block-editor/src/components/observe-typing/index.js @@ -199,6 +199,9 @@ class ObserveTyping extends Component { } } +/** + * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/observe-typing/README.md + */ export default compose( [ withSelect( ( select ) => { const { isTyping } = select( 'core/block-editor' ); diff --git a/packages/block-editor/src/components/plain-text/index.js b/packages/block-editor/src/components/plain-text/index.js index 2043c46b57b7d..b05e48ed60b61 100644 --- a/packages/block-editor/src/components/plain-text/index.js +++ b/packages/block-editor/src/components/plain-text/index.js @@ -10,6 +10,9 @@ import { forwardRef } from '@wordpress/element'; import TextareaAutosize from 'react-autosize-textarea'; import classnames from 'classnames'; +/** + * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/plain-text/README.md + */ const PlainText = forwardRef( ( { onChange, className, ...props }, ref ) => { return (