Repository navigation
chore: Add heroshot example for patterns page for documentation website - #5181
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5181 +/- ##
=======================================
Coverage 97.73% 97.73%
=======================================
Files 996 996
Lines 32219 32219
Branches 11906 11907 +1
=======================================
Hits 31490 31490
+ Misses 723 684 -39
- Partials 6 45 +39 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🔵 Needs a closer look
Unresolved keyboard traps need correction, and the thumbnail crops and scaled layouts still require human visual validation.
2 open issues
What changed in this PR
Extends the component-thumbnail approach from #5065 to the documentation website’s patterns overview, using a dedicated heroshot gallery.
Changes:
- Adds pattern definitions and simplified component previews.
- Reuses shared thumbnail frames with pattern-specific scaling, cropping, and padding.
- Composes open dropdown, chart-popover, and iframe-isolated modal previews for screenshots.
| File | Description |
|---|---|
pages/heroshot/patterns-overview.page.tsx |
Adds the pattern thumbnail gallery and its preview layouts. |
Review effort: Balanced
| dismissButton={true} | ||
| dismissAriaLabel="Close" | ||
| onDismiss={noop} | ||
| header="September 23rd" | ||
| variant="chart" |
There was a problem hiding this comment.
Fixed by setting dismissButton={false} (with dismissAriaLabel/onDismiss as undefined), which removes both the focus lock and the autofocus. This matches StaticPopoverHeroshot in pages/heroshot/overview.page.tsx, which omits the dismiss button for the same reason. The thumbnail loses its X, which is fine for a screenshot-only preview.
| visible={true} | ||
| header="Run command" | ||
| closeAriaLabel="Close modal" |
There was a problem hiding this comment.
Accurate, but leaving as-is here. This is the same construction as the existing ModalHeroshotin pages/heroshot/overview.page.tsx:1369 already on main, and these are screenshot-only dev pages. Worth fixing in a separate change covering both call sites rather than just this one — happy to open that if preferred.
a5b7c86 to
df33b53
Compare
PopoverBody traps focus and autofocuses the dismiss button whenever one is shown, so the static preview held keyboard focus inside the thumbnail with no working dismiss to release it. Drop the dismiss button, matching the existing StaticPopoverHeroshot on the component overview page.

Description
In the #5065, we've added heroshot thumbnails for the components overview page in the documentation website.
This PR extends the same thing for the patterns overview page.
Related links, issue #, if available: n/a
How has this been tested?
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.