Skip to content

Commit

Permalink
Documentation: Update docs tool to omit private, experimental, unstab…
Browse files Browse the repository at this point in the history
…le APIs (#15188)

* Documentation: Update docs tool to omit private selectors, actions

* Documentation: Update docs tool to omit experimental, unstable APIs
  • Loading branch information
aduth authored Apr 26, 2019
1 parent 0c146bc commit d719a44
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 300 deletions.
86 changes: 0 additions & 86 deletions docs/designers-developers/developers/data/data-core-annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,93 +2,7 @@

## Selectors

### __experimentalGetAnnotationsForBlock

Returns the annotations for a specific client ID.

*Parameters*

* state: Editor state.
* clientId: The ID of the block to get the annotations for.

### __experimentalGetAnnotationsForRichText

Returns the annotations that apply to the given RichText instance.

Both a blockClientId and a richTextIdentifier are required. This is because
a block might have multiple `RichText` components. This does mean that every
block needs to implement annotations itself.

*Parameters*

* state: Editor state.
* blockClientId: The client ID for the block.
* richTextIdentifier: Unique identifier that identifies the given RichText.

*Returns*

All the annotations relevant for the `RichText`.

### __experimentalGetAnnotations

Returns all annotations in the editor state.

*Parameters*

* state: Editor state.

*Returns*

All annotations currently applied.

## Actions

### __experimentalAddAnnotation

Adds an annotation to a block.

The `block` attribute refers to a block ID that needs to be annotated.
`isBlockAnnotation` controls whether or not the annotation is a block
annotation. The `source` is the source of the annotation, this will be used
to identity groups of annotations.

The `range` property is only relevant if the selector is 'range'.

*Parameters*

* annotation: The annotation to add.
* blockClientId: The blockClientId to add the annotation to.
* richTextIdentifier: Identifier for the RichText instance the annotation applies to.
* range: The range at which to apply this annotation.
* range.start: The offset where the annotation should start.
* range.end: The offset where the annotation should end.
* string: [selector="range"] The way to apply this annotation.
* string: [source="default"] The source that added the annotation.
* string: [id=uuid()] The ID the annotation should have.
Generates a UUID by default.

### __experimentalRemoveAnnotation

Removes an annotation with a specific ID.

*Parameters*

* annotationId: The annotation to remove.

### __experimentalUpdateAnnotationRange

Updates the range of an annotation.

*Parameters*

* annotationId: ID of the annotation to update.
* start: The start of the new range.
* end: The end of the new range.

### __experimentalRemoveAnnotationsBySource

Removes all annotations of a specific source.

*Parameters*

* source: The source to remove.
Original file line number Diff line number Diff line change
Expand Up @@ -801,20 +801,6 @@ via its `onChange` callback, in addition to `onInput`.

Whether the most recent block change was persistent.

### __unstableIsLastBlockChangeIgnored

Returns true if the most recent block change is be considered ignored, or
false otherwise. An ignored change is one not to be committed by
BlockEditorProvider, neither via `onChange` nor `onInput`.

*Parameters*

* state: Block editor state.

*Returns*

Whether the most recent block change was ignored.

## Actions

### resetBlocks
Expand Down Expand Up @@ -1108,18 +1094,4 @@ Returns an action object used in signalling that the block editor settings have

*Parameters*

* settings: Updated settings

### __unstableSaveReusableBlock

Returns an action object used in signalling that a temporary reusable blocks have been saved
in order to switch its temporary id with the real id.

*Parameters*

* id: Reusable block's id.
* updatedId: Updated block's id.

### __unstableMarkLastChangeAsPersistent

Returns an action object used in signalling that the last block change should be marked explicitely as persistent.
* settings: Updated settings
176 changes: 0 additions & 176 deletions docs/designers-developers/developers/data/data-core-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -496,58 +496,6 @@ before falling back to serialization of block state.

Post content.

### __experimentalGetReusableBlock

Returns the reusable block with the given ID.

*Parameters*

* state: Global application state.
* ref: The reusable block's ID.

*Returns*

The reusable block, or null if none exists.

### __experimentalIsSavingReusableBlock

Returns whether or not the reusable block with the given ID is being saved.

*Parameters*

* state: Global application state.
* ref: The reusable block's ID.

*Returns*

Whether or not the reusable block is being saved.

### __experimentalIsFetchingReusableBlock

Returns true if the reusable block with the given ID is being fetched, or
false otherwise.

*Parameters*

* state: Global application state.
* ref: The reusable block's ID.

*Returns*

Whether the reusable block is being fetched.

### __experimentalGetReusableBlocks

Returns an array of all reusable blocks.

*Parameters*

* state: Global application state.

*Returns*

An array of all reusable blocks.

### getStateBeforeOptimisticTransaction

Returns state object prior to a specified optimist transaction ID, or `null`
Expand Down Expand Up @@ -723,18 +671,6 @@ Return the current block list.

Block list.

### __unstableIsEditorReady

Is the editor ready

*Parameters*

* state: null

*Returns*

is Ready.

### getEditorSettings

Returns the post editor settings.
Expand Down Expand Up @@ -783,43 +719,6 @@ Deprecated since 5.6. Callers should use the `receiveAutosaves( postId, autosave

* newAutosave: Autosave post object.

### __experimentalRequestPostUpdateStart

Optimistic action for dispatching that a post update request has started.

*Parameters*

* options: null

### __experimentalRequestPostUpdateSuccess

Optimistic action for indicating that the request post update has completed
successfully.

*Parameters*

* data: The data for the action.
* data.previousPost: The previous post prior to update.
* data.post: The new post after update
* data.isRevision: Whether the post is a revision or not.
* data.options: Options passed through from the original
action dispatch.
* data.postType: The post type object.

### __experimentalRequestPostUpdateFailure

Optimistic action for indicating that the request post update has completed
with a failure.

*Parameters*

* data: The data for the action
* data.post: The post that failed updating.
* data.edits: The fields that were being updated.
* data.error: The error from the failed call.
* data.options: Options passed through from the original
action dispatch.

### updatePost

Returns an action object used in signalling that a patch of updates for the
Expand Down Expand Up @@ -847,15 +746,6 @@ been edited.

* edits: Post attributes to edit.

### __experimentalOptimisticUpdatePost

Returns action object produced by the updatePost creator augmented by
an optimist option that signals optimistically applying updates.

*Parameters*

* edits: Updated post fields.

### savePost

Action generator for saving the current post in the editor.
Expand Down Expand Up @@ -902,72 +792,6 @@ Returns an action object used to lock the editor.

* lock: Details about the post lock status, user, and nonce.

### __experimentalFetchReusableBlocks

Returns an action object used to fetch a single reusable block or all
reusable blocks from the REST API into the store.

*Parameters*

* id: If given, only a single reusable block with this ID will
be fetched.

### __experimentalReceiveReusableBlocks

Returns an action object used in signalling that reusable blocks have been
received. `results` is an array of objects containing:
- `reusableBlock` - Details about how the reusable block is persisted.
- `parsedBlock` - The original block.

*Parameters*

* results: Reusable blocks received.

### __experimentalSaveReusableBlock

Returns an action object used to save a reusable block that's in the store to
the REST API.

*Parameters*

* id: The ID of the reusable block to save.

### __experimentalDeleteReusableBlock

Returns an action object used to delete a reusable block via the REST API.

*Parameters*

* id: The ID of the reusable block to delete.

### __experimentalUpdateReusableBlockTitle

Returns an action object used in signalling that a reusable block's title is
to be updated.

*Parameters*

* id: The ID of the reusable block to update.
* title: The new title.

### __experimentalConvertBlockToStatic

Returns an action object used to convert a reusable block into a static
block.

*Parameters*

* clientId: The client ID of the block to attach.

### __experimentalConvertBlockToReusable

Returns an action object used to convert a static block into a reusable
block.

*Parameters*

* clientIds: The client IDs of the block to detach.

### enablePublishSidebar

Returns an action object used in signalling that the user has enabled the
Expand Down
Loading

0 comments on commit d719a44

Please sign in to comment.