Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Cover Image Block: Show inspector controls when no image is selected #2506
Conversation
youknowriad
added
the
Blocks
label
Aug 23, 2017
youknowriad
self-assigned this
Aug 23, 2017
youknowriad
requested a review
from jasmussen
Aug 23, 2017
codecov
bot
commented
Aug 23, 2017
•
Codecov Report
@@ Coverage Diff @@
## master #2506 +/- ##
==========================================
+ Coverage 28.7% 28.82% +0.11%
==========================================
Files 167 174 +7
Lines 5103 5739 +636
Branches 849 1048 +199
==========================================
+ Hits 1465 1654 +189
- Misses 3086 3400 +314
- Partials 552 685 +133
Continue to review full report at Codecov.
|
| @@ -93,10 +100,30 @@ registerBlockType( 'core/cover-image', { | ||
| ) | ||
| ); | ||
| + const inspectorControls = focus && ( |
aduth
Aug 23, 2017
Member
Could we consolidate this to a single variable, i.e.
const controls = focus && [
<BlockControls key="controls" />,
<InspectorControls key="inspector" />,
];?
aduth
approved these changes
Aug 24, 2017
Not related to this pull request, but the Cover Image block doesn't save particularly well when the image is not assigned, i.e. it assigns a background-image: url(undefined).
|
Pushed a small fix for the style issue. Thanks Andrew |
youknowriad commentedAug 23, 2017
closes #2485
When you insert a Cover Image, you'll be able to tweak its inspector controls even if you didn't select an image yet.