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

Block Editor: Docs: Add DocBlock see references to component READMEs #15194

Merged
merged 1 commit into from
Apr 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 42 additions & 14 deletions packages/block-editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ Undocumented declaration.

<a name="Autocomplete" href="#Autocomplete">#</a> **Autocomplete**

Undocumented declaration.
_Related_

- <https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/autocomplete/README.md>

<a name="BlockAlignmentToolbar" href="#BlockAlignmentToolbar">#</a> **BlockAlignmentToolbar**

Expand Down Expand Up @@ -138,11 +140,15 @@ Undocumented declaration.

<a name="BlockVerticalAlignmentToolbar" href="#BlockVerticalAlignmentToolbar">#</a> **BlockVerticalAlignmentToolbar**

Undocumented declaration.
_Related_

- <https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/block-vertical-alignment-toolbar/README.md>

<a name="ButtonBlockerAppender" href="#ButtonBlockerAppender">#</a> **ButtonBlockerAppender**

Undocumented declaration.
_Related_

- <https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/button-block-appender/README.md>

<a name="ColorPalette" href="#ColorPalette">#</a> **ColorPalette**

Expand Down Expand Up @@ -261,7 +267,9 @@ _Returns_

<a name="InnerBlocks" href="#InnerBlocks">#</a> **InnerBlocks**

Undocumented declaration.
_Related_

- <https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/inner-blocks/README.md>

<a name="Inserter" href="#Inserter">#</a> **Inserter**

Expand All @@ -273,19 +281,27 @@ Undocumented declaration.

<a name="InspectorControls" href="#InspectorControls">#</a> **InspectorControls**

Undocumented declaration.
_Related_

- <https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/inspector-controls/README.md>

<a name="MediaPlaceholder" href="#MediaPlaceholder">#</a> **MediaPlaceholder**

Undocumented declaration.
_Related_

- <https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/media-placeholder/README.md>

<a name="MediaUpload" href="#MediaUpload">#</a> **MediaUpload**

Undocumented declaration.
_Related_

- <https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/media-upload/README.md>

<a name="MediaUploadCheck" href="#MediaUploadCheck">#</a> **MediaUploadCheck**

Undocumented declaration.
_Related_

- <https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/media-upload/README.md>

<a name="MultiBlocksSwitcher" href="#MultiBlocksSwitcher">#</a> **MultiBlocksSwitcher**

Expand All @@ -301,23 +317,29 @@ Undocumented declaration.

<a name="ObserveTyping" href="#ObserveTyping">#</a> **ObserveTyping**

Undocumented declaration.
_Related_

- <https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/observe-typing/README.md>

<a name="PanelColorSettings" href="#PanelColorSettings">#</a> **PanelColorSettings**

Undocumented declaration.

<a name="PlainText" href="#PlainText">#</a> **PlainText**

Undocumented declaration.
_Related_

- <https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/plain-text/README.md>

<a name="PreserveScrollInReorder" href="#PreserveScrollInReorder">#</a> **PreserveScrollInReorder**

Undocumented declaration.

<a name="RichText" href="#RichText">#</a> **RichText**

Undocumented declaration.
_Related_

- <https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/rich-text/README.md>

<a name="RichTextShortcut" href="#RichTextShortcut">#</a> **RichTextShortcut**

Expand Down Expand Up @@ -354,15 +376,21 @@ Undocumented declaration.

<a name="URLInput" href="#URLInput">#</a> **URLInput**

Undocumented declaration.
_Related_

- <https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/url-input/README.md>

<a name="URLInputButton" href="#URLInputButton">#</a> **URLInputButton**

Undocumented declaration.
_Related_

- <https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/url-input/README.md>

<a name="URLPopover" href="#URLPopover">#</a> **URLPopover**

Undocumented declaration.
_Related_

- <https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/url-popover/README.md>

<a name="Warning" href="#Warning">#</a> **Warning**

Expand Down
3 changes: 3 additions & 0 deletions packages/block-editor/src/components/autocomplete/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { __ } from '@wordpress/i18n';
*/
import Inserter from '../inserter';

export default function ButtonBlockAppender( { rootClientId, className } ) {
function ButtonBlockAppender( { rootClientId, className } ) {
return (
<Inserter
rootClientId={ rootClientId }
Expand All @@ -33,3 +33,8 @@ export default function ButtonBlockAppender( { rootClientId, className } ) {
/>
);
}

/**
* @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/button-block-appender/README.md
*/
export default ButtonBlockAppender;
3 changes: 3 additions & 0 deletions packages/block-editor/src/components/inner-blocks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,4 +177,7 @@ InnerBlocks.Content = withBlockContentContext(
( { BlockContent } ) => <BlockContent />
);

/**
* @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/inner-blocks/README.md
*/
export default InnerBlocks;
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Original file line number Diff line number Diff line change
Expand Up @@ -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' ),
Expand Down
3 changes: 3 additions & 0 deletions packages/block-editor/src/components/media-upload/check.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' );

Expand Down
4 changes: 3 additions & 1 deletion packages/block-editor/src/components/media-upload/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
3 changes: 3 additions & 0 deletions packages/block-editor/src/components/observe-typing/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand Down
3 changes: 3 additions & 0 deletions packages/block-editor/src/components/plain-text/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<TextareaAutosize
Expand Down
3 changes: 3 additions & 0 deletions packages/block-editor/src/components/rich-text/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1230,6 +1230,9 @@ RichTextContainer.Content.defaultProps = {
value: '',
};

/**
* @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/rich-text/README.md
*/
export default RichTextContainer;
export { RichTextShortcut } from './shortcut';
export { RichTextToolbarButton } from './toolbar-button';
Expand Down
3 changes: 3 additions & 0 deletions packages/block-editor/src/components/url-input/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,7 @@ class URLInputButton extends Component {
}
}

/**
* @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/url-input/README.md
*/
export default URLInputButton;
3 changes: 3 additions & 0 deletions packages/block-editor/src/components/url-input/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ class URLInput extends Component {
}
}

/**
* @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/url-input/README.md
*/
export default compose(
withSafeTimeout,
withSpokenMessages,
Expand Down
3 changes: 3 additions & 0 deletions packages/block-editor/src/components/url-popover/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,7 @@ class URLPopover extends Component {
}
}

/**
* @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/url-popover/README.md
*/
export default URLPopover;