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

Chrome: Unselect blocks when opening the document settings #6936

Merged
merged 1 commit into from May 24, 2018

Conversation

Projects
None yet
4 participants
@youknowriad
Contributor

youknowriad commented May 24, 2018

closes #6887

Testing instructions

  • Select a block
  • This shows the block inspector
  • Click "Document"
  • This unselects the block

@youknowriad youknowriad self-assigned this May 24, 2018

@youknowriad youknowriad requested a review from jasmussen May 24, 2018

@jasmussen

Nice! Works as intended.

I can't review the code, but the experience feels right 👍 👍

@gziolo

gziolo approved these changes May 24, 2018

👍

const { openGeneralSidebar } = dispatch( 'core/edit-post' );
const { clearSelectedBlock } = dispatch( 'core/editor' );
return {
openDocumentSettings: () => {

This comment has been minimized.

@gziolo

gziolo May 24, 2018

Member

You can use object function shorthand:

return {
	openDocumentSettings() { ... },
	openBlockSettings() { ... },
};

@youknowriad youknowriad merged commit 9a7bbe6 into master May 24, 2018

2 checks passed

codecov/project 46.12% (-0.02%) compared to 321be98
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@youknowriad youknowriad deleted the unselect-on-document-select branch May 24, 2018

@youknowriad youknowriad added this to the 3.0 milestone May 30, 2018

@afercia

This comment has been minimized.

Contributor

afercia commented Jun 6, 2018

@youknowriad quick question: would it be easy to re-select the previously selected block when clicking "Block" after "Document" has been clicked?

@youknowriad

This comment has been minimized.

Contributor

youknowriad commented Jun 7, 2018

@afercia We'd have to store this information somewhere, we don't have it at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment