Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
260 commits
Select commit Hold shift + click to select a range
4161131
Comment out the banner for now
hasparus Jul 7, 2025
b9025c6
Add logos of companies using GraphQL
hasparus Jul 7, 2025
c58a3e0
Rename gql-conf-section and gql-conf-container
hasparus Jul 7, 2025
21d7e83
Add missing pointer-events-none to navbar
hasparus Jul 7, 2025
9e47170
Lay out the new TrustedBy section
hasparus Jul 7, 2025
2940cc1
Add a divider between logos
hasparus Jul 7, 2025
69d2bf9
Tweak the logos for mobile and dark mode
hasparus Jul 7, 2025
2614344
Tweak Trusted By section styles
hasparus Jul 11, 2025
9209102
Change index page background color
hasparus Jul 11, 2025
ab2fd03
Restyle how-it-works section
hasparus Jul 11, 2025
87cd293
Improve mobile styles in HowItWorks
hasparus Jul 11, 2025
c4dacbc
Remove external link arrow from Spec link in Navbar
hasparus Jul 14, 2025
00526da
Draft Proven Solution section
hasparus Jul 14, 2025
a0f0cd4
Use proper blur blob (wrong stripes colors tho)
hasparus Jul 14, 2025
bb9855c
Tweak navbar blur
hasparus Jul 15, 2025
e24421d
Fix Proven Solution mobile styles
hasparus Jul 15, 2025
4ef3cf6
Tweak paddings
hasparus Jul 15, 2025
0ee484f
Tweak opacity
hasparus Jul 15, 2025
102bba7
Add a TODO
hasparus Jul 15, 2025
9f0dc99
Add Five Pillars section
hasparus Jul 16, 2025
18b5d86
Tweak styles
hasparus Jul 16, 2025
032823d
Add icons, tweak the medium viewport styles
hasparus Jul 17, 2025
e61f0c5
Rename a variable
hasparus Jul 17, 2025
c5714a7
Add Powered by the Community card
hasparus Jul 17, 2025
828d268
Add GraphQL Advantages section
hasparus Jul 19, 2025
8466f87
Add Precision figure
hasparus Jul 21, 2025
3567664
WIP
hasparus Jul 21, 2025
578ddf3
Eject Pre component
hasparus Jul 21, 2025
fbfd11c
Tweak colors, fix bugs
hasparus Jul 21, 2025
1e3f608
Change colors based on design's feedback
hasparus Jul 22, 2025
925a1eb
Add OptimizationFigure
hasparus Jul 22, 2025
0ae00d3
wip
hasparus Jul 23, 2025
11bb166
Add extra padding
hasparus Jul 23, 2025
84604d8
Improve the landing
hasparus Jul 23, 2025
22b82e0
wip
hasparus Jul 24, 2025
d1d7b60
Scroll in Consistency figure
hasparus Jul 24, 2025
65a6499
Tweak colors
hasparus Jul 24, 2025
cb5a75d
Remove paddings on narrow mobiles
hasparus Jul 24, 2025
3594020
Add Integration figure, improve padding
hasparus Jul 24, 2025
6f0cd8c
Fix the width for mobiles
hasparus Jul 24, 2025
a6375a7
Unify line height in Precision section
hasparus Jul 24, 2025
f363ed6
Format
hasparus Jul 24, 2025
eaf8469
Add Quotes From Industry section
hasparus Jul 25, 2025
362b8b2
Add Join the Community section
hasparus Jul 27, 2025
6922d43
wip
hasparus Jul 27, 2025
2ac67e6
Remove old Bring Your Own Code version, tweak styles
hasparus Jul 27, 2025
8dfdbf8
Tweak the width of the arrow box
hasparus Jul 27, 2025
4682263
Fix type error
hasparus Jul 27, 2025
6535656
Hide "Join" on small screens
hasparus Jul 28, 2025
3be9a8a
wip
hasparus Jul 28, 2025
5eb7c77
WIP
hasparus Jul 28, 2025
daab916
Add Data Colocation section
hasparus Jul 28, 2025
d898daa
Add .gql-all-anchors-focusable
hasparus Jul 28, 2025
62eae77
Unify focus styles
hasparus Jul 28, 2025
3fa2a43
Format
hasparus Jul 28, 2025
f2269f8
Mark sectors
hasparus Jul 29, 2025
5c10649
wip
hasparus Jul 29, 2025
4887f70
Count curlies
hasparus Jul 29, 2025
d52eeed
wip
hasparus Jul 30, 2025
425a13a
wip
hasparus Jul 31, 2025
f26d592
Add missing Webkit prefixes for older Chrome.
hasparus Jul 31, 2025
0c4ea61
wip
hasparus Jul 31, 2025
39ddc6a
simplify
hasparus Jul 31, 2025
abb1b30
wip
hasparus Jul 31, 2025
3e13f54
wip
hasparus Jul 31, 2025
b620c29
Animate wires
hasparus Jul 31, 2025
668991d
Add a TODO comment
hasparus Jul 31, 2025
5887575
Bugfix mobile Data Colocation section
hasparus Aug 1, 2025
a4b08a9
Remove redundant comment
hasparus Aug 1, 2025
8b927d9
Make the step transition nice
hasparus Aug 1, 2025
7c9dcb6
wip
hasparus Aug 1, 2025
0b62b46
wip
hasparus Aug 1, 2025
65d09f2
Okay, this is pretty good
hasparus Aug 1, 2025
8655478
Tweak styles
hasparus Aug 1, 2025
b7ac078
Change gql keyword color
hasparus Aug 1, 2025
90c4f73
Update Search input and Kbd styles
hasparus Aug 2, 2025
309a4f4
Run format
hasparus Aug 2, 2025
4764b3f
Revert to old footer links, simplify the code
hasparus Aug 3, 2025
7746fef
Tweak the navbar link styles
hasparus Aug 3, 2025
308e1a5
Polish the footer links
hasparus Aug 3, 2025
7d1a444
Improve data allocation layout for tablets
hasparus Aug 3, 2025
353acab
Highlight query
hasparus Aug 3, 2025
2ae8782
wip (transition between 2 and 3 still bad)
hasparus Aug 3, 2025
67ca7c8
wip
hasparus Aug 3, 2025
d9945d8
Fix Safari
hasparus Aug 3, 2025
8978300
Rotate queries in X axis
hasparus Aug 4, 2025
5a29f2b
Fix styles
hasparus Aug 4, 2025
960a8be
Make the What is GraphQL illustration taller on mobiles
hasparus Aug 4, 2025
0f9e11d
Fix sponsor logos on Safari
hasparus Aug 4, 2025
a47623f
Fix social icon colors if user localStorage color scheme doesn't matc…
hasparus Aug 4, 2025
29eff63
Fix double spins (again)
hasparus Aug 4, 2025
5ed6b36
Disable overscroll-y in Safari to make the hero look less weird
hasparus Aug 4, 2025
23f3320
Fix Nicolai's pic, remove scroll-snap
hasparus Aug 4, 2025
01af07b
Add shrink-0 to fix Safari
hasparus Aug 4, 2025
8fb4feb
Format
hasparus Aug 4, 2025
e45c502
Tweak mobile styles
hasparus Aug 5, 2025
54c1d40
Fix lint error (bad class)
hasparus Aug 5, 2025
a6c237e
Add a subtle background to Hero
hasparus Aug 5, 2025
30b8e3e
Update copy and add shrink-0
hasparus Aug 5, 2025
15b3bca
Speed up the animation by 2x
hasparus Aug 5, 2025
6aa5253
Bump the stroke width
hasparus Aug 5, 2025
7d79c20
Add serve:build script
hasparus Aug 5, 2025
5b55dde
Change h4 to h3 to fix the order
hasparus Aug 5, 2025
a09c97d
Add aria-label to company logos
hasparus Aug 5, 2025
cc19e84
Add fetchPriority to ImageLoaded and use it in Hero
hasparus Aug 5, 2025
7690281
Move hero to a directory
hasparus Aug 5, 2025
442e2c8
Add aria-label to social icons
hasparus Aug 5, 2025
641adb6
Add aria-label, change blur logo to webp
hasparus Aug 5, 2025
15b6b1a
Add description
hasparus Aug 5, 2025
e50c521
Add longer texts with sr-only
hasparus Aug 5, 2025
64e2b34
Inherit tabIndex in Pre
hasparus Aug 5, 2025
8ac3b92
Run image export optimizer
hasparus Aug 6, 2025
7da99eb
post-audit improvements
hasparus Aug 6, 2025
422ea02
Add fetchpriority=low
hasparus Aug 6, 2025
462bb4a
Add fetchPriority=low to testimonials images
hasparus Aug 6, 2025
9e3e27d
Add bundle analyzer
hasparus Aug 6, 2025
9855c27
Add meta description
hasparus Aug 6, 2025
83b6e74
Remove redundant markdown parser code
hasparus Aug 6, 2025
0a0b629
Add Playwright
hasparus Aug 6, 2025
de8dec5
Add tests for MiniGraphiQL
hasparus Aug 6, 2025
63a865f
Move Playwright to optional dependencies
hasparus Aug 6, 2025
5a6cab2
Fix links
hasparus Aug 6, 2025
9a4a443
Actually, these redirects make sense
hasparus Aug 6, 2025
10f0bc5
Update lockfile
hasparus Aug 6, 2025
2c31af7
add Curtain
hasparus Aug 7, 2025
43b6f1b
Fix ProductivityFigure
hasparus Aug 8, 2025
4dde9f4
wip
hasparus Aug 8, 2025
56c8268
wip
hasparus Aug 8, 2025
48352a0
Add UseCases
hasparus Aug 8, 2025
89ce26f
Improve DataColocation on very small phones
hasparus Aug 8, 2025
8338eab
Tweak mobile UI
hasparus Aug 8, 2025
cbcd43d
Iterate on wording
hasparus Aug 8, 2025
b3a2ca4
Use dynamic for MiniGraphiQL
hasparus Aug 8, 2025
b6565eb
Add missing role tab
hasparus Aug 8, 2025
3ec1ce6
Fix roles not contained
hasparus Aug 8, 2025
3ac5c7d
Add aria-hidden to video
hasparus Aug 8, 2025
6ddbfff
Add link rel=preload to Hero
hasparus Aug 8, 2025
abe86b2
Fix type error
hasparus Aug 8, 2025
9e3fbb4
Fight aria-role, get rid of world wrap button
hasparus Aug 8, 2025
581b235
Remove aria-selected fro mobile tab
hasparus Aug 8, 2025
9a0be64
Add wide browserslist to package.json
hasparus Aug 11, 2025
9672e37
Fix indentation in docs-validation.yml
hasparus Aug 11, 2025
b21fbf5
Format
hasparus Aug 11, 2025
b607bad
Format
hasparus Aug 11, 2025
692cf1a
Switch out @theguild/remark-mermaid to for rehype-mermaid
hasparus Aug 11, 2025
ec606ec
Expose Heading hooks from nextra-theme-docs
hasparus Aug 11, 2025
14e569f
Customize MDX links and headings
hasparus Aug 11, 2025
f180b30
Support Tailwind text opacity in typography-link
hasparus Aug 11, 2025
34cd0b6
fixup! Expose Heading hooks from nextra-theme-docs
hasparus Aug 11, 2025
4d28812
fixup! Expose Heading hooks from nextra-theme-docs
hasparus Aug 11, 2025
a6380af
Style Mermaid charts with CSS Custom Properties
hasparus Aug 11, 2025
af374b0
Fix search styles
hasparus Aug 11, 2025
a4e9c14
install Chromium Headless Shell in builds
hasparus Aug 11, 2025
238132e
Install libnspr4 and libgbm1 in builds
hasparus Aug 12, 2025
26b9a1f
Update lockfile
hasparus Aug 12, 2025
3bc9781
patch mermaid-isomorphic
hasparus Aug 12, 2025
32b5f77
Patch again
hasparus Aug 12, 2025
ce9beaf
Update flowchart padding
hasparus Aug 12, 2025
062fd96
Remove old comment
hasparus Aug 12, 2025
2755dfe
Remove duplicate border
hasparus Aug 13, 2025
6c8e45e
Merge pull request #28 from hasparus/new-landing--hero
hasparus Aug 13, 2025
f9132e7
Merge pull request #29 from hasparus/new-landing--navbar
hasparus Aug 13, 2025
49720e7
Merge pull request #30 from hasparus/new-landing--trusted-by
hasparus Aug 13, 2025
f34c76d
Merge pull request #31 from hasparus/new-landing--a-graphql-query
hasparus Aug 13, 2025
3460580
Merge pull request #32 from hasparus/new-landing--a-proven-solution
hasparus Aug 13, 2025
41adc6d
Merge pull request #33 from hasparus/new-landing--five-pillars
hasparus Aug 13, 2025
91bfc52
Merge pull request #34 from hasparus/new-landing--powered-by-community
hasparus Aug 13, 2025
af82b64
Merge pull request #35 from hasparus/new-landing--graphql-advantages
hasparus Aug 13, 2025
cf2baad
Merge pull request #36 from hasparus/new-landing--quotes-from-the-ind…
hasparus Aug 13, 2025
07f549e
Merge pull request #37 from hasparus/new-landing--footer
hasparus Aug 13, 2025
b3fe6f8
Merge pull request #38 from hasparus/new-landing--data-colocation
hasparus Aug 13, 2025
f76639c
Merge pull request #39 from hasparus/new-landing--what-is-graphql
hasparus Aug 13, 2025
582aaa4
Merge pull request #40 from hasparus/new-landing--fixes
hasparus Aug 13, 2025
6174fd4
Merge pull request #41 from hasparus/new-landing--docs-tweaks
hasparus Aug 13, 2025
b029d64
Merge with upstream
hasparus Aug 13, 2025
f70d624
Clarify GraphQL works at "any" scale
hasparus Aug 16, 2025
fbb263d
validated queries -> validated requests
hasparus Aug 16, 2025
f89c76e
new landing — vertical diagram (#43)
hasparus Aug 18, 2025
89f8413
Merge remote-tracking branch 'upstream/source' into source
hasparus Aug 18, 2025
06b6bbc
*the* GraphQL spec
hasparus Aug 19, 2025
82d2526
Render MiniGraphiQL with `graphiql` string in node.meta
hasparus Aug 21, 2025
9adbb19
Don't validate in Marked: not its responsibility
hasparus Aug 21, 2025
68ec657
Change interactive code snippet colors
hasparus Aug 21, 2025
994750c
Remove global .miniGraphiQL class
hasparus Aug 21, 2025
66d6d3d
Refactor MiniGraphiQL to separate files
hasparus Aug 21, 2025
c766116
Add a TODO comment
hasparus Aug 21, 2025
4c68241
Run Playwright on CI
hasparus Aug 21, 2025
fad4156
Change "Reduce dependencies" to "Reduce communication overhead"
hasparus Aug 21, 2025
dd79e8a
Merge remote-tracking branch 'upstream/source' into HEAD
hasparus Aug 21, 2025
e0ea092
Merge commit 'dd79e8a' into source
hasparus Aug 21, 2025
f56c655
new landing — try it out link (#44)
hasparus Aug 21, 2025
744a6b1
wip
hasparus Aug 22, 2025
c6568d8
color codemirrors properly
hasparus Aug 22, 2025
4e6d147
Style codemirrors properly
hasparus Aug 22, 2025
23a2db9
Ignore Lucide in autoImport
hasparus Aug 22, 2025
6aa124e
Add scroll-into-view-if-needed
hasparus Aug 22, 2025
9fb0acf
Eject Sidebar from Nextra
hasparus Aug 22, 2025
3c6c5e1
Replace Nextra MDX Wrapper and restyle TOC
hasparus Aug 24, 2025
629037c
Fix type error in a patch
hasparus Aug 24, 2025
d66fb51
Merge pull request #45 from hasparus/learn--restyled-left-sidebar
hasparus Aug 26, 2025
a6b0a28
Add Matteo's quote
hasparus Aug 27, 2025
cc7cea7
Fix a bad link
hasparus Aug 27, 2025
ff14a84
Update src/components/index-page/use-cases/index.tsx
hasparus Aug 27, 2025
8f83909
Update src/components/index-page/powered-by-community.tsx
hasparus Aug 27, 2025
a12b449
Update src/components/index-page/trusted-by/index.tsx
hasparus Aug 27, 2025
6ef2401
Tweak the AI-powered app description
hasparus Aug 27, 2025
c9dc890
Add Uri's quote
hasparus Aug 28, 2025
1c6507a
Use shorter copy in Hero
hasparus Aug 29, 2025
534f71a
Merge remote-tracking branch 'upstream/source' into source
hasparus Aug 29, 2025
105c6e9
format
hasparus Aug 29, 2025
9d35079
Add Benjie's quote
hasparus Aug 29, 2025
6831f65
Upgrade pnpm from 9.15.9 to 10.15.0
hasparus Aug 29, 2025
f155b2f
Update 2025 conference schedule and speaker details
hasparus Aug 29, 2025
584cdc4
Improve syntax highlighting for comments and diffs
hasparus Aug 29, 2025
40d8c12
Remove focus outline
hasparus Aug 29, 2025
f94ddd3
Extract CodeBlockLabel
hasparus Aug 29, 2025
6b1b3fa
Remove unused marked dependency
hasparus Aug 29, 2025
5e3a31e
Rename `marked` to `interactive-code-block`
hasparus Aug 29, 2025
fe79931
Update codemirror styles
hasparus Aug 29, 2025
e2c1fa0
Merge remote-tracking branch 'origin/source' into landing--try-it-now
hasparus Aug 29, 2025
f69ad01
Allow running esbuild builds
hasparus Aug 29, 2025
bc98a9e
Remove duplicate image
hasparus Aug 29, 2025
590baf5
Shorten Benjie's quote even more
hasparus Aug 29, 2025
386df07
Change ! to .
hasparus Aug 29, 2025
122e5c5
Format
hasparus Aug 29, 2025
b10178a
Change syntax theme names to avoid a bug
hasparus Aug 30, 2025
55b3e0c
Fix heights and properly chain handlers
hasparus Aug 30, 2025
4ddcc26
Fix tests for new editor
hasparus Aug 30, 2025
2c6d0d7
Merge branch 'source' into learn--interactive-code-blocks
hasparus Aug 30, 2025
812b8b4
Run Playwright on CI
hasparus Aug 30, 2025
aaf5a12
Build out an interactive editor for the landing
hasparus Aug 30, 2025
8dda031
Remove unused import
hasparus Aug 30, 2025
bf48484
Change a comment
hasparus Aug 30, 2025
806c78e
Unify line heights
hasparus Sep 1, 2025
3861147
learn — new interactive code blocks (#47)
hasparus Sep 1, 2025
234587f
Remove duplicate t.separator
hasparus Sep 1, 2025
21fb521
Merge branch 'source' into landing--interactive-editor-on-landing
hasparus Sep 1, 2025
9f7efdd
Add a schema
hasparus Sep 2, 2025
cb0ff90
Fix border on large screens
hasparus Sep 2, 2025
0db7923
Remove background in dark mode
hasparus Sep 2, 2025
af69f2f
Wrap dynamic import in a thunk (-.-)
hasparus Sep 2, 2025
d83b57a
Run the fresh query (same as in docs)
hasparus Sep 2, 2025
319f8c4
Add screen-reader-only text to PlayButton
hasparus Sep 2, 2025
7817cab
Vainly extract data
hasparus Sep 2, 2025
f61c8a9
Add a comment
hasparus Sep 2, 2025
82ee714
Merge branch 'source' into landing--interactive-editor-on-landing
hasparus Sep 5, 2025
1d2ca08
improve the interactive-editor
hasparus Sep 5, 2025
2eed75f
Try optimizing the hero blur
hasparus Sep 5, 2025
fc1a718
Add loading=lazy to testimonial images
hasparus Sep 5, 2025
403c96a
Remove `inert`
hasparus Sep 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "module",
"repository": "graphql/graphql.github.io website",
"private": true,
"packageManager": "[email protected].1+sha512.34e538c329b5553014ca8e8f4535997f96180a1d0f614339357449935350d924e22f8614682191264ec33d1462ac21561aff97f6bb18065351c162c7e8f6de67",
"packageManager": "[email protected].0",
"scripts": {
"analyze": "ANALYZE=true next build",
"build": "next build && next-image-export-optimizer",
Expand Down
39 changes: 27 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions public/images/next-image-export-optimizer-hashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"/annual-report-1.5ebe2b34.png": "HmbFFbaUL79rvnCKQ-2oRSLETM2FFh5v5dZxwWquuVM=",
"/audience.f60c1c99.jpg": "pqx3E31xAO87mNEBlZKqCTX+LRiPlOuQThWQZf08A4A=",
"/banner.10d4d66b.jpg": "9UJqBQ9RQu2sxDdJ5uaQr3crx2ZXrlOKMAmY82R8ZBA=",
"/blur-bean-cropped.62af4aa2.webp": "rdPhhzi5e+RLv-u0B-uPkp-eCYnyGlO84Yn0zCLLG4c=",
"/-cropped.62af4aa2.webp": "rdPhhzi5e+RLv-u0B-uPkp-eCYnyGlO84Yn0zCLLG4c=",
"/blur-bean.21b930bd.webp": "eTUigN2JSyvccNXMnRwneZJ1YIeNnrVs3klseGSUa7o=",
"/blur-bean.314cdc4a.webp": "YAysN2NZeYYWHNI8cFCabzsTifCknmbp-r+P1LAs1bE=",
"/blur-bean.d5aa6d13.webp": "30xrtHSB6py7q6r2HxdKzm4gt8WoCiWRownamqyf3wM=",
Expand Down Expand Up @@ -189,4 +189,4 @@
"/uri.387cb001.jpg": "kSx4huEjQidwIg6bF8UEWLiPACDl0nQ0aqxA2R2LIe0=",
"/whiteboard.60eac8e3.jpg": "NodBqUaO+IanhuPaP9o5jCIe+gSrwyZ9TZ3QUdlWbBg=",
"/workshop.e02e3501.jpg": "D9ON1z6-vKcjxv50gOH+5XS9HTEWUpc4UgIPW5OXHxE="
}
}
2 changes: 1 addition & 1 deletion scripts/sync-sched/schedule-2025.json
Original file line number Diff line number Diff line change
Expand Up @@ -4576,4 +4576,4 @@
"event_subtype": "",
"description": ""
}
]
]
2 changes: 1 addition & 1 deletion scripts/sync-sched/speakers.json
Original file line number Diff line number Diff line change
Expand Up @@ -3471,4 +3471,4 @@
"~syncedDetailsAt": 1756904595242
}
]
}
}
1 change: 0 additions & 1 deletion src/app/conf/2025/components/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export function Navbar({ links, year }: NavbarProps): ReactElement {
const [mobileDrawerOpen, setMobileDrawerOpen] = useState(false)

const handleDrawerClick = useCallback(() => {
// todo: block scrolling on body
setMobileDrawerOpen(prev => !prev)
}, [])

Expand Down
1 change: 0 additions & 1 deletion src/app/conf/2025/components/register-today/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export function RegisterToday({ className }: RegisterTodayProps) {
className,
)}
>
{/* todo: placeholders work in preview, but they could use some improvement */}
<NextImage
src={speakerImage}
alt="GraphQL Conference"
Expand Down
4 changes: 3 additions & 1 deletion src/app/conf/2025/components/testimonials/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ export function TestimonialAuthor({
width={128}
height={128}
className="size-16 saturate-[.1] dark:opacity-90 xl:size-32"
fetchPriority="low"
// @ts-expect-error React doesn't know it exists yet, but @types/react do
fetchpriority="low"
loading="lazy"
/>
<div className="absolute inset-0 z-[1] bg-pri-darker opacity-80 mix-blend-plus-lighter dark:mix-blend-color" />
<Stripes />
Expand Down
4 changes: 2 additions & 2 deletions src/components/index-page/hero/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ function HeroStripes() {
image={logoBlurred}
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%]"
style={{
maskImage: `url(${logoBlurred.src})`,
WebkitMaskImage: `url(${logoBlurred.src})`,
maskImage: `var(--src)`,
WebkitMaskImage: `var(--src)`,
maskRepeat: "no-repeat",
WebkitMaskRepeat: "no-repeat",
}}
Expand Down
50 changes: 0 additions & 50 deletions src/components/index-page/how-it-works.tsx

This file was deleted.

21 changes: 21 additions & 0 deletions src/components/index-page/how-it-works/how-it-works-list-item.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
export function HowItWorksListItem({
text,
code,
icon,
}: {
text: React.ReactNode
code: React.ReactNode
icon?: React.ReactNode
}) {
return (
<li className="flex flex-col [counter-increment:list-item]">
<div className="typography-body-md flex items-center bg-neu-0 py-4 pr-2 before:typography-body-sm before:mr-2 before:inline-flex before:size-5 before:translate-y-[-0.5px] before:items-center before:justify-center before:bg-neu-200 before:p-1 before:text-neu-800 before:content-[counter(list-item)] dark:before:bg-neu-50 md:p-6">
{text}
{icon}
</div>
<div className="mt-px flex-1 bg-neu-0 text-sm/[21px] [--cm-background:transparent] md:pl-2 md:pt-2 max-md:[&_code>span]:!pl-0 [&_pre]:border-none [&_pre]:ring-0">
{code}
</div>
</li>
)
}
59 changes: 59 additions & 0 deletions src/components/index-page/how-it-works/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import { useRef } from "react"
import { useInView } from "motion/react"
import dynamic from "next/dynamic"

import { Button } from "@/app/conf/_design-system/button"
import { SectionLabel } from "@/app/conf/_design-system/section-label"
import { CodeA, CodeB, CodeC } from "@/components/code-blocks"

import { HowItWorksListItem } from "./how-it-works-list-item"
import { PlayButton } from "./play-button"

const InteractiveEditor = dynamic(() => import("./interactive-editor"), {
ssr: false,
})

const TRY_IT_OUT_URL = "https://graphql.org/swapi-graphql"

export function HowItWorks() {
const sectionRef = useRef<HTMLElement>(null)
// todo: we could technically consider loading the chunk on hover or focus,
// just so people scrolling through the page don't download CodeMirror
const inView = useInView(sectionRef)

return (
<section
ref={sectionRef}
className="gql-container gql-section xl:py-20"
// this is mostly for Playwright, we're not getting a hydration warning normally
suppressHydrationWarning
>
<SectionLabel className="mb-6">How it works</SectionLabel>
<h2 className="typography-h2 mb-6 lg:mb-16">A GraphQL Query</h2>
<div className="relative">
<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">
<HowItWorksListItem text="Describe your data" code={<CodeA />} />
<HowItWorksListItem
text="Ask for what you want"
icon={<PlayButton disabled={inView} />}
code={<CodeB />}
/>
<HowItWorksListItem text="Get predictable results" code={<CodeC />} />
</ol>
{inView && (
<ol
// this is rendered *on top* of the static version to avoid layout shift
className="absolute inset-0 list-none gap-px lg:grid lg:grid-cols-3"
>
<div className="pointer-events-none" />
<InteractiveEditor />
</ol>
)}
</div>

<Button className="mx-auto mt-8 w-fit lg:mt-16" href={TRY_IT_OUT_URL}>
Try GraphiQL
</Button>
</section>
)
}
Loading