-
Notifications
You must be signed in to change notification settings - Fork 39
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 functionality to turn popups on/off easily. #544
Comments
@danieliser Were you still considering this? Not sure if this is needed or if we could find a better way to communicate the possibility of switching to draft or how it works. |
@fpcorso your call |
Have had several more people ask for the ability to turn popups on or off. The most recent was this feedback in a review: https://wordpress.org/support/topic/easy-to-learn-6/#post-12558241 |
Yea I like thier button, but the draft thing still applies I think. |
@danieliser , while the draft issues you described could potentially be an issue, I haven't seen a better approach. I've noticed quite a few plugins lately use a similar button to BB that is tied to published/draft status so that is becoming quite the norm now. I haven't seen this get asked about as often as some of our other issues but still just enough that we probably want to see if this is something we want to narrow down on to solve or not. For me, I think having a simple on/off switch would make managing popups much more intuitive to the end-user. |
@fpcorso - simple enough to set a new postmeta field and link the button to that. We simply rewrite is_loadable to check that meta value before it processes conditions. Simple enough, just needs an AJAX handler and some JS for the toggle. |
@danieliser , would having another postmeta field to query with add slowdowns to the queries? Would that make things messy for our queries overall? You had mentioned originally that may muck up queries so I thought you were against that strategy. |
@fpcorso Not at all. We have 4 queries max ever. If you use asset caching that goes to 2 queries max. We query for all popups + meta (2 queries), and popup_themes + meta if asset caching is off. Every page load queries all popups published popups. Testing if they should or shouldn't load in the page is handled by conditional processing. If you use object caching like Redis or Memcache for queries, then 0 queries after the first page load and the query cache is primed. So adding another meta field won't hurt anything in terms of performance, especially if its nothing more than |
Had another person ask for this: https://wordpress.org/support/topic/great-easy-to-use-popup-plugin |
Had another person ask for this in a recent customer survey. |
@danieliser Just to recap our conversation on this: You were stating we should have a new post_meta field for the popup being "on" or "active". Do you think it would be too much for admins to check both published and active to ensure a popup is showing? For the actual mechanism, are we going with the on/off switch on the "All Popups" page? Should there also be some mechanism on the edit popup screen? When the popup is published, it should automatically switch to "active" or "on", right? What if the user turned it off and switched to draft and then, published it after making changes? Would we always want to switch to "on" upon publishing the popup? |
@fpcorso - We either are storing a different data point, or just making a new interface for draft/published. But then we have to account for other possible status as well.
|
@danieliser We need to make a decision on whether this is a different post_meta or if it's a better interface for draft/published. In terms of usability, fewer options are always better for use and support. And, keeping it only built on draft/published would require less work to ensure all of our queries and extensions work as expected after the change. Of course, there are several reasons for us to consider going with the new different data point, as you mentioned in previous comments. Which way are you leaning? |
@fpcorso Off the top of my head, there are no queries that would need adjusted to add a new meta point. I think using post_status comes with its own set of potential flaws and drawbacks and will absolutely lead to support issues at some point. Our only major query is to load all published popups and their meta. After that each published popup's conditions are checked, if the non-advanced conditions pass it is So I think using meta is appropriate here and fully controllable.
That effectively makes the toggle a short circuit for is_loadable and essentially the smoothest, most effective place to implement it. Since we already have all the meta loaded, there won't be extra queries or any overhead this way. |
@danieliser Just remembered that we wanted to only show the toggle if the popup is published, which makes sense. Was an easy enough change. But, not sure on what to put in the column when the popup is not published. We probably shouldn't leave it empty or the admin may not know why it's empty. In the image, I tried using |
@fpcorso I love this change. It will actually highlight one potential issue that people overlook when they contact support for "my popup doesn't work". So putting Brilliant. As for the text, I think its pretty spot on. We could maybe make a link below it to "Publish It Now" later if we wanted. |
Possible options:
Draft may not be an option per facebook group comments:
"The problem with using draft is that the inexperienced user doesn't always understand or forgets. Also if a user makes an update, it will switch from draft to published. Announcer https://wordpress.org/plugins/announcer/ has an option to turn an announcement on and off and also shows the status in the list view."
Not sure the viability of adding a true on/off parameter to use as this could muck up queryies
The text was updated successfully, but these errors were encountered: