Skip to content
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

feat(cxl-ui): cxl-app-layout layout={hp} hero section #268

Open
wants to merge 1 commit into
base: leho-optimize-cxl-app-layout-stories
Choose a base branch
from

Conversation

paulkirspuu
Copy link

@paulkirspuu paulkirspuu requested review from lkraav and pawelkmpt March 22, 2023 10:05
@github-actions
Copy link

github-actions bot commented Mar 22, 2023

size-limit report 📦

Path Size
packages/cxl-ui/pkg/dist-web/cxl-ui.js 33.69 KB (+0.37% 🔺)
packages/cxl-ui/pkg/dist-web/cxl-ui-jwplayer.js 11.87 KB (0%)
packages/cxl-ui/pkg/dist-web/cxl-ui-playbooks.js 24.9 KB (0%)
packages/cxl-ui/pkg/dist-web/vendor.js 125.63 KB (+0.03% 🔺)
packages/cxl-ui/pkg/dist-web/cxl-ui-jwplayer.js, packages/cxl-ui/pkg/dist-web/cxl-ui-playbooks.js, packages/cxl-ui/pkg/dist-web/cxl-ui.js, packages/cxl-ui/pkg/dist-web/manifest.js, packages/cxl-ui/pkg/dist-web/unresolved.js, packages/cxl-ui/pkg/dist-web/vendor.js 197.25 KB (+0.08% 🔺)

@paulkirspuu
Copy link
Author

Would be useful if we'd get it to render Gutenberg blocks like WP does.

Comment on lines 28 to 45
<div class="is-layout-flex wp-container-3 wp-block-columns">
<div class="is-layout-flow wp-block-column">
<h1 class="entry-title has-white-color has-text-color" id="h-top-1-marketersteach-you-what-they-know"><strong>Top 1% marketers</strong> teach you what they know.</h1>
<h3 class="has-white-color has-text-color" id="h-hand-picked-instructors-peer-vetted-forexpertise-and-success-record">Hand picked instructors peer vetted for expertise and success record.</h3>
<p class="has-white-color has-text-color">Expert online marketing courses on customer acquisition, brand &amp; product marketing, conversion optimization, and digital analytics.</p>
<p><vaadin-button theme="primary large" style="cursor: pointer; padding-left: var(--lumo-space-s);" onclick="window.location.href='https://cxl.com/institute/pricing/'" tabindex="0" role="button"><vaadin-icon slot="prefix" icon="lumo:angle-right"></vaadin-icon>Start 7-day trial for $1</vaadin-button></p>
<p class="has-white-color has-text-color has-small-font-size">Starting from $89/month.</p>
</div>
<div class="is-layout-flow wp-block-column">
<div class="wp-block-image">
<figure class="alignleft size-large">
<img decoding="async" src="https://cxl.com/institute/wp-content/uploads/2023/03/Carlos_Hero_Picture_BW-_kjid_Circle_01.png" alt="" data-src="https://cxl.com/institute/wp-content/uploads/2023/03/Carlos_Hero_Picture_BW-_kjid_Circle_01.png" class="lazyloaded"><noscript><img decoding="async" src="https://cxl.com/institute/wp-content/uploads/2023/03/Carlos_Hero_Picture_BW-_kjid_Circle_01.png" alt="" data-eio="l" /></noscript>
</figure>
</div>
<p class="has-white-color has-text-color has-small-font-size">“CXL influenced a quantum leap in my career. After 10 months of study, I was hired alongside some of the most brilliant minds in experimentation to work with leading brands from all over the world.”</p>
<p class="has-white-color has-text-color has-small-font-size"><strong>Carlos Trujillo</strong>,<br>Experimentation<br>Strategist @ Speero</p>
</div>
</div>
Copy link

@lkraav lkraav Mar 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think WP Columns block structure translates to Pure grid pretty well - same div.pure-g > div.column > content?

This seems to be the time to try to filter Columns block output, and avoid bringing in additional complexity with WP core CSS as "must-have".

@paulkirspuu paulkirspuu force-pushed the paul/feat/cxl-app-layout-hp branch from b90401a to 9e78e32 Compare March 27, 2023 10:36
@paulkirspuu paulkirspuu changed the base branch from master to leho-optimize-cxl-app-layout-stories March 27, 2023 10:37
@@ -1,5 +1,6 @@
import { html, nothing } from 'lit';
import { CXLAppLayout1cContent } from './cxl-app-layout/layout=1c.story';
import { CXLAppLayout1cHPContent } from './cxl-app-layout/layout=1c-hp.story';
Copy link

@lkraav lkraav Mar 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we might want to follow WP terminology, from is_front_page(). I'd also spell it out, "hp / fp" is just too cryptic.

https://github.com/WordPress/wordpress-develop/blob/6b7504f2ae5154c6d36753d3932019add0c56497/src/wp-includes/query.php#L444-L475


export const CXLSectionHPHero = {
args: {
backgroundColor: 'var(--lumo-shade)',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This token alone kills all text visibility? Dark background, if that's the design, requires a bit more work than this.

Example https://cxl.com/institute/programs/conversion-optimization/

But indeed, this implementation is currently not in CXL UI. Maybe time to bring it?

Comment on lines +25 to +46
<div class="is-layout-flex wp-container-3 wp-block-columns">
<div class="is-layout-flow wp-block-column">
<h1 class="entry-title has-white-color has-text-color" id="h-top-1-marketersteach-you-what-they-know"><strong>Top 1% marketers</strong> teach you what they know.</h1>
<h3 class="has-white-color has-text-color" id="h-hand-picked-instructors-peer-vetted-forexpertise-and-success-record">Hand picked instructors peer vetted for expertise and success record.</h3>
<p class="has-white-color has-text-color">Expert online marketing courses on customer acquisition, brand &amp; product marketing, conversion optimization, and digital analytics.</p>
<p>
<vaadin-button theme="primary large">
<vaadin-icon slot="prefix" icon="lumo:angle-right"></vaadin-icon>Start 7-day trial for $1
</vaadin-button>
</p>
<p class="has-white-color has-text-color has-small-font-size">Starting from $89/month.</p>
</div>
<div class="is-layout-flow wp-block-column">
<div class="wp-block-image">
<figure class="alignleft size-large">
<img decoding="async" src="https://cxl.com/institute/wp-content/uploads/2023/03/Carlos_Hero_Picture_BW-_kjid_Circle_01.png" alt="" data-src="https://cxl.com/institute/wp-content/uploads/2023/03/Carlos_Hero_Picture_BW-_kjid_Circle_01.png" class="lazyloaded"><noscript><img decoding="async" src="https://cxl.com/institute/wp-content/uploads/2023/03/Carlos_Hero_Picture_BW-_kjid_Circle_01.png" alt="" data-eio="l" /></noscript>
</figure>
</div>
<p class="has-white-color has-text-color has-small-font-size">“CXL influenced a quantum leap in my career. After 10 months of study, I was hired alongside some of the most brilliant minds in experimentation to work with leading brands from all over the world.”</p>
<p class="has-white-color has-text-color has-small-font-size"><strong>Carlos Trujillo</strong>,<br>Experimentation<br>Strategist @ Speero</p>
</div>
</div>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Column system is the primary remaining challenge?
Can you post a TODO checklist in PR opener as you see it?

Quick experiment with loading BE CSS rendered quite well

diff --git a/packages/storybook/.storybook/preview-head.html b/packages/storybook/.storybook/preview-head.html
index 699736e5..3e581715 100644
--- a/packages/storybook/.storybook/preview-head.html
+++ b/packages/storybook/.storybook/preview-head.html
@@ -4,3 +4,4 @@
   delete Document.prototype.adoptedStyleSheets;
 </script>
 <link rel="stylesheet" id="cxl-font-css"  href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i,900|Libre+Baskerville:400,400i,700" type="text/css" media="all">
+<link rel="stylesheet" id="wp-block-library-css" href="https://cxl.com/institute/wp-includes/css/dist/block-library/style.min.css?ver=6.1.1" type="text/css" media="all">

(Requires SB full restart.)

❗ I looked at unminified https://cxl.com/institute/wp-includes/css/dist/block-library/style.css?ver=6.1.1
It has a metric ton of crap. I think we need to just take frontend block styling over in our Storybook, as we don't really use that many blocks.

❗ Beyond general BE styling, specifically for Columns, we still have Pure CSS vs Block Editor. Among other things, breakpoints are different.

✔️ I will attempt a mu-plugin in the spirit of cxl-section. Or it might be these integrations should migrate into wp-theme-lib CXL UI integration, that actually makes more sense.

Anything else you need to land this front page project?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants