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

Documentation: Update docs tool to omit private, experimental, unstable APIs #15188

Merged
merged 2 commits into from
Apr 26, 2019

Conversation

aduth
Copy link
Member

@aduth aduth commented Apr 25, 2019

Closes #15148

This pull request seeks to update the docs tool to omit selectors and actions which are either named as unstable or experimental, or which include a @private JSDoc tag.

Implementation notes:

There is certainly some overlap / potential for inconsistency between the documentation output by this tool, and that of @wordpress/docgen. These should probably be reconciled, but it seemed a larger effort than the immediate goal of excluding APIs not intended to be documented.

Testing instructions:

Verify there are no unstable, experimental, or private APIs documented.

Verify there are no local changes after running npm run docs:build in this branch.

@aduth aduth added [Type] Developer Documentation Documentation for developers [Type] Build Tooling Issues or PRs related to build tooling labels Apr 25, 2019
@aduth aduth requested a review from nerrad April 25, 2019 16:12
*
* @return {boolean} Whether the provided name describes a stable API.
*/
const isStableExportName = ( name ) => ! /^__(unstable|experimental)/.test( name );
Copy link
Member

Choose a reason for hiding this comment

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

Can we make it case insensitive? I'd like it to cover component names as well:

__UnstableComponent or __ExperimentalComponent.

Copy link
Member Author

Choose a reason for hiding this comment

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

Can we make it case insensitive? I'd like it to cover component names as well:

__UnstableComponent or __ExperimentalComponent.

AFAIK (and what I'd recommend), it's still capitalized as __experimentalComponent.

Example:

export { default as __experimentalAsyncModeProvider } from './components/async-mode-provider';

Copy link
Member

Choose a reason for hiding this comment

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

Okay, let's follow this pattern 👍

@aduth
Copy link
Member Author

aduth commented Apr 25, 2019

There is certainly some overlap / potential for inconsistency between the documentation output by this tool, and that of @wordpress/docgen. These should probably be reconciled, but it seemed a larger effort than the immediate goal of excluding APIs not intended to be documented.

#15200 is a step toward this.

Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

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

Let's move forward with it and focus our efforts on moving selectors and actions under control of docgen 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Build Tooling Issues or PRs related to build tooling [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation: Omit unstable / experimental functions from data documentation
3 participants