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

feat(ad-hoc): Add create team dialog #8846

Merged
merged 71 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from 64 commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
e30c7a6
chore(one-on-one): add oneOnOne org feature flag
igorlesnenko Jul 26, 2023
d9686bb
chore(one-on-one): add one-on-one meeting template
igorlesnenko Jul 26, 2023
4e8958d
Change color
igorlesnenko Jul 27, 2023
a4c51b1
Merge branch 'master' of github.com:ParabolInc/parabol into oneonone-…
igorlesnenko Aug 2, 2023
a3d5b02
Put one on one in standup
igorlesnenko Aug 7, 2023
5a5bc42
Merge branch 'master' of github.com:ParabolInc/parabol into oneonone-…
igorlesnenko Aug 7, 2023
a8bc994
feat(one-on-one): allow oneOnOne input in startCheckIn mutation
igorlesnenko Aug 8, 2023
ea045d7
Merge branch 'master' of github.com:ParabolInc/parabol into oneonone-…
igorlesnenko Aug 9, 2023
b0aa11f
fix checkin
igorlesnenko Aug 9, 2023
31fe645
revert duplicate meeting check
igorlesnenko Aug 10, 2023
092ab6f
Remove userId option
igorlesnenko Aug 14, 2023
83f7d02
Publish team payload
igorlesnenko Aug 14, 2023
192056f
chore(one-on-one): Add user picker
igorlesnenko Aug 15, 2023
7d99836
Submit mutation
igorlesnenko Aug 15, 2023
c6feaeb
remove ui/input
igorlesnenko Aug 15, 2023
3082e9e
Code cleanup
igorlesnenko Aug 17, 2023
291adf2
chore(one-on-one): add user picker styles
igorlesnenko Aug 18, 2023
89f16d5
args validation
igorlesnenko Aug 21, 2023
3d2f558
prettier
igorlesnenko Aug 21, 2023
53e6a8f
generateOneOnOneTeamName
igorlesnenko Aug 21, 2023
f8a2d00
isOneOnOneTeam
igorlesnenko Aug 21, 2023
ac3e7ec
chore(one-on-one): show organiation picker if can't determine org aut…
igorlesnenko Aug 22, 2023
fb1d7b5
Enable multiple false
igorlesnenko Aug 22, 2023
69c68b7
Merge branch 'ooo-picker-styles' of github.com:ParabolInc/parabol int…
igorlesnenko Aug 22, 2023
0cee2c3
chore(one-on-one): Add team exists warning
igorlesnenko Aug 23, 2023
4de5d3d
use isOneOnOne team to find teams
igorlesnenko Aug 24, 2023
39ce1d2
Merge branch 'oneonone-adhoc-mutation' of github.com:ParabolInc/parab…
igorlesnenko Aug 28, 2023
fe0770d
Merge branch 'adhoc-input' of github.com:ParabolInc/parabol into ooo-…
igorlesnenko Aug 28, 2023
8df1d81
Merge branch 'ooo-picker-styles' of github.com:ParabolInc/parabol int…
igorlesnenko Aug 28, 2023
f45594f
Add analytics
igorlesnenko Aug 28, 2023
8b3a4ba
Show only mutual orgs
igorlesnenko Aug 28, 2023
1ec5798
Merge branch 'master' of github.com:ParabolInc/parabol into ooo-org-p…
igorlesnenko Aug 29, 2023
8504616
Merge branch 'ooo-org-picker' of github.com:ParabolInc/parabol into o…
igorlesnenko Aug 29, 2023
081e9b0
Show name in warning
igorlesnenko Aug 29, 2023
6f7cf37
Exclude self
igorlesnenko Aug 29, 2023
2517335
Add a validation
igorlesnenko Aug 30, 2023
ff7dcf6
Avatar
igorlesnenko Aug 30, 2023
f344dbd
fix meeting name
igorlesnenko Sep 11, 2023
81cd0a9
Separate files
igorlesnenko Sep 11, 2023
85b9bfe
Merge branch 'master' of github.com:ParabolInc/parabol into ooo-team-…
igorlesnenko Sep 11, 2023
4623603
simplify
igorlesnenko Sep 11, 2023
dffeb64
Remove useEffect
igorlesnenko Sep 11, 2023
083843f
autoselect
igorlesnenko Sep 12, 2023
7c1c947
Hide schedule button
igorlesnenko Sep 12, 2023
0023196
Move team exists check to organization
igorlesnenko Sep 13, 2023
550d10e
feat(ad-hoc): allow to create team from teams dropdown
igorlesnenko Sep 14, 2023
55c3de3
Rename component
igorlesnenko Sep 15, 2023
474cf5e
use organization(id)
igorlesnenko Sep 15, 2023
fb9e064
handleAddTeamClick
igorlesnenko Sep 18, 2023
235e1b8
Merge branch 'master' of github.com:ParabolInc/parabol into ooo-team-…
igorlesnenko Sep 19, 2023
072a26c
add Teammate Selected event
igorlesnenko Sep 19, 2023
2e87931
Merge branch 'ooo-team-exists-warning' of github.com:ParabolInc/parab…
igorlesnenko Sep 19, 2023
9797318
feat(ad-hoc): Add create team dialog
igorlesnenko Sep 19, 2023
5fc1f9f
Don't redirect after team creation
igorlesnenko Sep 20, 2023
f8e238d
Merge branch 'master' of github.com:ParabolInc/parabol into ad-hoc-di…
igorlesnenko Sep 22, 2023
168db2e
Fix new team select
igorlesnenko Sep 22, 2023
8f9cd40
automatically select team
igorlesnenko Sep 25, 2023
3646768
validation
igorlesnenko Sep 26, 2023
72fbd1c
remove comment
igorlesnenko Sep 26, 2023
6b7b44c
Auto-generate team name
igorlesnenko Sep 27, 2023
1293118
Add email expires warning
igorlesnenko Sep 27, 2023
254b623
Fix unnecessary spacing
igorlesnenko Sep 27, 2023
bc6d823
tweak padding
igorlesnenko Sep 27, 2023
46525c6
tweak select height
igorlesnenko Sep 27, 2023
47566e6
Add events
igorlesnenko Sep 28, 2023
0254bad
Show name length error from backend
igorlesnenko Sep 29, 2023
27f506e
Move styles outside
igorlesnenko Sep 29, 2023
399f91c
Remove React prefix
igorlesnenko Sep 29, 2023
2b804e0
Bigger button
igorlesnenko Sep 29, 2023
6da1745
Update styles
igorlesnenko Sep 29, 2023
cc91ab8
Don't show org picker if user has a single org
igorlesnenko Oct 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {LockOpen} from '@mui/icons-material'
import graphql from 'babel-plugin-relay/macro'
import clsx from 'clsx'
import React, {useState} from 'react'
import React, {useState, useEffect, useRef} from 'react'
import {useFragment} from 'react-relay'
import StartSprintPokerMutation from '~/mutations/StartSprintPokerMutation'
import {useHistory} from 'react-router'
Expand Down Expand Up @@ -132,12 +132,24 @@ const ActivityDetailsSidebar = (props: Props) => {
: // it is a team-scoped template, templateTeam must exist
[templateTeam!]

const availableTeamsRef = useRef(availableTeams)

useEffect(() => {
availableTeamsRef.current = availableTeams
igorlesnenko marked this conversation as resolved.
Show resolved Hide resolved
}, [availableTeams])

const [selectedTeam, setSelectedTeam] = useState(
() =>
availableTeams.find((team) => team.id === preferredTeamId) ??
templateTeam ??
sortByTier(availableTeams)[0]!
)

const onSelectTeam = (teamId: string) => {
const currentAvailableTeams = availableTeamsRef.current
const newTeam = currentAvailableTeams.find((team) => team.id === teamId)
newTeam && setSelectedTeam(newTeam)
}
const mutationProps = useMutationProps()
const {onError, onCompleted, submitting, submitMutation, error} = mutationProps
const history = useHistory()
Expand Down Expand Up @@ -322,10 +334,7 @@ const ActivityDetailsSidebar = (props: Props) => {
) : (
<NewMeetingTeamPicker
positionOverride={MenuPosition.UPPER_LEFT}
onSelectTeam={(teamId) => {
const newTeam = availableTeams.find((team) => team.id === teamId)
newTeam && setSelectedTeam(newTeam)
}}
onSelectTeam={onSelectTeam}
selectedTeamRef={selectedTeam}
teamsRef={availableTeams}
customPortal={teamScopePopover}
Expand Down
201 changes: 201 additions & 0 deletions packages/client/components/AddTeamDialog.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
import React, {useState} from 'react'
import {PreloadedQuery, usePreloadedQuery, useFragment} from 'react-relay'
import PrimaryButton from './PrimaryButton'
import SecondaryButton from './SecondaryButton'
import {Dialog} from '../ui/Dialog/Dialog'
import {DialogContent} from '../ui/Dialog/DialogContent'
import {DialogTitle} from '../ui/Dialog/DialogTitle'
import {DialogActions} from '../ui/Dialog/DialogActions'
import {Select} from '../ui/Select/Select'
import {SelectItem} from '../ui/Select/SelectItem'
import {SelectTrigger} from '../ui/Select/SelectTrigger'
import {SelectGroup} from '../ui/Select/SelectGroup'
import {SelectValue} from '../ui/Select/SelectValue'
import {SelectContent} from '../ui/Select/SelectContent'
import graphql from 'babel-plugin-relay/macro'
import {AddTeamDialogQuery} from '../__generated__/AddTeamDialogQuery.graphql'
import {AddTeamDialog_viewer$key} from '../__generated__/AddTeamDialog_viewer.graphql'
import useMutationProps from '../hooks/useMutationProps'
import useAtmosphere from '../hooks/useAtmosphere'
import {AdhocTeamMultiSelect, Option} from '../components/AdhocTeamMultiSelect/AdhocTeamMultiSelect'
import {Input} from '../ui/Input/Input'
import AddTeamMutation from '~/mutations/AddTeamMutation'
import useRouter from '~/hooks/useRouter'
import getGraphQLError from '~/utils/relay/getGraphQLError'

interface Props {
isOpen: boolean
onClose: () => void
onAddTeam: (teamId: string) => void
queryRef: PreloadedQuery<AddTeamDialogQuery>
}

const AddTeamDialogViewerFragment = graphql`
fragment AddTeamDialog_viewer on User {
...AdhocTeamMultiSelect_viewer
organizations {
id
name
}
}
`

const query = graphql`
query AddTeamDialogQuery {
viewer {
...AddTeamDialog_viewer
}
}
`

const AddTeamDialog = (props: Props) => {
const {isOpen, onClose, queryRef, onAddTeam} = props
const atmosphere = useAtmosphere()

const {submitting, onCompleted, onError, error, submitMutation} = useMutationProps()
const {history} = useRouter()

const data = usePreloadedQuery<AddTeamDialogQuery>(query, queryRef)
const viewer = useFragment<AddTeamDialog_viewer$key>(AddTeamDialogViewerFragment, data.viewer)
const {organizations: viewerOrganizations} = viewer

const labelStyles = `text-left text-sm font-semibold mb-3`
igorlesnenko marked this conversation as resolved.
Show resolved Hide resolved
const fieldsetStyles = `mx-0 mb-6 flex flex-col w-full p-0`

const [selectedUsers, setSelectedUsers] = React.useState<Option[]>([])
igorlesnenko marked this conversation as resolved.
Show resolved Hide resolved
const [mutualOrgsIds, setMutualOrgsIds] = React.useState<string[]>([])

const showOrgPicker = !!(
selectedUsers.length &&
(mutualOrgsIds.length > 1 || !mutualOrgsIds.length)
)
igorlesnenko marked this conversation as resolved.
Show resolved Hide resolved

const defaultOrgId = mutualOrgsIds[0]
const [selectedOrgId, setSelectedOrgId] = useState(defaultOrgId)
const [teamName, setTeamName] = useState('')
const [teamNameManuallyEdited, setTeamNameManuallyEdited] = useState(false)

const MAX_TEAM_NAME_LENGTH = 50
Copy link
Contributor

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?

Copy link
Contributor Author

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

const generateTeamName = (newUsers: Option[]) => {
return newUsers
.map((user) => (user.id ? user.label : user.email.split('@')[0]))
.join(', ')
.substring(0, MAX_TEAM_NAME_LENGTH)
}

const onSelectedUsersChange = (newUsers: Option[]) => {
setSelectedUsers(newUsers)
const selectedUsersOrganizationIds = new Set()
newUsers.forEach((user) => {
//add user.organizationIds to selectedUserOrganizationIds
user.organizationIds.forEach((organizationId) => {
selectedUsersOrganizationIds.add(organizationId)
})
})
igorlesnenko marked this conversation as resolved.
Show resolved Hide resolved

const mutualOrgs = viewerOrganizations.filter((org) => selectedUsersOrganizationIds.has(org.id))

const mutualOrgsIds = mutualOrgs.map((org) => org.id)
setMutualOrgsIds(mutualOrgsIds)
setSelectedOrgId(mutualOrgsIds[0] ?? viewerOrganizations[0]?.id)

if (!teamNameManuallyEdited) {
setTeamName(generateTeamName(newUsers))
}
}

const handleAddTeam = () => {
const newTeam = {
name: teamName.substring(0, MAX_TEAM_NAME_LENGTH),
orgId: selectedOrgId
}
submitMutation()

AddTeamMutation(
atmosphere,
{newTeam, invitees: selectedUsers.map((user) => user.email)},
{
onError,
onCompleted: (res, errors) => {
onCompleted(res, errors)
const error = getGraphQLError(res, errors)
if (!error) {
onAddTeam(res.addTeam.team.id)
}
},
history,
showTeamCreatedToast: false
}
)
}

const isValid = selectedUsers.length && teamName.trim()

return (
<Dialog isOpen={isOpen} onClose={onClose}>
<DialogContent className='z-10'>
<DialogTitle className='mb-4'>Add team</DialogTitle>

<fieldset className={fieldsetStyles}>
<label className={labelStyles}>Add teammates</label>

<AdhocTeamMultiSelect
viewerRef={viewer}
value={selectedUsers}
onChange={onSelectedUsersChange}
/>

{selectedUsers.some((user: Option) => !user.id) && (
<div className='mt-3 text-xs font-semibold text-slate-700'>
Email invitations expire in 30 days.
</div>
)}
</fieldset>

{showOrgPicker && (
Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Contributor

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

<fieldset className={fieldsetStyles}>
<label className={labelStyles}>Organization</label>
<Select onValueChange={(orgId) => setSelectedOrgId(orgId)} value={selectedOrgId}>
<SelectTrigger className='bg-white'>
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectGroup>
{viewerOrganizations
.filter((org) => (mutualOrgsIds.length ? mutualOrgsIds.includes(org.id) : true))
.map((org) => (
<SelectItem value={org.id} key={org.id}>
{org.name}
</SelectItem>
))}
</SelectGroup>
</SelectContent>
</Select>
</fieldset>
)}

<fieldset className={fieldsetStyles}>
<label className={labelStyles}>Team name</label>
<Input
Copy link
Contributor

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.

Copy link
Contributor Author

@igorlesnenko igorlesnenko Sep 29, 2023

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

onChange={(e) => {
!teamNameManuallyEdited && setTeamNameManuallyEdited(true)
igorlesnenko marked this conversation as resolved.
Show resolved Hide resolved
setTeamName(e.target.value)
}}
value={teamName}
/>
</fieldset>
{error && <div className='mt-2 text-sm font-semibold text-tomato-500'>{error.message}</div>}
<DialogActions>
<SecondaryButton onClick={onClose} size='small'>
Cancel
</SecondaryButton>
<PrimaryButton size='small' onClick={handleAddTeam} disabled={submitting || !isValid}>
Copy link
Contributor

Choose a reason for hiding this comment

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

+1 I'd prefer the buttons to be a bit larger as they feel slightly small to me:

Screenshot 2023-09-28 at 17 01 24

Copy link
Contributor Author

Choose a reason for hiding this comment

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

made bigger

image

Add team
</PrimaryButton>
</DialogActions>
</DialogContent>
</Dialog>
)
}

export default AddTeamDialog
26 changes: 26 additions & 0 deletions packages/client/components/AddTeamDialogRoot.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React, {Suspense} from 'react'
import AddTeamDialog from './AddTeamDialog'
import {renderLoader} from '../utils/relay/renderLoader'
import useQueryLoaderNow from '../hooks/useQueryLoaderNow'
import addTeamDialogQuery, {AddTeamDialogQuery} from '../__generated__/AddTeamDialogQuery.graphql'

interface Props {
onClose: () => void
onAddTeam: (teamId: string) => void
}

const AddTeamDialogRoot = (props: Props) => {
const {onClose, onAddTeam} = props

const queryRef = useQueryLoaderNow<AddTeamDialogQuery>(addTeamDialogQuery, {}, 'network-only')

return (
<Suspense fallback={renderLoader()}>
{queryRef && (
<AddTeamDialog onAddTeam={onAddTeam} isOpen={true} onClose={onClose} queryRef={queryRef} />
Copy link
Contributor

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.

Copy link
Contributor Author

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

)}
</Suspense>
)
}

export default AddTeamDialogRoot
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export const AdhocTeamMultiSelect = (props: Props) => {
className='m-0 box-border min-h-[36px] w-0 min-w-[30px] flex-grow border-0 bg-white pl-1 text-black outline-none'
/>
</div>
<div className='mt-2 text-sm font-semibold text-tomato-500'>{error}</div>
{error && <div className='mt-2 text-sm font-semibold text-tomato-500'>{error}</div>}
</div>
{groupedOptions.length > 0 ? (
<ul
Expand Down
16 changes: 15 additions & 1 deletion packages/client/components/NewMeetingTeamPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import NewMeetingDropdown from './NewMeetingDropdown'
import NewMeetingTeamPickerAvatars from './NewMeetingTeamPickerAvatars'
import useAtmosphere from '../hooks/useAtmosphere'
import setPreferredTeamId from '../utils/relay/setPreferredTeamId'
import AddTeamDialogRoot from '~/components/AddTeamDialogRoot'

const SelectTeamDropdown = lazyPreload(
() =>
Expand Down Expand Up @@ -39,6 +40,8 @@ const NewMeetingTeamPicker = (props: Props) => {
}
)

const [addTeamDialogOpen, setAddTeamDialogOpen] = React.useState(false)

const atmosphere = useAtmosphere()

const handleSelectTeam = (teamId: string) => {
Expand All @@ -47,7 +50,7 @@ const NewMeetingTeamPicker = (props: Props) => {
}

const handleAddTeamClick = () => {
window.open(`/newteam/1`, '_blank', 'noreferrer')
setAddTeamDialogOpen(true)
igorlesnenko marked this conversation as resolved.
Show resolved Hide resolved
}

const selectedTeam = useFragment(
Expand Down Expand Up @@ -96,6 +99,17 @@ const NewMeetingTeamPicker = (props: Props) => {
/>
)
)}
{addTeamDialogOpen && (
<AddTeamDialogRoot
onAddTeam={(teamId) => {
setAddTeamDialogOpen(false)
handleSelectTeam(teamId)
}}
onClose={() => {
setAddTeamDialogOpen(false)
}}
/>
)}
</>
)
}
Expand Down
12 changes: 9 additions & 3 deletions packages/client/mutations/AddTeamMutation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ graphql`
...NewTeamForm_teams
...MeetingsDashActiveMeetings
...Team_team
...ActivityDetailsSidebar_teams
}
}
`
Expand Down Expand Up @@ -71,10 +72,13 @@ export const addTeamMutationNotificationUpdater: SharedUpdater<
handleRemoveSuggestedActions(removedSuggestedActionId, store)
}

const AddTeamMutation: StandardMutation<TAddTeamMutation, HistoryLocalHandler> = (
type ExtendedHistoryLocalHandler = HistoryLocalHandler & {
showTeamCreatedToast?: boolean
}
const AddTeamMutation: StandardMutation<TAddTeamMutation, ExtendedHistoryLocalHandler> = (
atmosphere,
variables,
{history, onError, onCompleted}
{history, onError, onCompleted, showTeamCreatedToast = true}
) => {
return commitMutation<TAddTeamMutation>(atmosphere, {
mutation,
Expand All @@ -91,7 +95,9 @@ const AddTeamMutation: StandardMutation<TAddTeamMutation, HistoryLocalHandler> =
if (!error) {
const {authToken} = addTeam
atmosphere.setAuthToken(authToken)
popTeamCreatedToast(addTeam, {atmosphere, history})
if (showTeamCreatedToast) {
popTeamCreatedToast(addTeam, {atmosphere, history})
}
}
},
onError
Expand Down
21 changes: 21 additions & 0 deletions packages/client/ui/Input/Input.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import * as React from 'react'

import {twMerge} from 'tailwind-merge'

export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}

export const Input = React.forwardRef<HTMLInputElement, InputProps>(
igorlesnenko marked this conversation as resolved.
Show resolved Hide resolved
({className, type, ...props}, ref) => {
return (
<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',
Copy link
Contributor

Choose a reason for hiding this comment

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

-1 on focus, this new input is blue, but the rest of our inputs go from grey to black. Also, the font is bolder in this input vs others.

Screenshot 2023-09-28 at 17 23 58

Screenshot 2023-09-28 at 17 22 10

Copy link
Contributor Author

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

Copy link
Contributor

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!

Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated:

image

className
)}
ref={ref}
{...props}
/>
)
}
)
2 changes: 1 addition & 1 deletion packages/client/ui/Select/SelectTrigger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const SelectTrigger = React.forwardRef<HTMLButtonElement, SelectTriggerPr
<RadixSelect.Trigger
ref={ref}
className={twMerge(
'flex h-10 w-full cursor-pointer items-center justify-between 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-[state=open]:border-sky-500 data-[placeholder]:text-slate-600',
'flex h-11 w-full cursor-pointer items-center justify-between 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-[state=open]:border-sky-500 data-[placeholder]:text-slate-600',
className
)}
{...props}
Expand Down
Loading