react icon indicating copy to clipboard operation
react copied to clipboard

feat(Details): Add summary subcomponent

Open francinelucca opened this issue 1 year ago • 5 comments

Closes https://github.com/github/primer/issues/3518

Adds Details.Summary subcomponent that can be used within Details for the summary and adds summary prop to Details component which will render the supplied node within the new Details.Summary subcomponent. Also adds a default "See Details" summary value to be rendered to improve accessibility in case authors fail to supply one.

Changelog

New

  • Adds Details.Summary subcomponent
  • Adds tests for new Details.Summary subcomponent

Changed

  • Updates Details.docs.json to include data for new Details.Summary subcomponent and its props
  • Use new Details.Summary subcomponent in Details story
  • Refactor Details component to render a default Details.Summary if one hasn't been supplied by author
  • Rewrite Details component export to include new Details.Summary subcomponent
  • Update Details tests to use new Details.Summary subcomponent

Rollout strategy

  • [ ] Patch release
  • [x] Minor release
  • [ ] Major release; if selected, include a written rollout or migration plan
  • [ ] None; if selected, include a brief description as to why

Testing & Reviewing

  • Verify no visual/behavioral regressions in deploy preview Details story
  • All tests should pass sniff test and CI

Merge checklist

  • [x] Added/updated tests
  • [x] Added/updated documentation
  • [x] Added/updated previews (Storybook)
  • [ ] Changes are SSR compatible
  • [x] Tested in Chrome
  • [ ] Tested in Firefox
  • [ ] Tested in Safari
  • [ ] Tested in Edge
  • [x] (GitHub staff only) Integration tests pass at github/github (Learn more about how to run integration tests)

francinelucca avatar Sep 24 '24 15:09 francinelucca

🦋 Changeset detected

Latest commit: e6ce3b32f3fb3693acea8dfc0ef345fda13ac185

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Sep 24 '24 15:09 changeset-bot[bot]

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 97.94 KB (+0.19% 🔺)
packages/react/dist/browser.umd.js 98.25 KB (+0.21% 🔺)

github-actions[bot] avatar Sep 24 '24 15:09 github-actions[bot]

:wave: Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks!

github-actions[bot] avatar Oct 08 '24 16:10 github-actions[bot]

🟢 golden-jobs completed with status success.

primer-integration[bot] avatar Oct 08 '24 18:10 primer-integration[bot]

:wave: Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/349552

primer-integration[bot] avatar Oct 31 '24 20:10 primer-integration[bot]