Automattic / themes

Free WordPress themes made by Automattic for WordPress.org and WordPress.com.
https://themeshaper.com
GNU General Public License v2.0
845 stars 342 forks source link

Spearhead: [Bug] Loading Gutenberg JS on the frontend #7848

Closed sgomes closed 3 weeks ago

sgomes commented 3 weeks ago

Quick summary

The Spearhead theme seems to be loading large amounts of Gutenberg JS on the frontend, which doesn't appear to be necessary.

Steps to reproduce

Open a site using Spearhead and observe the loaded JS resources

What you expected to happen

Gutenberg JS such as blocks/index.min.js should not be included

What actually happened

Gutenberg JS is included

Browser

No response

Context

No response

Platform (Simple, Atomic, or both?)

No response

Other notes

No response

Reproducibility

Consistent

Severity

All

Available workarounds?

No but the platform is still usable

Workaround details

No response

liviopv commented 3 weeks ago

📌 REPRODUCTION RESULTS

📌 FINDINGS/SCREENSHOTS/VIDEO Spearhead demo site:

CleanShot 2024-06-10 at 16 13 34@2x

TT4 Demo for comparison CleanShot 2024-06-10 at 16 17 47@2x

Atomic site with Spearhead CleanShot 2024-06-10 at 16 18 12@2x

📌 ACTIONS

I'm not sure if I'm looking at the correct file, @sgomes, but a version of it is loading on all contexts I tested. In Spearhead on a simple site, it loads from wp-content/plugins/gutenberg-core/v18.5.0-rc.1/build/blocks/index.min.js but on TT4 and Atomic it comes from a different folder /wp-content/plugins/gutenberg-core/v18.4.1/build/interactivity/index.min.js?ver=18.4.1, which might what you're referring to.

Since you have a PR lined up, I'm going to mark this as triaged.