Skip to content

chore: Add heroshot example for patterns page for documentation website - #5181

Merged
at-susie merged 4 commits into
mainfrom
dev-v3-pattern-thumbnail
Oct 22, 2026
Merged

at-susie merged 4 commits into
mainfrom
dev-v3-pattern-thumbnail

Conversation

@at-susie

Copy link
Copy Markdown
Member

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

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.73%. Comparing base (fc03037) to head (8134c19).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 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

Comment on lines +460 to +464
dismissButton={true}
dismissAriaLabel="Close"
onDismiss={noop}
header="September 23rd"
variant="chart"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

Comment on lines +525 to +527
visible={true}
header="Run command"
closeAriaLabel="Close modal"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

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.
@at-susie
at-susie added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit 5debb90 Oct 22, 2026
69 checks passed
@at-susie
at-susie deleted the dev-v3-pattern-thumbnail branch October 22, 2026 16:23

This branch was successfully deployed

3 active deployments
dev-pages-react18 — 8134c199 Deployed Oct 22, 2026 by at-susie via deploy (React 18) / deploy #2930
dev-pages-react16 — 8134c199 Deployed Oct 22, 2026 by at-susie via deploy (React 16) / deploy #2930
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.

3 participants