Small Bug Fixes and Improvements

This commit is contained in:
Ahmad 2025-01-15 20:48:47 -05:00
parent dbbd727554
commit 8c3b4b734e
No known key found for this signature in database
GPG key ID: 8FD8A93530D182BF
10 changed files with 106 additions and 22 deletions

View file

@ -50,14 +50,14 @@ BoardLiveblocks.Skeleton = function SkeletonBoardLiveblocks() {
<div className='h-full overflow-x-auto p-4'>
<ol className='flex h-full gap-x-3'>
<li className='h-full w-[272px] shrink-0 select-none'>
<div className='w-full rounded-md bg-[#f1f2f4] pb-2 shadow-md'>
<div className='w-full rounded-md bg-[#f1f2f4] pb-2 shadow-md dark:bg-[#1f1f1f]'>
<div className='flex items-start justify-between gap-x-2 px-2 pt-2 text-sm font-semibold'>
<Skeleton className='h-7 truncate border-transparent bg-transparent px-[7px] py-1 text-sm font-medium' />
</div>
<ol className='mx-1 mt-2 flex flex-col gap-y-2 px-1 py-0.5'>
<Skeleton className='h-12 space-y-2 truncate rounded-md border-2 border-transparent bg-white px-3 py-2 text-sm shadow-sm' />
<Skeleton className='h-24 space-y-2 truncate rounded-md border-2 border-transparent bg-white px-3 py-2 text-sm shadow-sm' />
<Skeleton className='h-16 space-y-2 truncate rounded-md border-2 border-transparent bg-white px-3 py-2 text-sm shadow-sm' />
<Skeleton className='h-12 space-y-2 truncate rounded-md border-2 border-transparent bg-white px-3 py-2 text-sm shadow-sm dark:bg-black' />
<Skeleton className='h-24 space-y-2 truncate rounded-md border-2 border-transparent bg-white px-3 py-2 text-sm shadow-sm dark:bg-black' />
<Skeleton className='h-16 space-y-2 truncate rounded-md border-2 border-transparent bg-white px-3 py-2 text-sm shadow-sm dark:bg-black' />
</ol>
</div>
</li>

View file

@ -76,7 +76,7 @@ export const ListForm = () => {
className='h-7 border-transparent px-2 py-1 text-sm font-medium transition hover:border-input focus:border-input'
placeholder='Enter list title...'
/>
<input hidden value={params.boardId} name='boardId' />
<input hidden defaultValue={params.boardId} name='boardId' />
<div className='flex items-center gap-x-1'>
<FormSubmit>Add list</FormSubmit>
<Button onClick={disableEditing} size='sm' variant='ghost'>

View file

@ -88,7 +88,7 @@ export const ListHeader = ({ data, onAddCard }: ListHeaderProps) => {
id='title'
placeholder='Enter list title...'
defaultValue={title}
className='h-7 truncate border-transparent bg-transparent px-[7px] py-1 text-sm font-medium transition hover:border-input focus:border-input focus:bg-white'
className='h-7 truncate border-transparent bg-transparent px-[7px] py-1 text-sm font-medium transition hover:border-input focus:border-input focus:bg-white dark:focus:bg-black'
/>
<button hidden type='submit' />
</form>

View file

@ -68,12 +68,12 @@ export const ListOptions = ({ data, onAddCard }: ListOptionsProps) => {
</Button>
</PopoverTrigger>
<PopoverContent className='px-0 pb-3 pt-3' side='bottom' align='start'>
<div className='pb-4 text-center text-sm font-medium text-neutral-600'>
<div className='pb-4 text-center text-sm font-medium text-neutral-600 dark:text-neutral-200'>
List Actions
</div>
<PopoverClose ref={closeRef} asChild>
<Button
className='absolute right-2 top-2 h-auto w-auto p-2 text-neutral-600'
className='absolute right-2 top-2 h-auto w-auto p-2 text-neutral-600 dark:text-neutral-200'
variant='ghost'
>
<X className='h-4 w-4' />
@ -87,8 +87,13 @@ export const ListOptions = ({ data, onAddCard }: ListOptionsProps) => {
Add card...
</Button>
<form action={onCopy}>
<input hidden name='id' id='id' value={data.id} />
<input hidden name='boardId' id='boardId' value={data.boardId} />
<input hidden name='id' id='id' defaultValue={data.id} />
<input
hidden
name='boardId'
id='boardId'
defaultValue={data.boardId}
/>
<FormSubmit
className='h-auto w-full justify-start rounded-none p-2 px-5 text-sm font-normal'
variant='ghost'
@ -98,10 +103,15 @@ export const ListOptions = ({ data, onAddCard }: ListOptionsProps) => {
</form>
<Separator />
<form action={onDelete}>
<input hidden name='id' id='id' value={data.id} />
<input hidden name='boardId' id='boardId' value={data.boardId} />
<input hidden name='id' id='id' defaultValue={data.id} />
<input
hidden
name='boardId'
id='boardId'
defaultValue={data.boardId}
/>
<FormSubmit
className='h-auto w-full justify-start rounded-none p-2 px-5 text-sm font-normal text-destructive hover:text-destructive'
className='h-auto w-full justify-start rounded-none p-2 px-5 text-sm font-normal text-destructive hover:text-destructive dark:text-red-500 dark:hover:text-red-500'
variant='ghost'
>
Delete this list