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

Merged
merged 41 commits into from
Jan 30, 2025

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: 6d12edc

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 105.47 KB (+0.88% 🔺)
packages/react/dist/browser.umd.js 105.77 KB (+0.85% 🔺)

@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:33 Inactive
@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 added integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Jan 27, 2025
Copy link
Contributor

👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks!

@github-actions github-actions bot temporarily deployed to storybook-preview-5139 January 27, 2025 20:04 Inactive
@github-actions github-actions bot added integration-tests: failing Changes in this PR cause breaking changes in gh/gh and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh labels Jan 27, 2025
@camertron
Copy link
Contributor

Dotcom integration tests are failing because of #5559, so we should be able to merge safely.

@github-actions github-actions bot temporarily deployed to storybook-preview-5139 January 27, 2025 23:11 Inactive
Copy link
Member

@francinelucca francinelucca left a comment

Choose a reason for hiding this comment

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

LGTM, non-blocking comments :shipit:

@github-actions github-actions bot temporarily deployed to storybook-preview-5139 January 28, 2025 18:06 Inactive
@camertron
Copy link
Contributor

Dotcom changes need to ship before this PR can be merged (internal-only link): https://github.com/github/github/pull/359822

@primer-integration
Copy link

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

@primer-integration
Copy link

🔴 golden-jobs completed with status failure.

@camertron camertron added this pull request to the merge queue Jan 30, 2025
Merged via the queue into main with commit 59e0efa Jan 30, 2025
44 checks passed
@camertron camertron deleted the revert-5136-revert-4929-select_panel_loading_states branch January 30, 2025 23:25
@primer primer bot mentioned this pull request Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests: failing Changes in this PR cause breaking changes in gh/gh staff Author is a staff member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants