Skip to content

Commit

Permalink
[nm] remove autofocus
Browse files Browse the repository at this point in the history
  • Loading branch information
a-type committed Feb 9, 2025
1 parent 3fe824c commit 385a444
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion apps/names/web/src/components/people/PersonDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function PersonDetails({ person, className }: PersonDetailsProps) {
onValueChange={(value) => person.set('name', value)}
className="text-xl"
/>
<Box d="col" items="stretch" className="px-md" gap>
<Box d="col" items="stretch" gap>
<Box className="text-xs text-gray-7" items="center" gap="sm">
<Icon name="clock" /> Added {new Date(createdAt).toLocaleDateString()}{' '}
(
Expand Down
14 changes: 9 additions & 5 deletions apps/names/web/src/components/people/PersonTagEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,20 @@ export function PersonTagEditor({ person }: PersonTagEditorProps) {
<Dialog>
<Dialog.Trigger asChild>
<Button size="small">
<Icon name="plus" />
<span>Tag</span>
<Icon name="plus" className="w-10px h-10px" />
<span className="text-xs">tag</span>
</Button>
</Dialog.Trigger>
<Dialog.Content className="flex flex-col gap-md">
<Dialog.Content className="flex flex-col">
<Suspense>
<TagFilter value={tags.getAll()} onToggle={toggleTag} />
<TagFilter
value={tags.getAll()}
onToggle={toggleTag}
className="mb-md"
/>
<TagCreateForm onCreate={createTag} defaultColor="leek" />
</Suspense>
<Dialog.Actions>
<Dialog.Actions className="border-0 border-t border-solid border-gray-5">
<Dialog.Close asChild>
<Button>Done</Button>
</Dialog.Close>
Expand Down
1 change: 0 additions & 1 deletion apps/names/web/src/components/superBar/SuperBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export function SuperBar({ className }: SuperBarProps) {
ref={inputRef}
className={clsx('w-full', !!inputValue ? 'pr-[32px]' : undefined)}
placeholder="Search or add..."
autoFocus
value={inputValue}
onValueChange={setInputValue}
onKeyDown={(e) => {
Expand Down
12 changes: 7 additions & 5 deletions packages/client/src/components/TagCreateForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ export function TagCreateForm({
{({ setFieldValue, values }) => (
<>
<Box gap items="end" className="w-full">
<TextField name="name" label="New tag" className="flex-1" />
<ColorPicker
onChange={(v) => setFieldValue('color', v)}
value={values.color ?? defaultColor ?? null}
/>
<TextField name="name" label="New tag" className="flex-1-0-0" />
<Box className="flex-basis-auto">
<ColorPicker
onChange={(v) => setFieldValue('color', v)}
value={values.color ?? defaultColor ?? null}
/>
</Box>
</Box>
<Box justify="end" className="w-full">
<SubmitButton type="submit">Create</SubmitButton>
Expand Down

0 comments on commit 385a444

Please sign in to comment.