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

Logo Gallery block #11986

Closed
wants to merge 4 commits into from
Closed

Logo Gallery block #11986

wants to merge 4 commits into from

Conversation

frontdevde
Copy link
Contributor

@frontdevde frontdevde commented Apr 9, 2019

Changes proposed in this Pull Request:

  • This PR aims to add a new Logo Gallery block.

This block is similar to the Gallery with a few differences:

  • No crop option, logos shouldn’t be cropped!
  • Logos are horizontally and vertically centred
  • No captions, instead we have external links
  • Logos should have a set max-width to make sure if we only have one logo, it doesn’t look huge
  • Ability to add an external link (rather than media file, etc…)
  • For more detailed information see wp-pafL3P-o0 and wp-p8F0Ux-1xQ

Screenshot of current progress

logo-gallery-wip

Updated Icons

Screen Shot 2019-04-09 at 21 19 15

Testing instructions:

Proposed changelog entry for your changes:

  • Added Logo Gallery block

TODOs

@frontdevde frontdevde added [Status] In Progress [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack labels Apr 9, 2019
/**
* Internal dependencies
*/
import registerJetpackBlock from '../../utils/register-jetpack-block';
Copy link
Member

Choose a reason for hiding this comment

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

Note that we've moved files a bit around, utils are now under /extensions/shared. Please rebase. :-)

#11971

list-style-type: none;
}

.logo-gallery-item {
Copy link
Member

@simison simison Apr 12, 2019

Choose a reason for hiding this comment

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

You might want to protect this from leaking out to other "logo-gallery" blocks (by others than us) by wrapping it in wp-block-jetpack-logo-gallery

@@ -18,5 +18,5 @@
"videopress",
"wordads"
],
"beta": [ "likes", "sharing", "seo" ]
"beta": [ "likes", "sharing", "seo", "logo-gallery" ]
Copy link
Member

Choose a reason for hiding this comment

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

This json file got moved to extensions/index.json. Please rebase. :-)

function jetpack_logo_gallery_block_load_assets( $attr, $content ) {
$dependencies = array();

Jetpack_Gutenberg::load_assets_as_required( 'logo-gallery', $dependencies );
Copy link
Member

Choose a reason for hiding this comment

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

If you don't have need to load view.js, you can use Jetpack_Gutenberg::load_styles_as_required to avoid it.

* @return string
*/
function jetpack_logo_gallery_block_load_assets( $attr, $content ) {
$dependencies = array();
Copy link
Member

Choose a reason for hiding this comment

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

Empty deps array can prolly be just removed.

@stale
Copy link

stale bot commented Jul 11, 2019

This PR has been marked as stale. This happened because:

  • It has been inactive in the past 3 months.
  • It hasn’t been labeled `[Pri] Blocker`, `[Pri] High`.

No further action is needed. But it's worth checking if this PR has clear testing instructions, is it up to date with master, and it is still valid. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.

@frontdevde
Copy link
Contributor Author

Closing because of change of priorities.

@frontdevde frontdevde closed this Jul 11, 2019
@frontdevde frontdevde deleted the add/logo-gallery-block branch July 11, 2019 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants