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

Move editorMediaUpload to the editor module #6682

Merged
merged 1 commit into from
May 10, 2018

Conversation

youknowriad
Copy link
Contributor

Related #6275

This PR moves the editorMediaUpload helper to the editor module because it has a dependency towards the editor store. This allows us to remove the check for the store existence.

Testing instructions

  • Check that uploading images directly from the image block works as expected.

if ( select( 'core/editor' ) ) {
postId = select( 'core/editor' ).getCurrentPostId();
}
const postId = select( 'core/editor' ).getCurrentPostId();
Copy link
Member

Choose a reason for hiding this comment

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

finally :)

Copy link
Member

@danielbachhuber danielbachhuber left a comment

Choose a reason for hiding this comment

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

👍 I tested this locally and it works as expected.

@danielbachhuber danielbachhuber added this to the 2.9 milestone May 10, 2018
@@ -8,5 +8,3 @@
// Blocks are inferred from the HTML source of a post through a parsing mechanism
// and then stored as objects in state, from which it is then rendered for editing.
export * from './api';

Copy link
Member

Choose a reason for hiding this comment

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

@youknowriad - did you update this comment above in the PR where you migrate blocks to store? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

haha :) comment posted on the wrong PR

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.

LGTM, haven't tested...

@youknowriad youknowriad force-pushed the update/editor-media-upload branch from 27a3671 to 6becea0 Compare May 10, 2018 14:48
@youknowriad youknowriad merged commit 41b59cc into master May 10, 2018
@youknowriad youknowriad deleted the update/editor-media-upload branch May 10, 2018 15:01
@yoadsn yoadsn mentioned this pull request Feb 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants