Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Add empty content messages #717

Merged
merged 5 commits into from
Oct 16, 2019
Merged

Conversation

mikejolley
Copy link
Member

Forces the product grid block renderer to return nothing if no products are found so that a message is displayed.

Fixes #686

Screenshots

Edit Post ‹ local wordpress test — WordPress 2019-07-10 16-29-16

After/if WordPress/gutenberg#16512 is merged, we get this instead:

Edit Post ‹ local wordpress test — WordPress 2019-07-10 16-27-25

Blocked by that PR.

How to test the changes in this Pull Request:

  1. Select a category with no products and save
  2. See result

Changelog

Show a message in the editor if no products are found rather than show nothing.

@mikejolley mikejolley added status: blocked The issue is blocked from progressing, waiting for another piece of work to be done. status: needs review labels Jul 10, 2019
@mikejolley mikejolley added this to the Future release milestone Jul 10, 2019
@mikejolley mikejolley self-assigned this Jul 11, 2019
@nerrad
Copy link
Contributor

nerrad commented Aug 6, 2019

@mikejolley I reviewed the blocking pull and added some comments that I think will help move it along. If you want to take a look and I can prioritize reviewing it. I think with a few changes there we can get it merged so that it lands at least in WP 5.3 (otherwise that delays when it will be available for Woo).

@nerrad
Copy link
Contributor

nerrad commented Aug 22, 2019

Linked GB pull has been merged. Still will be some time before we can utilize it (likely won't land in wp core until WordPress 5.3)

@nerrad
Copy link
Contributor

nerrad commented Aug 22, 2019

However, I guess since the enhancement for this pull involves using props, we can still add those props and they would just be ignored on earlier versions of ServerSideRender?

@mikejolley mikejolley requested a review from a team October 16, 2019 12:45
@mikejolley mikejolley modified the milestones: Future release, 2.5 Oct 16, 2019
@mikejolley mikejolley removed the status: blocked The issue is blocked from progressing, waiting for another piece of work to be done. label Oct 16, 2019
@mikejolley mikejolley merged commit d661e06 into master Oct 16, 2019
@mikejolley mikejolley deleted the update/empty-content-messages branch October 16, 2019 13:13
@nerrad nerrad removed the WP 5.3 label Jan 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Products by Category block doesn't show error messages when there are no products in a clean install
2 participants