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

Widgets: Offer option to disable preview or a static placeholder #28671

Closed
draganescu opened this issue Feb 2, 2021 · 3 comments · Fixed by #30889
Closed

Widgets: Offer option to disable preview or a static placeholder #28671

draganescu opened this issue Feb 2, 2021 · 3 comments · Fixed by #30889
Assignees
Labels
Needs Dev Ready for, and needs developer efforts [Type] Enhancement A suggestion for improvement.

Comments

@draganescu
Copy link
Contributor

Some core widgets are only rendered in certain pages, like filters.

They depend on the current page having some products in the loop or some other conditions: for example, Woo's Active Product Filters is only rendered if the shopper has already selected a filter. That means that when they are previewed in the widgets editor, they look empty.

This would mean that we should have a kind of a static placeholder? What would be a nice default for developers and users alike?

Can we offer developers a way to hide the preview button?

@draganescu draganescu added [Type] Enhancement A suggestion for improvement. Needs Design Feedback Needs general design feedback. Needs Technical Feedback Needs testing from a developer perspective. labels Feb 2, 2021
@gziolo gziolo changed the title Offer option to disable preview or a static placeholder Widgets: Offer option to disable preview or a static placeholder Feb 3, 2021
@shaunandrews
Copy link
Contributor

I posted an updated design that I think would resolve this: #26179 (comment)

Legacy Widgets, Take 2

@paaljoachim
Copy link
Contributor

The issue was discussed during a Design triage on slack: https://wordpress.slack.com/archives/C02S78ZAL/p1612888120354200

@noisysocks noisysocks added Needs Dev Ready for, and needs developer efforts and removed Needs Design Feedback Needs general design feedback. Needs Technical Feedback Needs testing from a developer perspective. labels Mar 26, 2021
@noisysocks noisysocks self-assigned this Apr 19, 2021
@noisysocks
Copy link
Member

#30889 will close this and the way that a widget can choose to render a static "Preview is not available." placeholder is by rendering no output in its implementation of WP_Widget::widget().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Dev Ready for, and needs developer efforts [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants