Skip to content

Commit a94f8b9

Browse files
imrja8fredhii
andcommitted
fix(ui): vertically align enable submodules and improve watchpath button a11y
- Properly negate FormItem spacing for the 'Enable Submodules' toggle inline layout - Drop redundant focus outline hide and add aria-label for watchpath delete buttons Co-authored-by: Fredy Acuña <[email protected]>
1 parent ae95485 commit a94f8b9

10 files changed

Lines changed: 40 additions & 30 deletions

‎apps/dokploy/components/dashboard/application/general/generic/save-bitbucket-provider.tsx‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,8 @@ export const SaveBitbucketProvider = ({ applicationId }: Props) => {
440440
{path}
441441
<button
442442
type="button"
443-
className="ml-1 cursor-pointer hover:text-destructive focus:outline-none"
443+
aria-label="Remove watch path"
444+
className="ml-1 cursor-pointer hover:text-destructive"
444445
onClick={() => {
445446
const newPaths = [...(field.value || [])];
446447
newPaths.splice(index, 1);
@@ -496,14 +497,14 @@ export const SaveBitbucketProvider = ({ applicationId }: Props) => {
496497
control={form.control}
497498
name="enableSubmodules"
498499
render={({ field }) => (
499-
<FormItem className="flex items-center space-x-2">
500+
<FormItem className="flex flex-row items-center space-x-2 space-y-0">
500501
<FormControl>
501502
<Switch
502503
checked={field.value}
503504
onCheckedChange={field.onChange}
504505
/>
505506
</FormControl>
506-
<FormLabel className="mt-0!">Enable Submodules</FormLabel>
507+
<FormLabel>Enable Submodules</FormLabel>
507508
</FormItem>
508509
)}
509510
/>

‎apps/dokploy/components/dashboard/application/general/generic/save-git-provider.tsx‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,8 @@ export const SaveGitProvider = ({ applicationId }: Props) => {
244244
{path}
245245
<button
246246
type="button"
247-
className="ml-1 cursor-pointer hover:text-destructive focus:outline-none"
247+
aria-label="Remove watch path"
248+
className="ml-1 cursor-pointer hover:text-destructive"
248249
onClick={() => {
249250
const newPaths = [...(field.value || [])];
250251
newPaths.splice(index, 1);
@@ -301,14 +302,14 @@ export const SaveGitProvider = ({ applicationId }: Props) => {
301302
control={form.control}
302303
name="enableSubmodules"
303304
render={({ field }) => (
304-
<FormItem className="flex items-center space-x-2">
305+
<FormItem className="flex flex-row items-center space-x-2 space-y-0">
305306
<FormControl>
306307
<Switch
307308
checked={field.value}
308309
onCheckedChange={field.onChange}
309310
/>
310311
</FormControl>
311-
<FormLabel className="mt-0!">Enable Submodules</FormLabel>
312+
<FormLabel>Enable Submodules</FormLabel>
312313
</FormItem>
313314
)}
314315
/>

‎apps/dokploy/components/dashboard/application/general/generic/save-gitea-provider.tsx‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,8 @@ export const SaveGiteaProvider = ({ applicationId }: Props) => {
468468
{path}
469469
<button
470470
type="button"
471-
className="cursor-pointer hover:text-destructive focus:outline-none"
471+
aria-label="Remove watch path"
472+
className="cursor-pointer hover:text-destructive"
472473
onClick={() => {
473474
const newPaths = [...(field.value || [])];
474475
newPaths.splice(index, 1);
@@ -523,14 +524,14 @@ export const SaveGiteaProvider = ({ applicationId }: Props) => {
523524
control={form.control}
524525
name="enableSubmodules"
525526
render={({ field }) => (
526-
<FormItem className="flex items-center space-x-2">
527+
<FormItem className="flex flex-row items-center space-x-2 space-y-0">
527528
<FormControl>
528529
<Switch
529530
checked={field.value}
530531
onCheckedChange={field.onChange}
531532
/>
532533
</FormControl>
533-
<FormLabel className="mt-0!">Enable Submodules</FormLabel>
534+
<FormLabel>Enable Submodules</FormLabel>
534535
</FormItem>
535536
)}
536537
/>

‎apps/dokploy/components/dashboard/application/general/generic/save-github-provider.tsx‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,8 @@ export const SaveGithubProvider = ({ applicationId }: Props) => {
480480
{path}
481481
<button
482482
type="button"
483-
className="cursor-pointer hover:text-destructive focus:outline-none"
483+
aria-label="Remove watch path"
484+
className="cursor-pointer hover:text-destructive"
484485
onClick={() => {
485486
const newPaths = [...(field.value || [])];
486487
newPaths.splice(index, 1);
@@ -537,14 +538,14 @@ export const SaveGithubProvider = ({ applicationId }: Props) => {
537538
control={form.control}
538539
name="enableSubmodules"
539540
render={({ field }) => (
540-
<FormItem className="flex items-center space-x-2">
541+
<FormItem className="flex flex-row items-center space-x-2 space-y-0">
541542
<FormControl>
542543
<Switch
543544
checked={field.value}
544545
onCheckedChange={field.onChange}
545546
/>
546547
</FormControl>
547-
<FormLabel className="mt-0!">Enable Submodules</FormLabel>
548+
<FormLabel>Enable Submodules</FormLabel>
548549
</FormItem>
549550
)}
550551
/>

‎apps/dokploy/components/dashboard/application/general/generic/save-gitlab-provider.tsx‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,8 @@ export const SaveGitlabProvider = ({ applicationId }: Props) => {
461461
{path}
462462
<button
463463
type="button"
464-
className="cursor-pointer hover:text-destructive focus:outline-none"
464+
aria-label="Remove watch path"
465+
className="cursor-pointer hover:text-destructive"
465466
onClick={() => {
466467
const newPaths = [...(field.value || [])];
467468
newPaths.splice(index, 1);
@@ -516,14 +517,14 @@ export const SaveGitlabProvider = ({ applicationId }: Props) => {
516517
control={form.control}
517518
name="enableSubmodules"
518519
render={({ field }) => (
519-
<FormItem className="flex items-center space-x-2">
520+
<FormItem className="flex flex-row items-center space-x-2 space-y-0">
520521
<FormControl>
521522
<Switch
522523
checked={field.value}
523524
onCheckedChange={field.onChange}
524525
/>
525526
</FormControl>
526-
<FormLabel className="mt-0!">Enable Submodules</FormLabel>
527+
<FormLabel>Enable Submodules</FormLabel>
527528
</FormItem>
528529
)}
529530
/>

‎apps/dokploy/components/dashboard/compose/general/generic/save-bitbucket-provider-compose.tsx‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,8 @@ export const SaveBitbucketProviderCompose = ({ composeId }: Props) => {
444444
{path}
445445
<button
446446
type="button"
447-
className="ml-1 cursor-pointer hover:text-destructive focus:outline-none"
447+
aria-label="Remove watch path"
448+
className="ml-1 cursor-pointer hover:text-destructive"
448449
onClick={() => {
449450
const newPaths = [...(field.value || [])];
450451
newPaths.splice(index, 1);
@@ -500,14 +501,14 @@ export const SaveBitbucketProviderCompose = ({ composeId }: Props) => {
500501
control={form.control}
501502
name="enableSubmodules"
502503
render={({ field }) => (
503-
<FormItem className="flex items-center space-x-2">
504+
<FormItem className="flex flex-row items-center space-x-2 space-y-0">
504505
<FormControl>
505506
<Switch
506507
checked={field.value}
507508
onCheckedChange={field.onChange}
508509
/>
509510
</FormControl>
510-
<FormLabel className="mt-0!">Enable Submodules</FormLabel>
511+
<FormLabel>Enable Submodules</FormLabel>
511512
</FormItem>
512513
)}
513514
/>

‎apps/dokploy/components/dashboard/compose/general/generic/save-git-provider-compose.tsx‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,8 @@ export const SaveGitProviderCompose = ({ composeId }: Props) => {
253253
{path}
254254
<button
255255
type="button"
256-
className="ml-1 cursor-pointer hover:text-destructive focus:outline-none"
256+
aria-label="Remove watch path"
257+
className="ml-1 cursor-pointer hover:text-destructive"
257258
onClick={() => {
258259
const newPaths = [...(field.value || [])];
259260
newPaths.splice(index, 1);
@@ -309,14 +310,14 @@ export const SaveGitProviderCompose = ({ composeId }: Props) => {
309310
control={form.control}
310311
name="enableSubmodules"
311312
render={({ field }) => (
312-
<FormItem className="flex items-center space-x-2">
313+
<FormItem className="flex flex-row items-center space-x-2 space-y-0">
313314
<FormControl>
314315
<Switch
315316
checked={field.value}
316317
onCheckedChange={field.onChange}
317318
/>
318319
</FormControl>
319-
<FormLabel className="mt-0!">Enable Submodules</FormLabel>
320+
<FormLabel>Enable Submodules</FormLabel>
320321
</FormItem>
321322
)}
322323
/>

‎apps/dokploy/components/dashboard/compose/general/generic/save-gitea-provider-compose.tsx‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,8 @@ export const SaveGiteaProviderCompose = ({ composeId }: Props) => {
433433
{path}
434434
<button
435435
type="button"
436-
className="ml-1 cursor-pointer hover:text-destructive focus:outline-none"
436+
aria-label="Remove watch path"
437+
className="ml-1 cursor-pointer hover:text-destructive"
437438
onClick={() => {
438439
const newPaths = [...(field.value || [])];
439440
newPaths.splice(index, 1);
@@ -489,14 +490,14 @@ export const SaveGiteaProviderCompose = ({ composeId }: Props) => {
489490
control={form.control}
490491
name="enableSubmodules"
491492
render={({ field }) => (
492-
<FormItem className="flex items-center space-x-2">
493+
<FormItem className="flex flex-row items-center space-x-2 space-y-0">
493494
<FormControl>
494495
<Switch
495496
checked={field.value}
496497
onCheckedChange={field.onChange}
497498
/>
498499
</FormControl>
499-
<FormLabel className="mt-0!">Enable Submodules</FormLabel>
500+
<FormLabel>Enable Submodules</FormLabel>
500501
</FormItem>
501502
)}
502503
/>

‎apps/dokploy/components/dashboard/compose/general/generic/save-github-provider-compose.tsx‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,8 @@ export const SaveGithubProviderCompose = ({ composeId }: Props) => {
472472
{path}
473473
<button
474474
type="button"
475-
className="ml-1 cursor-pointer hover:text-destructive focus:outline-none"
475+
aria-label="Remove watch path"
476+
className="ml-1 cursor-pointer hover:text-destructive"
476477
onClick={() => {
477478
const newPaths = [...(field.value || [])];
478479
newPaths.splice(index, 1);
@@ -532,14 +533,14 @@ export const SaveGithubProviderCompose = ({ composeId }: Props) => {
532533
control={form.control}
533534
name="enableSubmodules"
534535
render={({ field }) => (
535-
<FormItem className="flex items-center space-x-2">
536+
<FormItem className="flex flex-row items-center space-x-2 space-y-0">
536537
<FormControl>
537538
<Switch
538539
checked={field.value}
539540
onCheckedChange={field.onChange}
540541
/>
541542
</FormControl>
542-
<FormLabel className="mt-0!">Enable Submodules</FormLabel>
543+
<FormLabel>Enable Submodules</FormLabel>
543544
</FormItem>
544545
)}
545546
/>

‎apps/dokploy/components/dashboard/compose/general/generic/save-gitlab-provider-compose.tsx‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,8 @@ export const SaveGitlabProviderCompose = ({ composeId }: Props) => {
462462
{path}
463463
<button
464464
type="button"
465-
className="ml-1 cursor-pointer hover:text-destructive focus:outline-none"
465+
aria-label="Remove watch path"
466+
className="ml-1 cursor-pointer hover:text-destructive"
466467
onClick={() => {
467468
const newPaths = [...(field.value || [])];
468469
newPaths.splice(index, 1);
@@ -518,14 +519,14 @@ export const SaveGitlabProviderCompose = ({ composeId }: Props) => {
518519
control={form.control}
519520
name="enableSubmodules"
520521
render={({ field }) => (
521-
<FormItem className="flex items-center space-x-2">
522+
<FormItem className="flex flex-row items-center space-x-2 space-y-0">
522523
<FormControl>
523524
<Switch
524525
checked={field.value}
525526
onCheckedChange={field.onChange}
526527
/>
527528
</FormControl>
528-
<FormLabel className="mt-0!">Enable Submodules</FormLabel>
529+
<FormLabel>Enable Submodules</FormLabel>
529530
</FormItem>
530531
)}
531532
/>

0 commit comments

Comments
 (0)