-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
feat: add GroupListPicker component #14005
Conversation
Signed-off-by: djamaile <rdjamaile@gmail.com>
Changed Packages
|
Signed-off-by: djamaile <rdjamaile@gmail.com>
Signed-off-by: djamaile <rdjamaile@gmail.com>
Signed-off-by: djamaile <rdjamaile@gmail.com>
Signed-off-by: Mathias Bronner <mathiasb@spotify.com>
Signed-off-by: Mathias Bronner <mathiasb@spotify.com>
Signed-off-by: Mathias Bronner <mathiasb@spotify.com>
Signed-off-by: Mathias Bronner <mathiasb@spotify.com>
Signed-off-by: djamaile <rdjamaile@gmail.com>
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.
like this - some smaller things - hopefully I'm not to picky here. In general - did you consider splitting up the component in e.g. a GroupListPickerPopover
(containing only the Popover & relevant state) & GroupListPicker
? :)
plugins/catalog-react/src/components/GroupListPicker/GroupListPicker.tsx
Outdated
Show resolved
Hide resolved
plugins/catalog-react/src/components/GroupListPicker/GroupListPicker.tsx
Outdated
Show resolved
Hide resolved
plugins/catalog-react/src/components/GroupListPicker/GroupListPicker.tsx
Outdated
Show resolved
Hide resolved
plugins/catalog-react/src/components/GroupListPicker/GroupListPicker.tsx
Outdated
Show resolved
Hide resolved
plugins/catalog-react/src/components/GroupListPicker/GroupListPicker.tsx
Outdated
Show resolved
Hide resolved
…Picker.tsx Co-authored-by: Philipp Hugenroth <tudi2d@users.noreply.github.com> Signed-off-by: djamaile <rdjamaile@gmail.com>
plugins/catalog-react/src/components/GroupListPicker/GroupListPicker.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: djamaile <rdjamaile@gmail.com>
Signed-off-by: djamaile <rdjamaile@gmail.com>
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If you are the author and the PR has been closed, feel free to re-open the PR and continue the contribution! |
PRs can get stale?! Def not stale, just waiting on a review. |
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.
Thanks! 👍 Couple of nits
Another thing I'm wondering is how you feel about the placement of this in catalog-react
vs something like org-react
. It feels a bit off to have kind-specific components in catalog-react
tbh, it's already a pretty large library. It also conflicts quite heavily with the UserListPicker
, which is a different type of component that helps filter catalog index pages.
plugins/catalog-react/src/components/GroupListPicker/GroupListPicker.tsx
Outdated
Show resolved
Hide resolved
plugins/catalog-react/src/components/GroupListPicker/GroupListPicker.tsx
Outdated
Show resolved
Hide resolved
options={groups ?? []} | ||
groupBy={option => option.spec.type} | ||
getOptionLabel={option => | ||
option.spec.profile?.displayName ?? option.metadata.name |
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.
Probably want to include the namespace here as well if it's not default
. humanizeEntityRef
can help out there
}); | ||
|
||
return groupsList.items as GroupEntity[]; | ||
}, [catalogApi]); |
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.
This needs to depend on the groupTypes
as well right?
* | ||
* @public | ||
*/ | ||
export type GroupListPickerProps = { |
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.
How is one supposed to get a hold of the selected group? 😅
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.
Isn't it the defaultGroup
prop? Or do you mean something different? 💭
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.
As someone using this component in my own page, how do I know what group the user ended up picking?
@Rugvip I agree that |
@djamaile yep a new |
Signed-off-by: djamaile <rdjamaile@gmail.com>
Signed-off-by: djamaile <rdjamaile@gmail.com>
Signed-off-by: djamaile <rdjamaile@gmail.com>
Signed-off-by: djamaile <rdjamaile@gmail.com>
Signed-off-by: djamaile <rdjamaile@gmail.com>
.github/CODEOWNERS
Outdated
@@ -49,6 +49,7 @@ yarn.lock @backstage/reviewers @backst | |||
/plugins/kubernetes @backstage/reviewers @backstage/warpspeed | |||
/plugins/kubernetes-* @backstage/reviewers @backstage/warpspeed | |||
/plugins/newrelic-dashboard @backstage/reviewers @mufaddal7 | |||
/plugins/org-react @backstage/reviewers |
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.
@Rugvip Is this the right owner? Does it need an owner at all?
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.
You can skip the explicit owner, there's a catch-all at the bottom that handles this
Signed-off-by: djamaile <rdjamaile@gmail.com>
@Rugvip its all green, feel free to review again 😸 |
Signed-off-by: djamaile <rdjamaile@gmail.com>
Signed-off-by: djamaile <rdjamaile@gmail.com>
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.
🎉
CC @backstage/maintainers for the addition of the org-react
package
plugins/org-react/src/components/GroupListPicker/GroupListPicker.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: djamaile <rdjamaile@gmail.com>
Signed-off-by: djamaile <rdjamaile@gmail.com>
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.
Another round! 🍻
plugins/org-react/src/components/GroupListPicker/GroupListPicker.test.tsx
Outdated
Show resolved
Hide resolved
plugins/org-react/src/components/GroupListPicker/GroupListPicker.tsx
Outdated
Show resolved
Hide resolved
plugins/org-react/src/components/GroupListPicker/GroupListPickerButton.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: djamaile <rdjamaile@gmail.com>
@mathiasbronner Sorry, for the long wait! Besides me making silly mistakes we also had our offsite + BackstageCon in Detroit. So, things have been slower than normal. I hope to get this in the next release 😄 |
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
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.
Let's 😁
Thank you for contributing during Hacktoberfest 🍂! You can claim the Backstage Hacktoberfest Holopin at https://bck.st/hacktoberfest-holopin 🙌🏻 |
Signed-off-by: djamaile rdjamaile@gmail.com
Hey, I just made a Pull Request!
✔️ Checklist
Signed-off-by
line in the message. (more info)