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

SelectPanel: Update SelectPanel to use modern ActionList #4794

Draft
wants to merge 28 commits into
base: main
Choose a base branch
from

Conversation

broccolinisoup
Copy link
Member

Closes #

Changelog

New

Changed

Removed

Rollout strategy

  • Patch release
  • 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

Merge checklist

Copy link

changeset-bot bot commented Jul 30, 2024

⚠️ No Changeset found

Latest commit: 7b3d5e6

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

@github-actions github-actions bot added the staff Author is a staff member label Jul 30, 2024
@broccolinisoup broccolinisoup changed the title super wip Ignore - super wip selectpanel Jul 30, 2024
Copy link
Contributor

github-actions bot commented Jul 30, 2024

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 94.17 KB (-2.11% 🔽)
packages/react/dist/browser.umd.js 94.56 KB (-1.97% 🔽)

@github-actions github-actions bot temporarily deployed to storybook-preview-4794 July 31, 2024 05:35 Inactive
@broccolinisoup broccolinisoup added the skip changeset This change does not need a changelog label Jul 31, 2024
@broccolinisoup broccolinisoup changed the title Ignore - super wip selectpanel SelectPanel: Update SelectPanel to use modern ActionList Aug 1, 2024
Copy link
Collaborator

@camertron camertron left a comment

Choose a reason for hiding this comment

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

Awesome, nice work! As far as groups go, it looks like both the beta and deprecated versions of ActionList support them. Maybe we could create a sub-component called MappedActionListGroup? Then we could do something like:

function MappedActionListGroup({ items, header }: GroupProps) {
  return (
    <ActionList.Group>
      <ActionList.GroupHeading variant={header.variant}>
        {header.title}
      </ActionList.GroupHeading>
      {items.map((item) => <MappedActionList item={item}>)}
    </ActionList.Group>
  )
}

text,
variant,
disabled,
trailingVisual: TrailingVisual,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure if this is a common pattern, but I personally find it a bit confusing to use TitleCase for these renamed variables. Can we avoid renaming them, or name them something else, eg. originalTrailingVisual?

@primer-integration
Copy link

👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/337077

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 staff Author is a staff member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants