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

Add basic example to site logo block #35588

Merged
merged 1 commit into from Oct 13, 2021

Conversation

fabiankaegy
Copy link
Member

@fabiankaegy fabiankaegy commented Oct 13, 2021

Description

Add a basic example to the core/site-logo block.

Part of #30029

How has this been tested?

Locally using the bundles wp-env environment

Screenshots

While no Logo has been defined it shows the same Placeholder as the editor when you insert the block:

Screen Shot 2021-10-13 at 13 18 00

Once a Logo has been defined it uses that Logo from there on:

Screen Shot 2021-10-13 at 13 18 19

Types of changes

New feature: Add an example to the site logo block to add a live preview in the inserter

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).

@fabiankaegy fabiankaegy added [Type] Enhancement A suggestion for improvement. [Block] Site Logo Affects the Site Logo Block labels Oct 13, 2021
@fabiankaegy fabiankaegy self-assigned this Oct 13, 2021
Copy link
Contributor

@scruffian scruffian left a comment

Choose a reason for hiding this comment

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

Thanks for this.

@fabiankaegy fabiankaegy merged commit d79e67c into trunk Oct 13, 2021
@fabiankaegy fabiankaegy deleted the feature/add-better-example-to-site-logo-block branch October 13, 2021 15:34
@github-actions github-actions bot added this to the Gutenberg 11.8 milestone Oct 13, 2021
@jasmussen
Copy link
Contributor

Thanks for your work here, and in #35590. One thing to consider when creating previews, is to make the preview itself as useful as possible, considering the purpose of the preview is to showcase the block itself. In the case of the site title, it's good for the viewport to be wide so we ideally avoid the text wrapping onto two lines.

In this case, I wonder if the site logo would have appeared bigger if the viewport width defined had been smaller than 500px?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Site Logo Affects the Site Logo Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants