-
Notifications
You must be signed in to change notification settings - Fork 53
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(slice-machine): add OwnerSelect in FieldSet's stories #1276
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Looks great! I really like how composable the FIeldSet components are. 🙂
I left few comments/suggestions.
|
||
type OrganizationSelectProps = { disabled?: boolean }; | ||
|
||
function OrganizationSelect(props: OrganizationSelectProps): ReactNode { |
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.
"Organization" is a GitHub-specific term and is only one kind of owner type (the other is "User"). The API uses the term "Owner" to represent an organization or user. Thus, we could replace references to "Organization" with "Owner". What do you think?
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.
I agree! I'll make the change.
constrainContentWidth | ||
flexContent | ||
placeholder="Organization" | ||
renderStartIcon={() => <GitHubIcon color={tokens.color.greyLight11} />} |
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.
The icon appears further away from the text than it should. I saw you opened a thread here: Open Slack
Will we eventually change <Select>
to use a smaller gap?
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.
I hope soon, but the conversation involves several team members with different priorities 😄
sx={{ width: "calc(50% - 8px)" }} | ||
> | ||
<SelectItem size="large" value="organization-1"> | ||
Organization |
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.
We may want to add icons to the select items to represent the Git provider. In this case, we would probably want a GitHub logo to appear next to each item. In the future, we would show different provider icons, like the GitLab and Bitbucket logos.
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.
Shouldn't we display a "user" or "organization" icon instead? ^^ For instance, if the user just selected GitHub in the previous step, I would expect the Select
to only contain items that are either GitHub users or GitHub organizations, no?
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.
We should probably support multiple connected accounts at once, like the Vercel "New Project" screen works:
They force switching Git providers, but I think we can support multiple providers at once. Thus, we would need to a way to differentiate providers.
I don't think owner type is as important as provider type since a user may add two accounts with the same name from different providers. The different between a user and team owner has less of an impact, but we could still display a "team" label next to team accounts.
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.
I've updated the code to display the provider's icon in each item ^^
2dc81a1
to
4f1298b
Compare
I'm merging @angeloashmore, but we can continue the conversation about the icons to display next to each |
No description provided.