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

[Select panel] Loading states re-submission #5139

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

Conversation

broccolinisoup
Copy link
Member

@broccolinisoup broccolinisoup commented Oct 17, 2024

This PR is a re-submission of #4929

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

Body spinner

Alt: a video of a button that, when clicked, opens a SelectPanel. There is a spinner where the list of items should be. After a few seconds, the spinner is replaced by the list of items.

body_spinner.mov

Body skeleton

Alt: a video of a button that, when clicked, opens a SelectPanel. There is a list of animated skeletons where the list of items should be. After a few seconds, the skeleton is replaced by the list of items.

body_skeleton.mov

Input spinner

Alt: a video of an open SelectPanel. The letter "b" is entered into the filter input field. After a slight delay, a spinner appears inside the input field, replacing the magnifying glass icon that was there before. A few seconds later, the spinner is replaced the magnifying glass and the list of items is replaced by a filtered list of items. Each item contains the letter "b."

input_spinner.mov

Changelog

New

Changed

In order to trigger loading the initial list of items, I had to manually call the onFilterChange callback, which is expected to be called with the filter input value (i.e. the text the user entered) and the corresponding React.ChangeEvent object. I was unable to figure out how to call it with a dummy React.ChangeEvent object, so I changed the type signature of the callback to allow undefined for the event object.

I used primer-query to identify all the existing usages of SelectPanel that pass a onFilterChange callback and have determined that nobody is actually using at second event arg. We could probably remove it entirely.

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

I'm conflicted here. On the one hand, this is technically a breaking change and should therefore necessitate a major release. On the other hand, nobody in dotcom uses the second event parameter, so could be considered backwards-compatible if we consider dotcom to be our only consumer. Looking for feedback here.

Testing & Reviewing

Merge checklist

Copy link

changeset-bot bot commented Oct 17, 2024

🦋 Changeset detected

Latest commit: 543ff54

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

@github-actions github-actions bot added the staff Author is a staff member label Oct 17, 2024
Copy link
Contributor

👋 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 github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Oct 17, 2024
@github-actions github-actions bot temporarily deployed to storybook-preview-5139 October 17, 2024 01:34 Inactive
Copy link
Contributor

github-actions bot commented Oct 17, 2024

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 98.97 KB (+0.49% 🔺)
packages/react/dist/browser.umd.js 99.52 KB (+0.73% 🔺)

@broccolinisoup broccolinisoup marked this pull request as draft October 17, 2024 01:47
@github-actions github-actions bot temporarily deployed to storybook-preview-5139 October 21, 2024 18:38 Inactive
@camertron camertron changed the title Reopen "Select panel loading states"" Reopen "Select panel loading states" Oct 21, 2024
@camertron camertron changed the title Reopen "Select panel loading states" [Select panel] Loading states re-submission Oct 21, 2024
@github-actions github-actions bot temporarily deployed to storybook-preview-5139 October 21, 2024 20:21 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-5139 October 22, 2024 19:00 Inactive
@joshblack joshblack removed their request for review October 22, 2024 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm staff Author is a staff member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants