Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(DataTable): add reference stories for row actions #2978

Merged
merged 7 commits into from
Mar 14, 2023

Conversation

joshblack
Copy link
Member

@joshblack joshblack commented Mar 3, 2023

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

Changelog

New

  • Add story for a single row-level action
  • Add story for two row-level actions
  • Add story for row-level actions in a menu

Changed

  • Make field optional for "virtual" columns like a sortable column which has no value in the data set
  • Update header from string to string | (() => React.ReactNode) to support custom rendering

Removed

@changeset-bot
Copy link

changeset-bot bot commented Mar 3, 2023

⚠️ No Changeset found

Latest commit: f0ca043

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@joshblack joshblack temporarily deployed to github-pages March 3, 2023 18:13 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-2978 March 3, 2023 18:13 Inactive
@joshblack joshblack added the skip changeset This change does not need a changelog label Mar 8, 2023
@joshblack joshblack temporarily deployed to github-pages March 8, 2023 22:39 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-2978 March 8, 2023 22:39 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-2978 March 8, 2023 22:39 Inactive
@joshblack joshblack marked this pull request as ready for review March 8, 2023 22:41
@joshblack joshblack requested a review from a team March 8, 2023 22:41
@joshblack
Copy link
Member Author

@colebemis @mperrotti this is currently adding stories-only for these patterns just to see how far we could go with what we have built-in.

Curious if you all had any recommendations or ideas for ways to help abstract or make row-level actions easier for consumers to implement 👀

@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2023

size-limit report 📦

Path Size
dist/browser.esm.js 94.47 KB (0%)
dist/browser.umd.js 95.04 KB (0%)

@joshblack joshblack temporarily deployed to github-pages March 8, 2023 22:48 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-2978 March 8, 2023 22:48 Inactive
@colebemis
Copy link
Contributor

Is this space between the icon button and the edge of the table intentional?
CleanShot 2023-03-09 at 17 46 24@2x

@joshblack
Copy link
Member Author

joshblack commented Mar 10, 2023

Good catch @colebemis! Let me look into it 👀

@mperrotti
Copy link
Contributor

Curious if you all had any recommendations or ideas for ways to help abstract or make row-level actions easier for consumers to implement 👀

Maybe we could export a component you can use in renderCell that makes it easy to render one or more actions?

@mperrotti
Copy link
Contributor

@ericwbailey - should the row actions be in a role="toolbar" and only have one tab stop? Or should we keep them as separate unrelated buttons?

@joshblack
Copy link
Member Author

@colebemis seems like it's coming from auto-sizing of table cells from the table layout algorithm 😞

I'll defer this for after @mperrotti's work for column layout and see if it persists or if we need to target this case specifically through some kind of abstraction 👍

@joshblack
Copy link
Member Author

@mperrotti I'd love to make something simple but couldn't seem to land on the right abstraction 🤔 Curious if you have any ideas or places to take inspiration from that would help to simplify this.

One idea was to introduce primitives like:

  • RowAction
  • RowActionGroup (which would contain RowAction)
  • RowActionMenu, RowActionMenuItem

Where RowAction would ostensibly be a wrapper for IconButton and RowActionMenu would be a wrapper for ActionMenu. They didn't seem to add much value though.

Here's what some of the stories might look like with this in mind:

With Row Action

// Before
<IconButton
  aria-label={`Download: ${row.name}`}
  title={`Download: ${row.name}`}
  icon={DownloadIcon}
  variant="invisible"
  onClick={() => {
    action('Download')(row)
  }}
/>

// After
<RowAction
  rowHeader={row.name}
  action="Download"
  icon={DownloadIcon}
  variant="invisible"
  onClick={() => {
    action('Download')(row)
  }}
/>

With Row Actions

// Before
<>
  <IconButton
    aria-label={`Edit: ${row.name}`}
    title={`Edit: ${row.name}`}
    icon={PencilIcon}
    variant="invisible"
    onClick={() => {
      action('Edit')(row)
    }}
  />
  <IconButton
    aria-label={`Delete: ${row.name}`}
    title={`Delete: ${row.name}`}
    icon={TrashIcon}
    variant="invisible"
    onClick={() => {
      action('Delete')(row)
    }}
  />

// After
<RowActionGroup rowHeader={row.name}>
  <RowAction
    action="Edit"
    icon={PencilIcon}
    variant="invisible"
    onClick={() => {
      action('Edit')(row)
    }}
  />
  <RowAction
    action="Delete"
    icon={TrashIcon}
    variant="invisible"
    onClick={() => {
      action('Delete')(row)
    }}
  />
</RowActionGroup>

With Row Action Menu

// Before
<ActionMenu>
  <ActionMenu.Anchor>
    <IconButton
      aria-label={`Actions: ${row.name}`}
      title={`Actions: ${row.name}`}
      icon={KebabHorizontalIcon}
      variant="invisible"
    />
  </ActionMenu.Anchor>
  <ActionMenu.Overlay>
    <ActionList>
      <ActionList.Item
        onSelect={() => {
          action('Copy')(row)
        }}
      >
        Copy row
      </ActionList.Item>
      <ActionList.Item>Edit row</ActionList.Item>
      <ActionList.Item>Export row as CSV</ActionList.Item>
      <ActionList.Divider />
      <ActionList.Item variant="danger">Delete row</ActionList.Item>
    </ActionList>
  </ActionMenu.Overlay>
</ActionMenu>

// After
<RowActionMenu>
  <RowActionMenuItem onSelect={() => { /* ... */}>
    Copy Row
  </RowActionMenuItem>
  <RowActionMenuItem>Edit row</RowActionMenuItem>
  <RowActionMenuItem>Export row as CSV</RowActionMenuItem>
  <RowActionMenuItem.Divider />
  <RowActionMenuItem variant="danger">Delete row</RowActionMenuItem>
</RowActionMenu>

Copy link
Contributor

@colebemis colebemis left a comment

Choose a reason for hiding this comment

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

Looks good! I'm okay with moving forward with this more verbose API for now. We can always create a simplified abstraction later without a breaking change, right?

</Table.Container>
)

export const WithRowActions = () => (
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to add these stories to the docs?

@mperrotti
Copy link
Contributor

I like the RowActionGroup/RowAction/RowActionMenu abstraction, but I'm also ok with moving forward with the more verbose API for now.

Also just wanted to remind the group that we're not restricting consumers to icon-only buttons. It's just the preferred format to use when possible. There might be actions that can't easily be represented with an icon.

@joshblack joshblack added this pull request to the merge queue Mar 14, 2023
Merged via the queue into main with commit 0f35625 Mar 14, 2023
@joshblack joshblack deleted the feat/add-row-level-actions branch March 14, 2023 19:01
radglob pushed a commit that referenced this pull request Mar 15, 2023
* docs(DataTable): add reference stories for row actions

* chore: clean-up ts types

* fix: add guards for optional id and field

* docs: add story ids to DataTable docs json

* Update generated/components.json

---------

Co-authored-by: Josh Black <joshblack@users.noreply.github.com>
radglob added a commit that referenced this pull request Apr 24, 2023
#2878)

* Render ActionList.Group header inside list, use li for semantic HTML reasons.

* Update snapshots.

* Fix snapshot. No idea why this isn't being generated correctly.

* Separate Heading from ActionList.Group.

Also made some styling changes (ex. no vertical padding on ActionList
<ul>) to align with PVC implementation.

* removed usage of actionlist.group.

* Fix type errors.

* Create modern-coins-destroy.md

* Fix ActionList.docs.json to fix components build CI step.

* Update generated/components.json

* test(vrt): update snapshots

* test(vrt): update snapshots

* Update snapshots.

* Update themePreval snapshot and cache bust file.

* Updated snapshots.

* Revert padding on ActionList.

* test(vrt): update snapshots

* Make sure lists are surrounded by a div, fix accessibility issues in Storybook.

* Updated snapshots, fix linting error.

* Update docs.

* Update generated/components.json

* Fix linting issues.

* Fixing some issues after the previous merge.

* Fix ActionMenu feature stories.

* Updated snapshots that shouldn't be different from main.

* disable axe check

* Update changeset to major patch instead of minor.

* re-gen test

* Add missing selectionVariant to Groups and Descriptions ActionMenu story.

* test(vrt): update snapshots

* Fix styling of ActionList to match prod.

* Fix linting errors in ActionList.

* test(vrt): update snapshots

* Reduce padding between ActionLists in ActionMenu example.

* refactor(DataTable): update optional type signatures (#2987)

* refactor(DataTable): update optional type signatures

* chore: update docs and add stories to json for DataTable

* chore: remove default story

* Update generated/components.json

---------

Co-authored-by: Josh Black <joshblack@users.noreply.github.com>

* Textarea stories (#2988)

* checkbox

* Update generated/components.json

* tests

* Update generated/components.json

* fix docs

* radio stories

* Update generated/components.json

* fix doc

* remove axe

* add sb tests

* select

* add features

* e2e

* text input

* Update generated/components.json

* tokens

* Update generated/components.json

* tokens

* textarea

* all the things

* Update generated/components.json

* remove animation test

* test(vrt): update snapshots

* remove dead files

* Update generated/components.json

* missing exports

---------

Co-authored-by: langermank <langermank@users.noreply.github.com>

* Pagination design updates (#2702)

* updates pagination styles to match latest token usage patterns, and updates ARIA markup

* adds changeset

* Create .changeset/long-bags-double.md

---------

Co-authored-by: Cole Bemis <colebemis@github.com>

* Make sure ActionList.Heading titles are bolded correctly.

* Updated snapshots.

* Revert title font weight to semibold.

* Update snapshots.

* test(vrt): update snapshots

* Passing sxProps to ActionList.Heading through ActionList.

* More snapshot fiddling.

* Formatting.

* Use margin and padding to get spacing correct.

* Fix aat tests.

* Update snapshots.

* I think this should get the ActionMenu example back to what is expected.

* Revert "test(vrt): update snapshots"

This reverts commit a02012b.

* Revert "test(vrt): update snapshots"

This reverts commit a713875.

* Revert "test(vrt): update snapshots"

This reverts commit 2eae060.

* Revert "test(vrt): update snapshots"

This reverts commit bf59217.

* Revert "test(vrt): update snapshots"

This reverts commit 1c11a1b.

* Revert "test(vrt): update snapshots"

This reverts commit a02012b.

* Revert "test(vrt): update snapshots"

This reverts commit bf59217.

* Fix underlinenav.

* Updated snapshots.

* test(vrt): update snapshots

* Dialog v2: Move files, reformat stories and add e2e tests (#2984)

* initial

* Dialog v2: move files, refaormat stories and add e2e tests

* Update generated/components.json

* snaps

* remove jest disable

* Dialogv2 -> Dialog2

* storybook tests and await dialogs

* disable animations

* disable animations on the first snapshots too

* fix page locators

* test(vrt): update snapshots

* test(Hidden): update export

* Revert "test(Hidden): update export"

This reverts commit f29edd9.

---------

Co-authored-by: broccolinisoup <broccolinisoup@users.noreply.github.com>
Co-authored-by: Josh Black <joshblack@users.noreply.github.com>

* feat(project): add warning, invariant utilities and dev-expression plugin (#2901)

* chore(project): add warning utility and dev-expression plugin

* chore: address eslint violations

* feat: add invariant and warn helper

* chore: flip flag for useMedia warning

* chore: add changeset

* chore: add minified exception case for invariant

* chore: update type signature for invariant

* test: update test for warning helper

* refactor(hooks): update useControllableState warning usage

* test(warning): update test titles with flipped condition

---------

Co-authored-by: Josh Black <joshblack@users.noreply.github.com>

* chore(deps-dev): bump mdast-util-to-string from 3.1.0 to 3.1.1 (#3018)

Bumps [mdast-util-to-string](https://github.com/syntax-tree/mdast-util-to-string) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/syntax-tree/mdast-util-to-string/releases)
- [Commits](syntax-tree/mdast-util-to-string@3.1.0...3.1.1)

---
updated-dependencies:
- dependency-name: mdast-util-to-string
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump jscodeshift from 0.13.0 to 0.14.0 (#3015)

Bumps [jscodeshift](https://github.com/facebook/jscodeshift) from 0.13.0 to 0.14.0.
- [Release notes](https://github.com/facebook/jscodeshift/releases)
- [Changelog](https://github.com/facebook/jscodeshift/blob/main/CHANGELOG.md)
- [Commits](facebook/jscodeshift@0.13.0...v0.14.0)

---
updated-dependencies:
- dependency-name: jscodeshift
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Josh Black <joshblack@github.com>

* chore(deps-dev): bump @babel/cli from 7.19.3 to 7.21.0 (#3016)

Bumps [@babel/cli](https://github.com/babel/babel/tree/HEAD/packages/babel-cli) from 7.19.3 to 7.21.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.21.0/packages/babel-cli)

---
updated-dependencies:
- dependency-name: "@babel/cli"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Josh Black <joshblack@github.com>

* Add argTypes for HeadingPlayground ActionList story.

* Add aria-busy declaration in relevant story instead of in component.

* Update snapshots.

* Recalculate autocomplete suggestions if the input data changes while the menu is open (#3009)

* Add support for custom emoji suggestions

* Allow declaratively setting suggestions as "loading"

* Recalculate suggestions on update

* Create .changeset/silly-plants-draw.md

* Fix bug where page would be unresponsive if no suggestions provided

* docs(DataTable): add reference stories for row actions (#2978)

* docs(DataTable): add reference stories for row actions

* chore: clean-up ts types

* fix: add guards for optional id and field

* docs: add story ids to DataTable docs json

* Update generated/components.json

---------

Co-authored-by: Josh Black <joshblack@users.noreply.github.com>

* chore(deps): update babel dependencies (#3005)

Co-authored-by: Josh Black <joshblack@users.noreply.github.com>

* feat(DataTable): add support for alphanumeric, datatable, and custom sort functions (#3001)

* chore: check-in work

* chore: clean-up work

* Update generated/components.json

* docs: add custom sorting story

---------

Co-authored-by: Josh Black <joshblack@users.noreply.github.com>

* Add new usage instructions to changeset.

* Move ActionList.Group to versioned deprecated directory.

* Fix references in deprecated ActionList.Group.

* Fix themePreval snapshot.

* Update src/ActionList/ActionList.stories.tsx

Co-authored-by: Katie Langerman <18661030+langermank@users.noreply.github.com>

* Update src/ActionList/ActionList.stories.tsx

Co-authored-by: Katie Langerman <18661030+langermank@users.noreply.github.com>

* Heading playground only uses heading props.

* Use Box instead of styled elements for ActionList.Heading.

* Remove presentation role and aria-hidden from ActionList.Heading.

* Updated snapshot.

* Use restricted as prop instead of headingLevel.

* Use slots and contexts to allow developers to declare Heading like a child while still rendering correctly.

* Linting.

* Add @deprecated tag to ActionList.Group as first step towards deprecating component.

* Fix type errors in ActionMenu and ActionList stories.

* Formatting.

* Updated snapshots.

* Updating snapshots with --no-cache flag.

* Update docs, fix missing Group export on ActionList.

* Terminate comment correctly.

* Regenerate ActionMenu e2e tests.

* Add padding to fix snapshot diff.

* Change padding again.

* Remove extra padding.

* Add small amount of margin (not padding) to fix snapshot diff.

* Less margin.

* More margin, actually.

* I think this should work.

* I think this is the correct margin, something else is off.

* .

* These snapshot comparisons are confusing me.

* Just a little more margin.

* Ugh.

* test(vrt): update snapshots

* Slightly less margin.

* More tweaking.

* More tweaking.

* Disable animations on actionmenu test to see if it helps generate the snapshot correctly.

* test(vrt): update snapshots

* Don't animate Multiple Sections e2e test.

* Format file.

* test(vrt): update snapshots

* Revert snapshots to match main.

* Update snapshots again.

* Build snapshots without cache.

* Remove lingering references to headingProps.

* Update generated/components.json

* chore(deps): bump react-intersection-observer from 9.4.1 to 9.4.3 (#3177)

Bumps [react-intersection-observer](https://github.com/thebuilder/react-intersection-observer) from 9.4.1 to 9.4.3.
- [Release notes](https://github.com/thebuilder/react-intersection-observer/releases)
- [Commits](thebuilder/react-intersection-observer@v9.4.1...v9.4.3)

---
updated-dependencies:
- dependency-name: react-intersection-observer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump jest-fail-on-console from 3.0.2 to 3.1.1 (#3180)

Bumps [jest-fail-on-console](https://github.com/ValentinH/jest-fail-on-console) from 3.0.2 to 3.1.1.
- [Release notes](https://github.com/ValentinH/jest-fail-on-console/releases)
- [Commits](ValentinH/jest-fail-on-console@v3.0.2...v3.1.1)

---
updated-dependencies:
- dependency-name: jest-fail-on-console
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump unist-util-find-before from 3.0.0 to 3.0.1 (#3179)

Bumps [unist-util-find-before](https://github.com/syntax-tree/unist-util-find-before) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/syntax-tree/unist-util-find-before/releases)
- [Commits](syntax-tree/unist-util-find-before@3.0.0...3.0.1)

---
updated-dependencies:
- dependency-name: unist-util-find-before
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(PageLayout): update Pane to warn instead of error (#3160)

* fix(PageLayout): update Pane to warn instead of error

* chore: add changeset

* chore: remove invariant

* chore: address eslint violations

---------

Co-authored-by: Josh Black <joshblack@users.noreply.github.com>

* Refactor(PageLayout): use Playwright for interaction tests instead of Storybook. (#3171)

* Change PageLayout interactions to use Playwright.

* Build snapshots without cache.

* Fix PageLayout.test.ts to use Page object because document is not defined.

* Pass missing page parameter to isInViewPort function.

* test(vrt): update snapshots

* Add tabIndex to PullRequestPage test so it is a scrollable region.

---------

Co-authored-by: radglob <radglob@users.noreply.github.com>

* Delete docs migration-related code (#3187)

* Delete docs_migration.yml

* Delete docs-migration.js

* Delete props-mdx-to-json.mjs

* Docs(Tooltip): Adds `defaultValue` of tooltip direction to documentation (#3175)

* docs: adds defaultValue of tooltip direction to documentation

* remove the changeset

* chore(project): update test-e2e docker image (#3183)

* feat(project): add subpath pattern to package.json to restrict internal imports (#3186)

* feat(project): add subpath pattern to package.json to restrict internal imports

* refactor(project): move useOverflow to internal/hooks

* docs(adrs): update adopted status for adr

* chore: add changeset

* Update generated/components.json

---------

Co-authored-by: Josh Black <joshblack@users.noreply.github.com>

* Ensure disabled invisible buttons have the right text color. (#3185)

* Set disabled invisible button color similarly to other button variants.

* Don't set [data-no-visual=true] on invisible button variants.

* Update snapshots.

* Formatting and linting.

* test(vrt): update snapshots

* Update generated/components.json

* chore(project): update test-e2e docker image (#3183)

* Use selector to set disabled invisible button text color correctly.

* test(vrt): update snapshots

---------

Co-authored-by: radglob <radglob@users.noreply.github.com>
Co-authored-by: Josh Black <joshblack@github.com>

* Refactor(Overlay): move files to folder. (#3191)

* Move overlay files to directory, move all stories to features as there isn't a clear default.

* Update generated/components.json

---------

Co-authored-by: radglob <radglob@users.noreply.github.com>

* Refactor(Text): move files to directory, add storybook and e2e tests. (#3189)

* Move Text files into directory, create storybook and e2e tests.

* Fix Text reference in src/index.ts, update snapshots.

* Update generated/components.json

* test(vrt): update snapshots

---------

Co-authored-by: radglob <radglob@users.noreply.github.com>

* Reduce ❌ for forks (#2283)

* Limit deploy to has pages

* Limit statuses to primer/react

* Limit stale to primer/react

* Preview cross org forks

---------

Co-authored-by: Mike Perrotti <mperrotti@github.com>
Co-authored-by: Rez <rezrah@github.com>
Co-authored-by: Josh Black <joshblack@github.com>

* Setup snapshots for visual regression for  experimental/Button2 (#3181)

* duplicate button into drafts

* update story title

* add visual tests for Button2

* test(vrt): update snapshots

---------

Co-authored-by: siddharthkp <siddharthkp@users.noreply.github.com>

* Version Packages (#3106)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Bug fix: `ButtonGroup` borders (#3198)

* fix hover borders

* Create wicked-knives-sparkle.md

* snaps

* why so many snaps?

* revert?

* test(vrt): update snapshots

---------

Co-authored-by: langermank <langermank@users.noreply.github.com>

* Refactor(Portal): move stories into Portal directory. (#3188)

* Move portal stories to portal directory.

* Reorganize portal stories into separate files for default and features.

* Generate e2e tests for portal components.

* Update generated/components.json

* Remove e2e portal tests as they do not play well with Playwright.

* Remove unnecessary decorator from story metadata.

---------

Co-authored-by: radglob <radglob@users.noreply.github.com>

* Use SSR-compatible slot implementation in ActionList/NavList (#3173)

* Migrate ActionList to use new slots impl

* Remove ActionList slots

* Remove unused import

* Create lemon-berries-run.md

* Update snapshots

* Fix slot description logic

* Fix style logic

* Fix conditional box logic

* Fix aria-labelledby logic

* Fix flexbox logic

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: radglob <radglob@users.noreply.github.com>
Co-authored-by: langermank <18661030+langermank@users.noreply.github.com>
Co-authored-by: joshblack <joshblack@users.noreply.github.com>
Co-authored-by: Josh Black <joshblack@github.com>
Co-authored-by: langermank <langermank@users.noreply.github.com>
Co-authored-by: Mike Perrotti <mperrotti@github.com>
Co-authored-by: Cole Bemis <colebemis@github.com>
Co-authored-by: Armağan <broccolinisoup@github.com>
Co-authored-by: broccolinisoup <broccolinisoup@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ian Sanders <iansan5653@github.com>
Co-authored-by: Ederson Lucas <27015559+edersonlucas@users.noreply.github.com>
Co-authored-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Co-authored-by: Rez <rezrah@github.com>
Co-authored-by: Siddharth Kshetrapal <siddharthkp@github.com>
Co-authored-by: siddharthkp <siddharthkp@users.noreply.github.com>
Co-authored-by: GitHub Design Systems Bot <30705008+primer-css@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
broccolinisoup added a commit that referenced this pull request Jun 21, 2023
#2878)

* Render ActionList.Group header inside list, use li for semantic HTML reasons.

* Update snapshots.

* Fix snapshot. No idea why this isn't being generated correctly.

* Separate Heading from ActionList.Group.

Also made some styling changes (ex. no vertical padding on ActionList
<ul>) to align with PVC implementation.

* removed usage of actionlist.group.

* Fix type errors.

* Create modern-coins-destroy.md

* Fix ActionList.docs.json to fix components build CI step.

* Update generated/components.json

* test(vrt): update snapshots

* test(vrt): update snapshots

* Update snapshots.

* Update themePreval snapshot and cache bust file.

* Updated snapshots.

* Revert padding on ActionList.

* test(vrt): update snapshots

* Make sure lists are surrounded by a div, fix accessibility issues in Storybook.

* Updated snapshots, fix linting error.

* Update docs.

* Update generated/components.json

* Fix linting issues.

* Fixing some issues after the previous merge.

* Fix ActionMenu feature stories.

* Updated snapshots that shouldn't be different from main.

* disable axe check

* Update changeset to major patch instead of minor.

* re-gen test

* Add missing selectionVariant to Groups and Descriptions ActionMenu story.

* test(vrt): update snapshots

* Fix styling of ActionList to match prod.

* Fix linting errors in ActionList.

* test(vrt): update snapshots

* Reduce padding between ActionLists in ActionMenu example.

* refactor(DataTable): update optional type signatures (#2987)

* refactor(DataTable): update optional type signatures

* chore: update docs and add stories to json for DataTable

* chore: remove default story

* Update generated/components.json

---------

Co-authored-by: Josh Black <joshblack@users.noreply.github.com>

* Textarea stories (#2988)

* checkbox

* Update generated/components.json

* tests

* Update generated/components.json

* fix docs

* radio stories

* Update generated/components.json

* fix doc

* remove axe

* add sb tests

* select

* add features

* e2e

* text input

* Update generated/components.json

* tokens

* Update generated/components.json

* tokens

* textarea

* all the things

* Update generated/components.json

* remove animation test

* test(vrt): update snapshots

* remove dead files

* Update generated/components.json

* missing exports

---------

Co-authored-by: langermank <langermank@users.noreply.github.com>

* Pagination design updates (#2702)

* updates pagination styles to match latest token usage patterns, and updates ARIA markup

* adds changeset

* Create .changeset/long-bags-double.md

---------

Co-authored-by: Cole Bemis <colebemis@github.com>

* Make sure ActionList.Heading titles are bolded correctly.

* Updated snapshots.

* Revert title font weight to semibold.

* Update snapshots.

* test(vrt): update snapshots

* Passing sxProps to ActionList.Heading through ActionList.

* More snapshot fiddling.

* Formatting.

* Use margin and padding to get spacing correct.

* Fix aat tests.

* Update snapshots.

* I think this should get the ActionMenu example back to what is expected.

* Revert "test(vrt): update snapshots"

This reverts commit a02012b.

* Revert "test(vrt): update snapshots"

This reverts commit a713875.

* Revert "test(vrt): update snapshots"

This reverts commit 2eae060.

* Revert "test(vrt): update snapshots"

This reverts commit bf59217.

* Revert "test(vrt): update snapshots"

This reverts commit 1c11a1b.

* Revert "test(vrt): update snapshots"

This reverts commit a02012b.

* Revert "test(vrt): update snapshots"

This reverts commit bf59217.

* Fix underlinenav.

* Updated snapshots.

* test(vrt): update snapshots

* Dialog v2: Move files, reformat stories and add e2e tests (#2984)

* initial

* Dialog v2: move files, refaormat stories and add e2e tests

* Update generated/components.json

* snaps

* remove jest disable

* Dialogv2 -> Dialog2

* storybook tests and await dialogs

* disable animations

* disable animations on the first snapshots too

* fix page locators

* test(vrt): update snapshots

* test(Hidden): update export

* Revert "test(Hidden): update export"

This reverts commit f29edd9.

---------

Co-authored-by: broccolinisoup <broccolinisoup@users.noreply.github.com>
Co-authored-by: Josh Black <joshblack@users.noreply.github.com>

* feat(project): add warning, invariant utilities and dev-expression plugin (#2901)

* chore(project): add warning utility and dev-expression plugin

* chore: address eslint violations

* feat: add invariant and warn helper

* chore: flip flag for useMedia warning

* chore: add changeset

* chore: add minified exception case for invariant

* chore: update type signature for invariant

* test: update test for warning helper

* refactor(hooks): update useControllableState warning usage

* test(warning): update test titles with flipped condition

---------

Co-authored-by: Josh Black <joshblack@users.noreply.github.com>

* chore(deps-dev): bump mdast-util-to-string from 3.1.0 to 3.1.1 (#3018)

Bumps [mdast-util-to-string](https://github.com/syntax-tree/mdast-util-to-string) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/syntax-tree/mdast-util-to-string/releases)
- [Commits](syntax-tree/mdast-util-to-string@3.1.0...3.1.1)

---
updated-dependencies:
- dependency-name: mdast-util-to-string
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump jscodeshift from 0.13.0 to 0.14.0 (#3015)

Bumps [jscodeshift](https://github.com/facebook/jscodeshift) from 0.13.0 to 0.14.0.
- [Release notes](https://github.com/facebook/jscodeshift/releases)
- [Changelog](https://github.com/facebook/jscodeshift/blob/main/CHANGELOG.md)
- [Commits](facebook/jscodeshift@0.13.0...v0.14.0)

---
updated-dependencies:
- dependency-name: jscodeshift
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Josh Black <joshblack@github.com>

* chore(deps-dev): bump @babel/cli from 7.19.3 to 7.21.0 (#3016)

Bumps [@babel/cli](https://github.com/babel/babel/tree/HEAD/packages/babel-cli) from 7.19.3 to 7.21.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.21.0/packages/babel-cli)

---
updated-dependencies:
- dependency-name: "@babel/cli"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Josh Black <joshblack@github.com>

* Add argTypes for HeadingPlayground ActionList story.

* Add aria-busy declaration in relevant story instead of in component.

* Update snapshots.

* Recalculate autocomplete suggestions if the input data changes while the menu is open (#3009)

* Add support for custom emoji suggestions

* Allow declaratively setting suggestions as "loading"

* Recalculate suggestions on update

* Create .changeset/silly-plants-draw.md

* Fix bug where page would be unresponsive if no suggestions provided

* docs(DataTable): add reference stories for row actions (#2978)

* docs(DataTable): add reference stories for row actions

* chore: clean-up ts types

* fix: add guards for optional id and field

* docs: add story ids to DataTable docs json

* Update generated/components.json

---------

Co-authored-by: Josh Black <joshblack@users.noreply.github.com>

* chore(deps): update babel dependencies (#3005)

Co-authored-by: Josh Black <joshblack@users.noreply.github.com>

* feat(DataTable): add support for alphanumeric, datatable, and custom sort functions (#3001)

* chore: check-in work

* chore: clean-up work

* Update generated/components.json

* docs: add custom sorting story

---------

Co-authored-by: Josh Black <joshblack@users.noreply.github.com>

* Add new usage instructions to changeset.

* Move ActionList.Group to versioned deprecated directory.

* Fix references in deprecated ActionList.Group.

* Fix themePreval snapshot.

* Update src/ActionList/ActionList.stories.tsx

Co-authored-by: Katie Langerman <18661030+langermank@users.noreply.github.com>

* Update src/ActionList/ActionList.stories.tsx

Co-authored-by: Katie Langerman <18661030+langermank@users.noreply.github.com>

* Heading playground only uses heading props.

* Use Box instead of styled elements for ActionList.Heading.

* Remove presentation role and aria-hidden from ActionList.Heading.

* Updated snapshot.

* Use restricted as prop instead of headingLevel.

* Use slots and contexts to allow developers to declare Heading like a child while still rendering correctly.

* Linting.

* Add @deprecated tag to ActionList.Group as first step towards deprecating component.

* Fix type errors in ActionMenu and ActionList stories.

* Formatting.

* Updated snapshots.

* Updating snapshots with --no-cache flag.

* Update docs, fix missing Group export on ActionList.

* Terminate comment correctly.

* Regenerate ActionMenu e2e tests.

* Add padding to fix snapshot diff.

* Change padding again.

* Remove extra padding.

* Add small amount of margin (not padding) to fix snapshot diff.

* Less margin.

* More margin, actually.

* I think this should work.

* I think this is the correct margin, something else is off.

* .

* These snapshot comparisons are confusing me.

* Just a little more margin.

* Ugh.

* test(vrt): update snapshots

* Slightly less margin.

* More tweaking.

* More tweaking.

* Disable animations on actionmenu test to see if it helps generate the snapshot correctly.

* test(vrt): update snapshots

* Don't animate Multiple Sections e2e test.

* Format file.

* test(vrt): update snapshots

* Revert snapshots to match main.

* Update snapshots again.

* Build snapshots without cache.

* Remove lingering references to headingProps.

* Update generated/components.json

* chore(deps): bump react-intersection-observer from 9.4.1 to 9.4.3 (#3177)

Bumps [react-intersection-observer](https://github.com/thebuilder/react-intersection-observer) from 9.4.1 to 9.4.3.
- [Release notes](https://github.com/thebuilder/react-intersection-observer/releases)
- [Commits](thebuilder/react-intersection-observer@v9.4.1...v9.4.3)

---
updated-dependencies:
- dependency-name: react-intersection-observer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump jest-fail-on-console from 3.0.2 to 3.1.1 (#3180)

Bumps [jest-fail-on-console](https://github.com/ValentinH/jest-fail-on-console) from 3.0.2 to 3.1.1.
- [Release notes](https://github.com/ValentinH/jest-fail-on-console/releases)
- [Commits](ValentinH/jest-fail-on-console@v3.0.2...v3.1.1)

---
updated-dependencies:
- dependency-name: jest-fail-on-console
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump unist-util-find-before from 3.0.0 to 3.0.1 (#3179)

Bumps [unist-util-find-before](https://github.com/syntax-tree/unist-util-find-before) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/syntax-tree/unist-util-find-before/releases)
- [Commits](syntax-tree/unist-util-find-before@3.0.0...3.0.1)

---
updated-dependencies:
- dependency-name: unist-util-find-before
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(PageLayout): update Pane to warn instead of error (#3160)

* fix(PageLayout): update Pane to warn instead of error

* chore: add changeset

* chore: remove invariant

* chore: address eslint violations

---------

Co-authored-by: Josh Black <joshblack@users.noreply.github.com>

* Refactor(PageLayout): use Playwright for interaction tests instead of Storybook. (#3171)

* Change PageLayout interactions to use Playwright.

* Build snapshots without cache.

* Fix PageLayout.test.ts to use Page object because document is not defined.

* Pass missing page parameter to isInViewPort function.

* test(vrt): update snapshots

* Add tabIndex to PullRequestPage test so it is a scrollable region.

---------

Co-authored-by: radglob <radglob@users.noreply.github.com>

* Delete docs migration-related code (#3187)

* Delete docs_migration.yml

* Delete docs-migration.js

* Delete props-mdx-to-json.mjs

* Docs(Tooltip): Adds `defaultValue` of tooltip direction to documentation (#3175)

* docs: adds defaultValue of tooltip direction to documentation

* remove the changeset

* chore(project): update test-e2e docker image (#3183)

* feat(project): add subpath pattern to package.json to restrict internal imports (#3186)

* feat(project): add subpath pattern to package.json to restrict internal imports

* refactor(project): move useOverflow to internal/hooks

* docs(adrs): update adopted status for adr

* chore: add changeset

* Update generated/components.json

---------

Co-authored-by: Josh Black <joshblack@users.noreply.github.com>

* Ensure disabled invisible buttons have the right text color. (#3185)

* Set disabled invisible button color similarly to other button variants.

* Don't set [data-no-visual=true] on invisible button variants.

* Update snapshots.

* Formatting and linting.

* test(vrt): update snapshots

* Update generated/components.json

* chore(project): update test-e2e docker image (#3183)

* Use selector to set disabled invisible button text color correctly.

* test(vrt): update snapshots

---------

Co-authored-by: radglob <radglob@users.noreply.github.com>
Co-authored-by: Josh Black <joshblack@github.com>

* Refactor(Overlay): move files to folder. (#3191)

* Move overlay files to directory, move all stories to features as there isn't a clear default.

* Update generated/components.json

---------

Co-authored-by: radglob <radglob@users.noreply.github.com>

* Refactor(Text): move files to directory, add storybook and e2e tests. (#3189)

* Move Text files into directory, create storybook and e2e tests.

* Fix Text reference in src/index.ts, update snapshots.

* Update generated/components.json

* test(vrt): update snapshots

---------

Co-authored-by: radglob <radglob@users.noreply.github.com>

* Reduce ❌ for forks (#2283)

* Limit deploy to has pages

* Limit statuses to primer/react

* Limit stale to primer/react

* Preview cross org forks

---------

Co-authored-by: Mike Perrotti <mperrotti@github.com>
Co-authored-by: Rez <rezrah@github.com>
Co-authored-by: Josh Black <joshblack@github.com>

* Setup snapshots for visual regression for  experimental/Button2 (#3181)

* duplicate button into drafts

* update story title

* add visual tests for Button2

* test(vrt): update snapshots

---------

Co-authored-by: siddharthkp <siddharthkp@users.noreply.github.com>

* Version Packages (#3106)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Bug fix: `ButtonGroup` borders (#3198)

* fix hover borders

* Create wicked-knives-sparkle.md

* snaps

* why so many snaps?

* revert?

* test(vrt): update snapshots

---------

Co-authored-by: langermank <langermank@users.noreply.github.com>

* Refactor(Portal): move stories into Portal directory. (#3188)

* Move portal stories to portal directory.

* Reorganize portal stories into separate files for default and features.

* Generate e2e tests for portal components.

* Update generated/components.json

* Remove e2e portal tests as they do not play well with Playwright.

* Remove unnecessary decorator from story metadata.

---------

Co-authored-by: radglob <radglob@users.noreply.github.com>

* Use SSR-compatible slot implementation in ActionList/NavList (#3173)

* Migrate ActionList to use new slots impl

* Remove ActionList slots

* Remove unused import

* Create lemon-berries-run.md

* Update snapshots

* Fix slot description logic

* Fix style logic

* Fix conditional box logic

* Fix aria-labelledby logic

* Fix flexbox logic

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: radglob <radglob@users.noreply.github.com>
Co-authored-by: langermank <18661030+langermank@users.noreply.github.com>
Co-authored-by: joshblack <joshblack@users.noreply.github.com>
Co-authored-by: Josh Black <joshblack@github.com>
Co-authored-by: langermank <langermank@users.noreply.github.com>
Co-authored-by: Mike Perrotti <mperrotti@github.com>
Co-authored-by: Cole Bemis <colebemis@github.com>
Co-authored-by: Armağan <broccolinisoup@github.com>
Co-authored-by: broccolinisoup <broccolinisoup@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ian Sanders <iansan5653@github.com>
Co-authored-by: Ederson Lucas <27015559+edersonlucas@users.noreply.github.com>
Co-authored-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Co-authored-by: Rez <rezrah@github.com>
Co-authored-by: Siddharth Kshetrapal <siddharthkp@github.com>
Co-authored-by: siddharthkp <siddharthkp@users.noreply.github.com>
Co-authored-by: GitHub Design Systems Bot <30705008+primer-css@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip changeset This change does not need a changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants