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

Refactor to remove usage of post related effects in packages/editor. #13716

Merged
merged 32 commits into from
Feb 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
7e1d857
add controls for fetch, select, and dispatch
nerrad Feb 7, 2019
77a812c
move _all_ constants into the constants file for better organization
nerrad Feb 7, 2019
ae3f60b
establish file structure, begin refactoring post effects/actions
nerrad Feb 7, 2019
a673b8e
Implement trashPost action-generator
nerrad Feb 8, 2019
25c74c2
fix import jsdocs
nerrad Feb 8, 2019
54fbc38
update controls to use new createRegistryControl interface
nerrad Feb 8, 2019
455d6a8
add action generator for refreshing the current post
nerrad Feb 8, 2019
5d246e5
add tests for new code
nerrad Feb 11, 2019
0008288
fix broken tests
nerrad Feb 11, 2019
de8e6d1
don’t continue with refreshPost if there’s no current post yet
nerrad Feb 11, 2019
64216f4
remove unnecessary bail
nerrad Feb 11, 2019
f80fae4
add changelog entry
nerrad Feb 11, 2019
97b1ed5
fix lint failure for import order
nerrad Feb 12, 2019
9bce642
fix incorrect method used for autosave requests
nerrad Feb 12, 2019
36f962d
remove another wayward period.
nerrad Feb 12, 2019
d69599f
Add resolveSelect control and implement
nerrad Feb 19, 2019
4cba06a
refactor to condense code and update tests.
nerrad Feb 22, 2019
b3beb7f
update docs
nerrad Feb 22, 2019
651216d
fix doc blocks
nerrad Feb 27, 2019
a455781
fix jsdocs for param object properties
nerrad Feb 27, 2019
1a4fc0c
simplify import statement
nerrad Feb 27, 2019
49f5af6
utilize constants from constants file
nerrad Feb 27, 2019
a41039c
remove unused constants (now in block-editor)
nerrad Feb 27, 2019
2c14df4
simplify import
nerrad Feb 27, 2019
f66af80
add doc blocks for control actions
nerrad Feb 27, 2019
5568ac3
update docs
nerrad Feb 27, 2019
6d74643
make sure test is importing used constant
nerrad Feb 27, 2019
ff70f2b
fix doc block spacing issues
nerrad Feb 28, 2019
1c11a5b
Swith constant name from `MODULE_KEY` to `STORE_KEY`
nerrad Feb 28, 2019
4cc4015
remove use of generatorActions default import ans switch to dispatch …
nerrad Feb 28, 2019
0ba7d0e
doc changes
nerrad Feb 28, 2019
c17179e
Fix docs spacing
aduth Feb 28, 2019
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
76 changes: 67 additions & 9 deletions docs/designers-developers/developers/data/data-core-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,43 @@ post has been received, by initialization or autosave.

* post: 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 All @@ -760,7 +797,8 @@ latest version of the post have been received.

### setupEditorState

Returns an action object used to setup the editor state when first opening an editor.
Returns an action object used to setup the editor state when first opening
an editor.

*Parameters*

Expand All @@ -775,18 +813,34 @@ 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

Returns an action object to save the post.
Action generator for saving the current post in the editor.

*Parameters*

* options: Options for the save.
* options.isAutosave: Perform an autosave if true.
* options: null

### refreshPost

Action generator for handling refreshing the current post.

### trashPost

Action generator for trashing the current post in the editor.

### autosave

Returns an action object used in signalling that the post should autosave.
Action generator used in signalling that the post should autosave.

*Parameters*

Expand Down Expand Up @@ -864,27 +918,31 @@ to be updated.

### __experimentalConvertBlockToStatic

Returns an action object used to convert a reusable block into a static block.
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.
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 publish sidebar.
Returns an action object used in signalling that the user has enabled the
publish sidebar.

### disablePublishSidebar

Returns an action object used in signalling that the user has disabled the publish sidebar.
Returns an action object used in signalling that the user has disabled the
publish sidebar.

### lockPostSaving

Expand Down
1 change: 1 addition & 0 deletions packages/editor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Removed `jQuery` dependency.
- Removed `TinyMCE` dependency.
- RichText: improve format boundaries.
- Refactor all post effects to action-generators using controls ([#13716](https://github.com/WordPress/gutenberg/pull/13716))

## 9.0.7 (2019-01-03)

Expand Down
Loading