-
Notifications
You must be signed in to change notification settings - Fork 536
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 #4929
Conversation
👋 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! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @camertron! Thanks for addressing the feedback and apologies for the delay. Let's merge this 🚀
This reverts commit 843ea47.
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 correspondingReact.ChangeEvent
object. I was unable to figure out how to call it with a dummyReact.ChangeEvent
object, so I changed the type signature of the callback to allowundefined
for the event object.I used primer-query to identify all the existing usages of
SelectPanel
that pass aonFilterChange
callback and have determined that nobody is actually using at second event arg. We could probably remove it entirely.Removed
Rollout strategy
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
- [ ] Added/updated documentation