Skip to content

Improve PR comment with emoji indicators, real interactions, video support - #103

Closed
thedjpetersen wants to merge 6 commits into
mainfrom
deej/pr-comment-updates
Closed

thedjpetersen wants to merge 6 commits into
mainfrom
deej/pr-comment-updates

Conversation

@thedjpetersen

Copy link
Copy Markdown
Contributor

Summary

  • Add threshold-based emoji indicators (⬇️/➡️/⬆️) to component metrics in PR analysis reports, plus component health badges (🟢/🟡/🔴)
  • Replace hover-only screenshot interactions with detection-based real interactions (text input, toggles, tabs, buttons, dialog/menu triggers, selects, scrollable areas) with a 15s time budget
  • Use <video> tags for MP4 interaction previews (with GIF fallback) and add clickable Storybook links to component previews

Test plan

  • Run node .github/scripts/test-pr-enrichment.js — produces correct markdown with emojis
  • Run node .github/scripts/generate-pr-comment.js with mock data — output matches expected format
  • Verify PR enrichment workflow runs successfully on this PR
  • Visually inspect the generated PR comment for correct rendering

…and video support

Add threshold-based emoji indicators (⬇️/➡️/⬆️) to component metrics and
component health badges (🟢/🟡/🔴). Replace hover-only screenshot interactions
with detection-based real interactions (typing, toggling, clicking tabs/buttons,
opening dialogs). Use <video> tags for MP4 previews with GIF fallback. Add
clickable Storybook links to component previews.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Feb 12, 2026
…r directly

Remove duplicated inline generation logic from test script — now writes mock
JSON files (including screenshots + screenshot URLs) and shells out to
generate-pr-comment.js. Exercises both <video> tag (MP4) and GIF fallback paths.
@github-actions

github-actions Bot commented Feb 12, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

New Components

Chip 🟢
Metric Value
Bundle Size (ESM) 105B ⬇️
Bundle Size (CJS) 210B ⬇️
Lines of Code 105 ➡️
Source Files 2
Complexity Low (2) ⬇️
Exports XDSChip
Props Count N/A
Has Tests Yes ✅
Has Stories Yes ✅

Modified Components

Badge 🟢
Metric Before After Delta
Bundle Size (ESM) N/A 107B ⬇️ N/A
Lines of Code N/A 131 ➡️ -
Complexity N/A Low (3) ⬇️ -

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@xds/core 5.2KB 8.6KB 1.4KB

Accessibility Audit

Status: 2 accessibility violation(s) found.

XDSBadge - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSChip - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name

Component Previews

Includes interactive previews.

XDSBadge

Default

Screenshot:

Default

Interaction Preview: (view gif)

View in Storybook

Variants

Screenshot:

Variants

Interaction Preview: (view gif)

View in Storybook

Counts

Screenshot:

Counts

Interaction Preview: (view gif)

View in Storybook

Dot Indicators

Screenshot:

Dot Indicators

Interaction Preview: (view gif)

View in Storybook

Status Labels

Screenshot:

Status Labels

Interaction Preview: (view gif)

View in Storybook

XDSChip

Default

Screenshot:

Default

Interaction Preview: (view gif)

View in Storybook

Variants

Screenshot:

Variants

Interaction Preview: (view gif)

View in Storybook

Dismissible

Screenshot:

Dismissible

Interaction Preview: (view gif)

View in Storybook

With Icons

Screenshot:

With Icons

Interaction Preview: (view gif)

View in Storybook


Generated by PR Enrichment workflow | Storybook | View full report

New component: XDSChip - a dismissible tag/filter chip with neutral, info,
success, and error variants. Includes tests, stories, and documentation.

Modified component: XDSBadge - add size prop ('sm' | 'md') for controlling
badge dimensions.
GitHub strips <video> tags from PR comments. Switch to GIF image embeds
(which render natively) with an optional MP4 download link. Also preserve
trailing slash in Storybook URLs for correct routing.
… embeds

Remove the CML dependency (asset.cml.dev) for uploading screenshots and videos.
Screenshots are now deployed to GitHub Pages alongside Storybook, making URLs
deterministic from the storybook URL. Interaction previews use inline <video>
MP4 embeds (supported on github.io domains) with GIF as a fallback link.
@cixzhang

Copy link
Copy Markdown
Contributor

Nice! Seems like the deploy went through but screenshots are broken.

One thing about component previews is that they take up a lot of vertical space if we have a lot of variants. I wonder if we should use tables to make more of a grid layout instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants