-
Notifications
You must be signed in to change notification settings - Fork 337
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(ad-hoc): Add create team dialog #8846
Conversation
…ol into adhoc-input
@tghanken can you please advise what events do I need to add here? |
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 noticed this little bug while testing: https://www.loom.com/share/90dd014360bc44ce8d28312134d5a808
@nickoferrall that is interesting bug, I iterate
Not sure that is expected behaviour of the app. Is it possible that some of the DB data is wrong and you have yourself added to the org twice? |
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 try to keep the analytics here in line with what we did for 1:1 teams, there are two places that I see to add events in.
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.
Here's my other comment, I missed hitting add to review the first time 😮💨
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.
Two small changes and then it LGTM!
)} | ||
</fieldset> | ||
|
||
{showOrgPicker && ( |
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.
+1 I think the org picker should always be visible so the height of the modal doesn't change when you select an item. It would also be reassuring for me that I've selected the right team from the right org
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.
If org picker will be always visible it will show one single org in most of cases. Would this be ok? Tagging @acressall for this design question
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 actually don't mind the small height change. I suspect that a lot of users aren't aware of the concept of orgs, and it could be especially confusing in this context, so I only want to bring it up when we actually need the information
packages/client/ui/Input/Input.tsx
Outdated
<input | ||
type={type} | ||
className={twMerge( | ||
'flex h-11 w-full rounded border-2 border-slate-300 bg-transparent px-2 py-1 text-sm font-semibold focus:outline-none focus-visible:border-sky-500 disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-slate-600', |
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.
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 made a new input to be matched with new select and multi select components we introduced previously. Not sure if I need to change it to match our old components, tagging @acressall for this question
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 design team has been working add focus states, and they are all sky 500, so this is good!
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 think the weight is incorrect though, in the designs the label is semibold, but the placeholder and input are regular
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.
<SecondaryButton onClick={onClose} size='small'> | ||
Cancel | ||
</SecondaryButton> | ||
<PrimaryButton size='small' onClick={handleAddTeam} disabled={submitting || !isValid}> |
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.
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.
|
||
<fieldset className={fieldsetStyles}> | ||
<label className={labelStyles}>Team name</label> | ||
<Input |
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.
-1 we're enforcing a team name length limit of 50 characters, but not giving users feedback that that will happen. So if I create a team with 55 characters, the last 5 characters get removed without me knowing.
We could add maxLength={MAX_TEAM_NAME_LENGTH}
to the input. Or, for the optimal UX, we could give the user some feedback that there's a limit.
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 just removed this now, and allow backend to validate this. I think rarely someone would type 50 chars
const [teamName, setTeamName] = useState('') | ||
const [teamNameManuallyEdited, setTeamNameManuallyEdited] = useState(false) | ||
|
||
const MAX_TEAM_NAME_LENGTH = 50 |
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.
+1 it looks like the limit in pg is 100 characters so I was wondering why 50 here?
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.
@nickoferrall we have 50 characters validation set on the backend and when we creating a team from http://localhost:3000/newteam/1. So I kept it as is here too
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.
Analytics look good!
@nickoferrall so was it some wrong data in the DB? |
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.
@nickoferrall so was it some wrong data in the DB?
Yep, that was it. LGTM!
return ( | ||
<Suspense fallback={renderLoader()}> | ||
{queryRef && ( | ||
<AddTeamDialog onAddTeam={onAddTeam} isOpen={true} onClose={onClose} queryRef={queryRef} /> |
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.
+1 normally one would mount the dialog and then only modify isOpen
so we can get a transition.
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.
Transition works for me like this. Can you record a video?
I'll merge this PR in the mean time, and will fix it in next PRs if it is an issue
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
Fixes #8827
Not included:
How to test:
adHocTeam
user-level feature flag