Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.42k stars 1.99k forks source link

Tag Cloud Block: Outline style isn't displayed on live site (Simple Sites) #60347

Open supernovia opened 2 years ago

supernovia commented 2 years ago

Quick summary

The tag cloud block offers an Outline option. Selecting that option displays the correct style in the editor (albeit with the theme's default colors). But the live site ignores that style:

Screenshot of the editor Screenshot of the live site

Steps to reproduce

  1. Use a site that has some posts with tags
  2. Add a tag cloud block
  3. Select the Outline option
  4. Save & check the live site

What you expected to happen

The tag cloud should display outlined buttons like it does in the editor

What actually happened

The tag cloud has a default display (some big and small text, etc)

Context

Customer report here: https://wordpress.com/forums/topic/are-theme-defined-additional-css-classes-disabled-on-the-free-version/

I used Live Preview in the customizer to test several themes including Blockbase, Varia, Seedlet, and Twenty Ninetine; the issue is present in all of these

Simple, Atomic or both?

Simple

Theme-specific issue?

no

Browser, operating system and other notes

No response

Reproducibility

No response

Severity

No response

Available workarounds?

No response

Workaround details

No response

sashastone commented 2 years ago

A customer came into chat today with same issue. I tested on a simple site, and had the same result that @supernovia is reporting. Here's a screencast: https://d.pr/v/dkQ941

Related ticket: 4728907-zen

Robertght commented 2 years ago

I tested this with various themes(most of themes were Twenty 16-21, but I can see it on Spearhead and Radcliffe 2)

Robertght commented 2 years ago

Update: this is not an issue on self-hosted sites.

cc @chad1008 for further debugging

chad1008 commented 2 years ago

Thanks for the ping. It looks like the new Outline style was introduced in Gutenberg 12.4.0.

This doesn't look like a core Gutenberg issue, I can also only reproduce it on WPCOM. From my tests, the new outline style has never worked for us, it behaves the same way on my sandbox if I roll back to 12.4.0: the style shows as expected in the editor, but not on the front end.

It looks like something is preventing us from enqueueing the block's front-end styles. Digging in a bit, on a self-hosted site, the block's outline styles are added in the header during page load, along with similar CSS declarations for other blocks with different styles.

I notice on WPCOM those other blocks are also missing their styles in the header, so I suspect we just load them differently here on WPCOM, and need to update that to account for the new style of the tag cloud block.

@fullofcaffeine, does that sound right, and if so do you know how we go about applying block specific styles to the front end on WPCOM?

Robertght commented 2 years ago

5221907-zen