Skip to content

Commit 3329dc8

Browse files
committed
Add arrows to popovers
1 parent ddca378 commit 3329dc8

File tree

5 files changed

+24
-23
lines changed

5 files changed

+24
-23
lines changed

web/src/lib/components/settings-popover/SettingsPopover.svelte

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,9 @@
3535
<span class="iconify size-4 shrink-0 octicon--gear-16" aria-hidden="true"></span>
3636
</Popover.Trigger>
3737
<Popover.Portal>
38-
<Popover.Content aria-label="Options" class="z-50 mx-2 flex flex-col gap-1 rounded-sm border bg-neutral py-1 text-sm shadow" sideOffset={4}>
39-
{#if children}
40-
{@render children()}
41-
{/if}
38+
<Popover.Content aria-label="Options" class="z-50 mx-2 flex flex-col gap-1 rounded-sm border bg-neutral py-1 text-sm shadow">
39+
{@render children?.()}
40+
<Popover.Arrow class="text-edge" />
4241
</Popover.Content>
4342
</Popover.Portal>
4443
</Popover.Root>

web/src/routes/ActionsPopover.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<span aria-hidden="true" class="iconify size-4 bg-primary octicon--kebab-horizontal-16"></span>
1313
</Popover.Trigger>
1414
<Popover.Portal>
15-
<Popover.Content class="flex flex-col overflow-hidden rounded-sm border bg-neutral text-sm shadow-sm select-none" sideOffset={4}>
15+
<Popover.Content class="flex flex-col overflow-hidden rounded-sm border bg-neutral text-sm shadow-sm select-none">
1616
<Button.Root
1717
class="btn-ghost px-2 py-1 text-left"
1818
onclick={() => {
@@ -31,6 +31,7 @@
3131
>
3232
Collapse All
3333
</Button.Root>
34+
<Popover.Arrow class="text-edge" />
3435
</Popover.Content>
3536
</Popover.Portal>
3637
</Popover.Root>

web/src/routes/FileHeader.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
<span class="iconify size-4 bg-primary octicon--kebab-horizontal-16" aria-hidden="true"></span>
7272
</Popover.Trigger>
7373
<Popover.Portal>
74-
<Popover.Content class="flex flex-col overflow-hidden rounded-sm border bg-neutral text-sm shadow-sm select-none" sideOffset={4}>
74+
<Popover.Content class="flex flex-col overflow-hidden rounded-sm border bg-neutral text-sm shadow-sm select-none">
7575
<Button.Root onclick={showInFileTree} class="btn-ghost px-2 py-1">Show in file tree</Button.Root>
7676
<LabeledCheckbox
7777
labelText="File viewed"
@@ -83,6 +83,7 @@
8383
}
8484
}
8585
/>
86+
<Popover.Arrow class="text-edge" />
8687
</Popover.Content>
8788
</Popover.Portal>
8889
</Popover.Root>

web/src/routes/InfoPopup.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
<span aria-hidden="true" class="iconify size-4 bg-primary octicon--info-16"></span>
1313
</Popover.Trigger>
1414
<Popover.Portal>
15-
<Popover.Content class="z-50 max-w-64 rounded-sm border bg-neutral px-2 py-1 text-sm">
15+
<Popover.Content class="z-50 mx-2 max-w-64 rounded-sm border bg-neutral px-2 py-1 text-sm">
1616
{@render children?.()}
17+
<Popover.Arrow class="text-edge" />
1718
</Popover.Content>
1819
</Popover.Portal>
1920
</Popover.Root>

web/src/routes/LoadDiffDialog.svelte

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -524,22 +524,21 @@
524524
<DirectorySelect bind:directory={dirA} placeholder="Directory A" />
525525
<span class="iconify size-4 shrink-0 octicon--arrow-right-16"></span>
526526
<DirectorySelect bind:directory={dirB} placeholder="Directory B" />
527-
<div class="flex">
528-
<Button.Root type="submit" class="relative rounded-l-md btn-primary">
529-
<div class="px-2 py-1">Go</div>
530-
<div class="absolute top-0 right-0 h-full w-px bg-neutral-3/20"></div>
531-
</Button.Root>
532-
<Popover.Root>
533-
<Popover.Trigger title="Edit filters" class="flex rounded-r-md btn-primary p-2 data-[state=open]:btn-primary-hover">
534-
<span class="iconify size-4 shrink-0 place-self-center octicon--filter-16" aria-hidden="true"></span>
535-
</Popover.Trigger>
536-
<Popover.Portal>
537-
<Popover.Content side="top" class="z-50 overflow-hidden rounded-md border bg-neutral">
538-
{@render blacklistPopoverContent()}
539-
</Popover.Content>
540-
</Popover.Portal>
541-
</Popover.Root>
542-
</div>
527+
<Button.Root type="submit" class="rounded-md btn-primary px-2 py-1">Go</Button.Root>
528+
<Popover.Root>
529+
<Popover.Trigger
530+
title="Edit filters"
531+
class="flex size-6 items-center justify-center rounded-md btn-primary data-[state=open]:btn-primary-hover"
532+
>
533+
<span class="iconify size-4 shrink-0 octicon--filter-16" aria-hidden="true"></span>
534+
</Popover.Trigger>
535+
<Popover.Portal>
536+
<Popover.Content side="top" class="z-50 overflow-hidden rounded-md border bg-neutral">
537+
{@render blacklistPopoverContent()}
538+
<Popover.Arrow class="text-edge" />
539+
</Popover.Content>
540+
</Popover.Portal>
541+
</Popover.Root>
543542
</div>
544543
</form>
545544
</Dialog.Content>

0 commit comments

Comments
 (0)