docs: Soft overhaul of the example page look#2243
Conversation
|
pkg.pr.new packages benchmark commit |
📊 Bundle Size Comparison
👀 Notable resultsStatic test results:No major changes. Dynamic test results:No major changes. 📋 All resultsClick to reveal the results table (344 entries).
If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu. |
|
The before/after is flipped |
There was a problem hiding this comment.
Pull request overview
This PR overhauls the look and functionality of the TypeGPU examples page. It addresses issues #2237 (auto-detection of experimental examples) and #1960 (ordering examples by a "coolness" factor). The sidebar is decluttered, controls are restyled, tag/API filtering is added, and examples are now sorted by a coolFactor rating.
Changes:
- Adds
coolFactor(required number) to all examplemeta.jsonfiles and to theExampleMetadataschema; adds API-usage auto-detection via regex rules; moves the copyright/social footer from the sidebar to the control panel. - Introduces tag/API filter UI in
SearchableExampleList, a "Group by category" toggle, and sorts examples bycoolFactor; experimentals are now detected by the~unstableAPI marker rather than anexperimentaltag. - Visual updates across
Slider,VectorSlider,Select, andColorPickercomponents (rounded-full styling), and restyled code editor tabs.
Reviewed changes
Copilot reviewed 83 out of 83 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
apps/typegpu-docs/src/utils/examples/types.ts |
Adds required coolFactor: 'number' field and usedApis: string[] to the example type |
apps/typegpu-docs/src/utils/examples/exampleViewStateAtoms.ts |
Adds groupExamplesByCategoryAtom persisted atom |
apps/typegpu-docs/src/examples/exampleContent.ts |
Expands TS file glob to support subdirectories; adds API_RULES regex detection and detectUsedApis function |
apps/typegpu-docs/src/components/SearchableExampleList.tsx |
Adds tag/API filter UI, coolFactor sorting, group-by-category toggle |
apps/typegpu-docs/src/components/ExampleLayout.tsx |
Removes clutter from sidebar, adds two compact toggles at bottom |
apps/typegpu-docs/src/components/ControlPanel.tsx |
Moves copyright/social footer here; adds SVG imports |
apps/typegpu-docs/src/components/ExampleView.tsx |
Restyled code editor tabs |
apps/typegpu-docs/src/components/ExampleCard.tsx |
Removes tag pills and centers title |
apps/typegpu-docs/src/components/design/Slider.tsx, VectorSlider.tsx, Select.tsx, ColorPicker.tsx |
Rounded-full/xl styling updates |
All meta.json files |
Updated tags and added coolFactor ratings |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
closes #2237 #1960
What this PR changes:
© 2026 Software Mansion S.A.with links is moved to example controls panel - more free space there imo, reduced padding, removed tags from example cards)coolFactor™ and assigned preliminary ratings (discussion encouraged since i'm nowhere near close to fair when it comes to rating)