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

[docgen-ts] Move <caption>ES(5|Next)</caption> to next line. #21405

Merged
merged 1 commit into from
Apr 5, 2020
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
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ const shouldRenderItem = ( selectedBlocks, allowedBlocks ) =>
* @param {string} props.label The menu item text.
* @param {Function} props.onClick Callback function to be executed when the user click the menu item.
*
* @example <caption>ES5</caption>
* @example
* <caption>ES5</caption>
* ```js
* // Using ES5 syntax
* var __ = wp.i18n.__;
Expand All @@ -61,7 +62,8 @@ const shouldRenderItem = ( selectedBlocks, allowedBlocks ) =>
* }
* ```
*
* @example <caption>ESNext</caption>
* @example
* <caption>ESNext</caption>
* ```jsx
* // Using ESNext syntax
* import { __ } from wp.i18n;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ const PluginMoreMenuItem = ( { onClick = noop, ...props } ) => (
* @param {Function} [props.onClick=noop] The callback function to be executed when the user clicks the menu item.
* @param {...*} [props.other] Any additional props are passed through to the underlying [MenuItem](/packages/components/src/menu-item/README.md) component.
*
* @example <caption>ES5</caption>
* @example
* <caption>ES5</caption>
* ```js
* // Using ES5 syntax
* var __ = wp.i18n.__;
Expand All @@ -59,7 +60,8 @@ const PluginMoreMenuItem = ( { onClick = noop, ...props } ) => (
* }
* ```
*
* @example <caption>ESNext</caption>
* @example
* <caption>ESNext</caption>
* ```jsx
* // Using ESNext syntax
* import { __ } from '@wordpress/i18n';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ const PluginSidebarMoreMenuItem = ( {
* @param {string} props.target A string identifying the target sidebar you wish to be activated by this menu item. Must be the same as the `name` prop you have given to that sidebar.
* @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered to the left of the menu item label.
*
* @example <caption>ES5</caption>
* @example
* <caption>ES5</caption>
* ```js
* // Using ES5 syntax
* var __ = wp.i18n.__;
Expand All @@ -55,7 +56,8 @@ const PluginSidebarMoreMenuItem = ( {
* }
* ```
*
* @example <caption>ESNext</caption>
* @example
* <caption>ESNext</caption>
* ```jsx
* // Using ESNext syntax
* import { __ } from '@wordpress/i18n';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ const PluginDocumentSettingFill = ( {
* @param {string} [props.title] The title of the panel
* @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.
*
* @example <caption>ES5</caption>
* @example
* <caption>ES5</caption>
* ```js
* // Using ES5 syntax
* var el = wp.element.createElement;
Expand All @@ -83,7 +84,8 @@ const PluginDocumentSettingFill = ( {
* } );
* ```
*
* @example <caption>ESNext</caption>
* @example
* <caption>ESNext</caption>
* ```jsx
* // Using ESNext syntax
* const { registerPlugin } = wp.plugins;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ const PluginPostPublishPanelFill = ( {
* @param {boolean} [props.initialOpen=false] Whether to have the panel initially opened. When no title is provided it is always opened.
* @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.
*
* @example <caption>ES5</caption>
* @example
* <caption>ES5</caption>
* ```js
* // Using ES5 syntax
* var __ = wp.i18n.__;
Expand All @@ -54,7 +55,8 @@ const PluginPostPublishPanelFill = ( {
* }
* ```
*
* @example <caption>ESNext</caption>
* @example
* <caption>ESNext</caption>
* ```jsx
* // Using ESNext syntax
* const { __ } = wp.i18n;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ export const { Fill, Slot } = createSlotFill( 'PluginPostStatusInfo' );
* @param {Object} props Component properties.
* @param {string} [props.className] An optional class name added to the row.
*
* @example <caption>ES5</caption>
* @example
* <caption>ES5</caption>
* ```js
* // Using ES5 syntax
* var __ = wp.i18n.__;
Expand All @@ -34,7 +35,8 @@ export const { Fill, Slot } = createSlotFill( 'PluginPostStatusInfo' );
* }
* ```
*
* @example <caption>ESNext</caption>
* @example
* <caption>ESNext</caption>
* ```jsx
* // Using ESNext syntax
* const { __ } = wp.i18n;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ const PluginPrePublishPanelFill = ( {
* icon slug string, or an SVG WP element, to be rendered when
* the sidebar is pinned to toolbar.
*
* @example <caption>ES5</caption>
* @example
* <caption>ES5</caption>
* ```js
* // Using ES5 syntax
* var __ = wp.i18n.__;
Expand All @@ -57,7 +58,8 @@ const PluginPrePublishPanelFill = ( {
* }
* ```
*
* @example <caption>ESNext</caption>
* @example
* <caption>ESNext</caption>
* ```jsx
* // Using ESNext syntax
* const { __ } = wp.i18n;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ import { __ } from '@wordpress/i18n';
* @param {boolean} [props.isPinnable=true] Whether to allow to pin sidebar to toolbar.
* @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.
*
* @example <caption>ES5</caption>
* @example
* <caption>ES5</caption>
* ```js
* // Using ES5 syntax
* var __ = wp.i18n.__;
Expand All @@ -48,7 +49,8 @@ import { __ } from '@wordpress/i18n';
* }
* ```
*
* @example <caption>ESNext</caption>
* @example
* <caption>ESNext</caption>
* ```jsx
* // Using ESNext syntax
* import { __ } from '@wordpress/i18n';
Expand Down
12 changes: 8 additions & 4 deletions packages/plugins/src/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ const plugins = {};
* unique across all registered plugins.
* @param {WPPlugin} settings The settings for this plugin.
*
* @example <caption>ES5</caption>
* @example
* <caption>ES5</caption>
* ```js
* // Using ES5 syntax
* var el = wp.element.createElement;
Expand Down Expand Up @@ -78,7 +79,8 @@ const plugins = {};
* } );
* ```
*
* @example <caption>ESNext</caption>
* @example
* <caption>ESNext</caption>
* ```js
* // Using ESNext syntax
* import { PluginSidebar, PluginSidebarMoreMenuItem } from '@wordpress/edit-post';
Expand Down Expand Up @@ -153,15 +155,17 @@ export function registerPlugin( name, settings ) {
*
* @param {string} name Plugin name.
*
* @example <caption>ES5</caption>
* @example
* <caption>ES5</caption>
* ```js
* // Using ES5 syntax
* var unregisterPlugin = wp.plugins.unregisterPlugin;
*
* unregisterPlugin( 'plugin-name' );
* ```
*
* @example <caption>ESNext</caption>
* @example
* <caption>ESNext</caption>
* ```js
* // Using ESNext syntax
* const { unregisterPlugin } = wp.plugins;
Expand Down
6 changes: 4 additions & 2 deletions packages/plugins/src/components/plugin-area/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import { getPlugins } from '../../api';
/**
* A component that renders all plugin fills in a hidden div.
*
* @example <caption>ES5</caption>
* @example
* <caption>ES5</caption>
* ```js
* // Using ES5 syntax
* var el = wp.element.createElement;
Expand All @@ -34,7 +35,8 @@ import { getPlugins } from '../../api';
* }
* ```
*
* @example <caption>ESNext</caption>
* @example
* <caption>ESNext</caption>
* ```js
* // Using ESNext syntax
* const { PluginArea } = wp.plugins;
Expand Down