Automattic / gutenberg-ramp

Control conditions under which Gutenberg loads - either from your theme code or from a UI
https://wordpress.org/plugins/gutenberg-ramp/
76 stars 15 forks source link

Disable 'try Gutenberg' banner in wp 4.9.8, if using Ramp #61

Closed dartiss closed 5 years ago

dartiss commented 6 years ago

Suggested by a user on the wp.org support forum.

Do you have plans to have a setting that will disable the “Try Gutenberg” callout that’s slated for WP 4.9.8?

It would seem to make sense to disable the callout by default, since Gutenberg is disabled by default with this plugin. And I LOVE that your default setting is disabling Gutenberg sitewide.

User goes into more details about this, but is basically not installing Gutenberg so the current checks with the banner code will cause it to appear (it checks if Gutenberg is already installed, which is not an automatic assumption for Ramp users).

I've left the support ticket open, so please update the user if there is any progress with this - https://wordpress.org/support/topic/feature-request-disable-try-gutenberg-callout/

dartiss commented 6 years ago

The following code should remove the banner...

remove_action( 'try_gutenberg_panel', 'wp_try_gutenberg_panel' );

pbiron commented 5 years ago

I just released a little plugin that gives site admins/agencies/hosting companies/etc more fine-grained control over who sees the Try Gutenberg callout (more fine-grained that the "shotgun approach" as in the comment above).

In particular, it lets site admins:

As it says in the README:

To prove to myself that showing/hiding the callout need not be an all or nothing proposition, I quickly threw together this little plugin.

I'd be happy to work with you to integrate these use-cases into Ramp...once we get 4.9.8 out the door, of course.

pyronaur commented 5 years ago

The direction that Gutenberg Ramp is aiming at is to eventually allow Gutenberg to be enabled for everyone, so I'm not entirely convinced it's the place for Ramp to disable any notifications at all.

The purpose of Ramp is to allow people to gradually start using Gutenberg. I don't think that removing notifications is going to facilitate that.

I do understand that people might have different workflows and intentions for how the admin UI is supposed to look like for their site. I'm happy that @pbiron made a plugin to control exactly that for people who don't want to write their own conditional to remove the notification through the filter.

We should probably test if the labels make sense though when Gutenberg is enabled through Ramp. Maybe even customize the message to reflect the enabled Ramp settings? For example, what should the message look like if Gutenberg is enabled through Ramp on Posts and Pages but no other post type? cc @maevelander

pbiron commented 5 years ago

The direction that Gutenberg Ramp is aiming at is to eventually allow Gutenberg to be enabled for everyone, so I'm not entirely convinced it's the place for Ramp to disable any notifications at all.

Completely understand. The reason I commented on this ticket is that @pento suggested I do so.

pyronaur commented 5 years ago

Thanks for that! I wasn't aware of that discussion going on about the callout. My response wasn't aimed directly at your comment but as a long coming response to the issue as a whole :)

By the way - have you considered submitting the plugin to .org? I think there is still a little time left until the 4.9.8 release?

pbiron commented 5 years ago

I've thought about it but as of this moment I'm not planning on it. One reason for that is that it doesn't have any specific support for multisite, which I think it should have before putting in the repo:

pyronaur commented 5 years ago

4.9.8 has been out for a while now and we still haven't removed the notification by default, so I think we can leave it as is and close the issue :)

Thanks everyone for participating.