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

GalleryBlock: remove unused CSS and cleanup front-end. #2291

Merged
merged 3 commits into from
Aug 10, 2017

Conversation

mtias
Copy link
Member

@mtias mtias commented Aug 8, 2017

Closes #2272.

@mtias mtias added the [Feature] Blocks Overall functionality of blocks label Aug 8, 2017
@jasmussen
Copy link
Contributor

I don't know where the regression lies but I'm seeing some color issues with normal, hover and active states in the inserter:

screen shot 2017-08-08 at 18 17 44

screen shot 2017-08-08 at 18 17 52

Also seeing some weirdnesses with the image block, and inserting multiple galleries:

gallery

@mtias
Copy link
Member Author

mtias commented Aug 8, 2017

Maybe @aduth knows :)

@aduth
Copy link
Member

aduth commented Aug 8, 2017

Styling issues could indeed be related to #2160 because the "Portals" implementation there intentionally removes popover content from the CSS cascade, which is nice in that it avoids styles from a parent from affecting the popover content, but not so great for "global" styles.

One option is to render the portal into the base of the Gutenberg editor rather than the body.

@@ -168,6 +168,7 @@ registerBlockType( 'core/gallery', {

save( { attributes } ) {
const { images, columns = defaultColumnsNumber( attributes ), align = 'none', imageCrop = true, linkTo = 'none' } = attributes;

Copy link
Member

Choose a reason for hiding this comment

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

This is probably going to cause a conflict for me in #1905 😬

.blocks-gallery__placeholder-instructions {
margin: 1.8em 0;
.wp-block-gallery:not( .components-placeholder ) {
margin-right: -16px;
Copy link
Member

Choose a reason for hiding this comment

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

Sorta feel the excess margin on gallery images could be better handled by an :nth-of-type( 2n ) { margin-right: 0; } etc.

@codecov
Copy link

codecov bot commented Aug 10, 2017

Codecov Report

Merging #2291 into master will decrease coverage by 0.12%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2291      +/-   ##
==========================================
- Coverage   24.78%   24.66%   -0.13%     
==========================================
  Files         151      152       +1     
  Lines        4721     4744      +23     
  Branches      799      800       +1     
==========================================
  Hits         1170     1170              
- Misses       2997     3019      +22     
- Partials      554      555       +1
Impacted Files Coverage Δ
editor/sidebar/post-status/index.js 0% <0%> (ø) ⬆️
editor/sidebar/post-format/index.js 0% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 60001ba...c5bbfad. Read the comment docs.

@mtias mtias merged commit a6cf4e3 into master Aug 10, 2017
@mtias mtias deleted the update/gallery-scss branch August 10, 2017 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants