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

Post featured image: add example of the block #63011

Merged
merged 4 commits into from
Jul 11, 2024

Conversation

MaggieCabrera
Copy link
Contributor

What?

Add an example to the core/post-featured-image block.

Part of #30029

Why?

Because it was showing empty before

How?

By defining a viewport width size for the example

Testing Instructions

Create a post and add a featured image to it.
Open the block inserter and search for the featured image block, hover over it and you'll see the example. It should show the current post's featured image.

Testing Instructions for Keyboard

Screenshots or screencast

Screenshot 2024-07-01 at 12 13 24

@MaggieCabrera MaggieCabrera requested a review from ajitbohra as a code owner July 1, 2024 10:18
Copy link

github-actions bot commented Jul 1, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: MaggieCabrera <onemaggie@git.wordpress.org>
Co-authored-by: jameskoster <jameskoster@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@MaggieCabrera
Copy link
Contributor Author

This one is showing empty on global syles:

Screenshot 2024-07-01 at 12 17 44

@MaggieCabrera MaggieCabrera self-assigned this Jul 1, 2024
@MaggieCabrera MaggieCabrera added [Type] Enhancement A suggestion for improvement. [Block] Post Featured Image Affects the Post Featured Image Block labels Jul 1, 2024
Copy link

github-actions bot commented Jul 4, 2024

Flaky tests detected in bb18747.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9796999474
📝 Reported issues:

@MaggieCabrera
Copy link
Contributor Author

This PR needs #63177 to land for the GS previews to work:

GS Inserter
Screenshot 2024-07-05 at 12 31 17 Screenshot 2024-07-05 at 12 32 34

Copy link
Contributor

@jameskoster jameskoster left a comment

Choose a reason for hiding this comment

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

The preview is a bit lacklustre when there's no context, but that's a separate issue.

@MaggieCabrera MaggieCabrera force-pushed the add-featured-image-preview branch from 48deac9 to a338979 Compare July 11, 2024 15:34
@MaggieCabrera MaggieCabrera merged commit a4e042f into trunk Jul 11, 2024
60 checks passed
@MaggieCabrera MaggieCabrera deleted the add-featured-image-preview branch July 11, 2024 17:06
@github-actions github-actions bot added this to the Gutenberg 18.9 milestone Jul 11, 2024
carstingaxion pushed a commit to carstingaxion/gutenberg that referenced this pull request Jul 18, 2024
* add featured image block preview

* show the preview on Global Styles

* Update packages/block-library/src/post-featured-image/block.json

* removed forced size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Featured Image Affects the Post Featured Image Block [Type] Enhancement A suggestion for improvement.
Projects
Development

Successfully merging this pull request may close these issues.

2 participants