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

Block API: Adding a description property to the block API #4159

Merged
merged 1 commit into from Dec 28, 2017

Conversation

Projects
None yet
3 participants
@youknowriad
Contributor

youknowriad commented Dec 25, 2017

closes #3081 and closes #2814 and closes #3375

This PR adds a description property to the Block API. This property replaces the BlockDescription component we used to use to show a block's description in the block inspector.

At the same time, this PR shows the icon, title and description of the selected block in the inspector

screen shot 2017-12-25 at 12 32 54

Testing instructions

  • Select a block (try several types)
  • A block "card" containing the icon, title and description should show up in the inspector.
@noisysocks

noisysocks approved these changes Dec 28, 2017 edited

This is beautiful! 🌈

Left some nit comments—nothing serious.

Show outdated Hide outdated editor/components/block-inspector/index.js
@@ -88,7 +88,7 @@ registerBlockType( 'core/audio', {
}
return false;
};
const controls = focus && [
const controls = focus && (
<BlockControls key="controls">

This comment has been minimized.

@noisysocks

noisysocks Dec 28, 2017

Member

This key property isn't necessary anymore.

@noisysocks

noisysocks Dec 28, 2017

Member

This key property isn't necessary anymore.

This comment has been minimized.

@youknowriad

youknowriad Dec 28, 2017

Contributor

Actually, it is. I thought the same but then realized the controls variable is used in an array.

@youknowriad

youknowriad Dec 28, 2017

Contributor

Actually, it is. I thought the same but then realized the controls variable is used in an array.

Show outdated Hide outdated blocks/library/code/index.js
),
];
const controls = focus && (
<BlockControls key="controls">

This comment has been minimized.

@noisysocks

noisysocks Dec 28, 2017

Member

This key property isn't necessary anymore.

@noisysocks

noisysocks Dec 28, 2017

Member

This key property isn't necessary anymore.

This comment has been minimized.

@youknowriad

youknowriad Dec 28, 2017

Contributor

Same as above

@youknowriad

youknowriad Dec 28, 2017

Contributor

Same as above

</BlockDescription>
</InspectorControls>
),
];

This comment has been minimized.

@noisysocks

noisysocks Dec 28, 2017

Member

So much red! 😍

@noisysocks

noisysocks Dec 28, 2017

Member

So much red! 😍

Show outdated Hide outdated blocks/library/separator/index.js
@jasmussen

This comment has been minimized.

Show comment
Hide comment
@jasmussen

jasmussen Dec 28, 2017

Contributor

Love it, visually 👍

Contributor

jasmussen commented Dec 28, 2017

Love it, visually 👍

@youknowriad youknowriad merged commit 003d533 into master Dec 28, 2017

3 checks passed

codecov/project 39.15% (+0.03%) compared to 3a3c3d5
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@youknowriad youknowriad deleted the add/block-description-api branch Dec 28, 2017

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