Skip to content

Commit 2eed75f

Browse files
committed
Try optimizing the hero blur
1 parent 1d2ca08 commit 2eed75f

File tree

6 files changed

+189
-118
lines changed

6 files changed

+189
-118
lines changed

public/images/next-image-export-optimizer-hashes.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"/annual-report-1.5ebe2b34.png": "HmbFFbaUL79rvnCKQ-2oRSLETM2FFh5v5dZxwWquuVM=",
5353
"/audience.f60c1c99.jpg": "pqx3E31xAO87mNEBlZKqCTX+LRiPlOuQThWQZf08A4A=",
5454
"/banner.10d4d66b.jpg": "9UJqBQ9RQu2sxDdJ5uaQr3crx2ZXrlOKMAmY82R8ZBA=",
55-
"/blur-bean-cropped.62af4aa2.webp": "rdPhhzi5e+RLv-u0B-uPkp-eCYnyGlO84Yn0zCLLG4c=",
55+
"/-cropped.62af4aa2.webp": "rdPhhzi5e+RLv-u0B-uPkp-eCYnyGlO84Yn0zCLLG4c=",
5656
"/blur-bean.21b930bd.webp": "eTUigN2JSyvccNXMnRwneZJ1YIeNnrVs3klseGSUa7o=",
5757
"/blur-bean.314cdc4a.webp": "YAysN2NZeYYWHNI8cFCabzsTifCknmbp-r+P1LAs1bE=",
5858
"/blur-bean.d5aa6d13.webp": "30xrtHSB6py7q6r2HxdKzm4gt8WoCiWRownamqyf3wM=",
@@ -189,4 +189,4 @@
189189
"/uri.387cb001.jpg": "kSx4huEjQidwIg6bF8UEWLiPACDl0nQ0aqxA2R2LIe0=",
190190
"/whiteboard.60eac8e3.jpg": "NodBqUaO+IanhuPaP9o5jCIe+gSrwyZ9TZ3QUdlWbBg=",
191191
"/workshop.e02e3501.jpg": "D9ON1z6-vKcjxv50gOH+5XS9HTEWUpc4UgIPW5OXHxE="
192-
}
192+
}

src/components/index-page/hero/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ function HeroStripes() {
5757
image={logoBlurred}
5858
className="relative h-full bg-gradient-to-b from-pri-base to-pri-lighter opacity-0 transition-opacity duration-[1.5s] [mask-position:center_12%] [mask-size:110%] data-[loaded=true]:opacity-100 dark:to-pri-base sm:[mask-size:auto_300%] lg:[mask-position:7%_7%] lg:[mask-size:200%]"
5959
style={{
60-
maskImage: `url(${logoBlurred.src})`,
61-
WebkitMaskImage: `url(${logoBlurred.src})`,
60+
maskImage: `var(--src)`,
61+
WebkitMaskImage: `var(--src)`,
6262
maskRepeat: "no-repeat",
6363
WebkitMaskRepeat: "no-repeat",
6464
}}

src/components/index-page/how-it-works/index.tsx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,28 @@ export function HowItWorks() {
2222
const inView = useInView(sectionRef)
2323

2424
return (
25-
<section ref={sectionRef} className="gql-container gql-section xl:py-20">
25+
<section
26+
ref={sectionRef}
27+
className="gql-container gql-section xl:py-20"
28+
// this is mostly for Playwright, we're not getting a hydration warning normally
29+
suppressHydrationWarning
30+
>
2631
<SectionLabel className="mb-6">How it works</SectionLabel>
2732
<h2 className="typography-h2 mb-6 lg:mb-16">A GraphQL Query</h2>
28-
{/* todo: we need to wrap this in a vertical scrollview with max width about 420px as we now use position: absolute for dynamic content */}
2933
<div className="relative">
3034
<ol className="gql-radial-gradient list-none gap-px max-md:bg-gradient-to-r max-md:from-transparent max-md:via-neu-400 max-md:to-transparent lg:grid lg:grid-cols-3">
3135
<HowItWorksListItem text="Describe your data" code={<CodeA />} />
3236
<HowItWorksListItem
37+
inert={inView}
3338
text="Ask for what you want"
34-
icon={<PlayButton />}
39+
icon={<PlayButton disabled={inView} />}
3540
code={<CodeB />}
3641
/>
37-
<HowItWorksListItem text="Get predictable results" code={<CodeC />} />
42+
<HowItWorksListItem
43+
inert={inView}
44+
text="Get predictable results"
45+
code={<CodeC />}
46+
/>
3847
</ol>
3948
{inView && (
4049
<ol

src/components/index-page/how-it-works/play-button.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Button } from "../../../app/conf/_design-system/button"
44
export function PlayButton({
55
className,
66
...props
7-
}: React.HTMLAttributes<HTMLButtonElement>) {
7+
}: React.ButtonHTMLAttributes<HTMLButtonElement>) {
88
return (
99
<Button
1010
variant="tertiary"
@@ -13,11 +13,12 @@ export function PlayButton({
1313
className,
1414
)}
1515
onClick={props.onClick}
16+
disabled={props.disabled}
1617
>
1718
<svg fill="currentColor" viewBox="0 0 24 24" className="size-4">
1819
<path d="M10 20H8V4h2v2h2v3h2v2h2v2h-2v2h-2v3h-2v2z" />
1920
</svg>
20-
<span className="sr-only">Run query</span>
21+
{!props.disabled && <span className="sr-only">Run query</span>}
2122
</Button>
2223
)
2324
}

src/components/interactive-code-block/mini-graphiQL.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,10 @@ export default class MiniGraphiQL extends Component<
9494
)
9595

9696
return (
97-
<div className="[&:not(:first-child)]:_mt-6 grid grid-cols-2 border border-neu-200 text-sm dark:border-neu-50">
97+
<div
98+
className="[&:not(:first-child)]:_mt-6 grid grid-cols-2 border border-neu-200 text-sm dark:border-neu-50"
99+
suppressHydrationWarning
100+
>
98101
{Object.keys(this.state.variableToType).length > 0 ? (
99102
<div className="flex flex-col">
100103
{editor}

0 commit comments

Comments
 (0)