cagov / ca-design-system-gutenberg-blocks

DEPRECATED: CA Design System Gutenberg blocks for WordPress.
MIT License
4 stars 5 forks source link

1.0.9 #35

Closed chachasikes closed 3 years ago

chachasikes commented 3 years ago
chachasikes commented 3 years ago

@rkojik I tried an experiment with you in mind - implementing Every Layout's "Sidebar" and seeing how well it integrated in a WordPress environment. Learned some things (which probably won't surprise you) - but interesting anyways.:

cc @carterm @aaronhans @kkoryaka

Post launch, let's discuss more.

rkojik commented 3 years ago

@chachasikes awesome job! I'm definitely curious how we integrate (what I believe to be) best practices for front-end development with WordPress. One wouldn't think they conflict re: "there is theoretical CSS and then there is what happens in WP"... but as one of my favorite quotes from Troll Hunters (I watch too many kids shows) states, "don't think, become". I'm eager to deep dive that post launch!

aaronhans commented 3 years ago

@rkojik the problem with wordpress' divergence from frontend best practices is severe. This is just a small part of the list of blocking dependencies being loaded on a page.

Screen Shot 2021-06-24 at 8 36 44 AM

Also when I audited the cdt.ca.gov site I was seeing slow TTFB so the performance budget gets blown even before you begin to struggle with the typical frontend bottleneck. The magnitude of this issue makes the headless approach more appealing. I am working on that already.

rkojik commented 3 years ago

@aaronhans oh no.... look at all those.

chachasikes commented 3 years ago

@rkojik A tiny example which is very common for PHP based CMS's is looking at the inheritance that happens with just an h1 element.

On GISTs, you have one CSS file, and some style declarations.

In an ecosystem (i.e. an open source CMS with a vast sea of plugins) - the theme, overrides, other plugins, WordPress core might all hook into, override, reset, rewrite, re-reset the h1 element on it's way to rendering. Our is touched 36 times through different class specifiers. This is a tiny example, but is multiplied by a full site. This is where design drag happens.

This is why I'm really interested to

Wordpress content template + stylesheets (global, page, content, pattern, block) Headless template + stylesheets (global, page, content, pattern, block)

chachasikes commented 3 years ago

The cruft Aaron is seeing is not yet optimized, but also WordPress - like many applications initially developed in the 2000's provides "everything" --- providing "everything" become a bottleneck on mobile devices.

A lot of PHP shops will cache, optimize, CDN and spend a lot of time removing those extra features to get reasonable performance bumps, but even with that, it's very rare to get down the network requests to be able to get optimal performance scores.