diff --git a/src/components/IssueSecondColumn.svelte b/src/components/IssueSecondColumn.svelte index 8d22aa386..2b402899b 100644 --- a/src/components/IssueSecondColumn.svelte +++ b/src/components/IssueSecondColumn.svelte @@ -72,6 +72,12 @@ align-items: center; min-height: 2.5rem; margin-bottom: 1rem; + min-width: 450px; + } + .list { + display: flex; + flex-direction: column; + gap: 2px; } @@ -212,30 +218,28 @@ {/if} - - {#each searchResults as result} - - {/each} +{#if searchResults.length > 0} +
+ {#each searchResults as result} + + {/each} +
+{/if} - {#if searchResults.length === 0} -
+{#if searchResults.length === 0} + +
{#if issues.length > 0 && searchResults.length === 0} @@ -245,5 +249,5 @@ {/if}
- {/if} -
+ +{/if} diff --git a/src/components/IssueTeaser.svelte b/src/components/IssueTeaser.svelte index 9c0c484c8..9eb5ecbc2 100644 --- a/src/components/IssueTeaser.svelte +++ b/src/components/IssueTeaser.svelte @@ -42,7 +42,6 @@ align-items: center; gap: 0.25rem; min-height: 5rem; - min-width: 405px; background-color: var(--color-background-float); padding: 1rem; cursor: pointer; @@ -61,13 +60,13 @@ margin-right: 1rem; } .issue-teaser:first-of-type { - clip-path: var(--1px-top-corner-fill); + clip-path: var(--2px-top-corner-fill); } .issue-teaser:last-of-type { - clip-path: var(--1px-bottom-corner-fill); + clip-path: var(--2px-bottom-corner-fill); } .issue-teaser:only-of-type { - clip-path: var(--1px-corner-fill); + clip-path: var(--2px-corner-fill); } @@ -80,6 +79,7 @@ class:selected style:align-items="flex-start" style:clip-path={focussed ? "none" : undefined} + style:padding={focussed ? "1rem" : "20px"} onclick={() => { void push({ resource: "repo.issue", rid, issue: issue.id, status }); }}> diff --git a/src/components/PatchTeaser.svelte b/src/components/PatchTeaser.svelte index 28e146d89..46fe3d10b 100644 --- a/src/components/PatchTeaser.svelte +++ b/src/components/PatchTeaser.svelte @@ -47,7 +47,6 @@ justify-content: space-between; gap: 0.25rem; min-height: 5rem; - min-width: 440px; background-color: var(--color-background-float); padding: 1rem; cursor: pointer; @@ -66,13 +65,13 @@ margin-right: 1rem; } .patch-teaser:first-of-type { - clip-path: var(--1px-top-corner-fill); + clip-path: var(--2px-top-corner-fill); } .patch-teaser:last-of-type { - clip-path: var(--1px-bottom-corner-fill); + clip-path: var(--2px-bottom-corner-fill); } .patch-teaser:only-of-type { - clip-path: var(--1px-corner-fill); + clip-path: var(--2px-corner-fill); } @@ -85,6 +84,7 @@ class="patch-teaser" style:align-items="flex-start" style:clip-path={focussed ? "none" : undefined} + style:padding={focussed ? "1rem" : "20px"} onclick={async () => { if (loadPatch) { await loadPatch(patch.id); diff --git a/src/views/repo/Issues.svelte b/src/views/repo/Issues.svelte index 1c6e69df4..11ee98407 100644 --- a/src/views/repo/Issues.svelte +++ b/src/views/repo/Issues.svelte @@ -33,6 +33,13 @@ let searchInput = $state(""); + $effect(() => { + // eslint-disable-next-line @typescript-eslint/no-unused-expressions + status; + + searchInput = ""; + }); + const searchableIssues = $derived( issues .flatMap(i => { @@ -62,6 +69,11 @@ .container { padding: 1rem 1rem 1rem 0; } + .list { + display: flex; + flex-direction: column; + gap: 2px; + } .header { font-weight: var(--font-weight-medium); font-size: var(--font-size-medium); @@ -136,34 +148,36 @@
- +
{#each searchResults as result} - + {/each} {#if searchResults.length === 0} -
-
- - {#if issues.length > 0 && searchResults.length === 0} - No matching issues. - {:else} - No {status === "all" ? "" : status} issues. - {/if} + +
+
+ + {#if issues.length > 0 && searchResults.length === 0} + No matching issues. + {:else} + No {status === "all" ? "" : status} issues. + {/if} +
-
+ {/if} - +
diff --git a/src/views/repo/Patch.svelte b/src/views/repo/Patch.svelte index 6059f4ada..3a83f00ac 100644 --- a/src/views/repo/Patch.svelte +++ b/src/views/repo/Patch.svelte @@ -355,6 +355,11 @@ margin-bottom: 0.5rem; color: var(--color-foreground-dim); } + .list { + display: flex; + flex-direction: column; + gap: 2px; + } {#snippet icons(status: PatchStatus | undefined)} @@ -390,6 +395,7 @@ {#snippet secondColumn()}
@@ -505,33 +511,35 @@ {/if}
{/if} - - {#each searchResults as teaser} - { - review = undefined; - await loadPatch(id); - }} - patch={teaser.obj.patch} - rid={repo.rid} - {status} - selected={teaser.obj.patch.id === patch.id} /> - {/each} - {#if searchResults.length === 0} + {#if searchResults.length > 0} +
+ {#each searchResults as teaser} + { + review = undefined; + await loadPatch(id); + }} + patch={teaser.obj.patch} + rid={repo.rid} + {status} /> + {/each} +
+ {/if} + + {#if searchResults.length === 0} +
@@ -542,8 +550,8 @@ {/if}
- {/if} -
+
+ {/if} {/snippet} {#if review} diff --git a/src/views/repo/Patches.svelte b/src/views/repo/Patches.svelte index e045c4de1..cb549b9c6 100644 --- a/src/views/repo/Patches.svelte +++ b/src/views/repo/Patches.svelte @@ -40,6 +40,13 @@ more = patches.more; }); + $effect(() => { + // eslint-disable-next-line @typescript-eslint/no-unused-expressions + status; + + searchInput = ""; + }); + async function loadMoreContent(all: boolean = false) { if (more) { const p = await invoke>("list_patches", { @@ -174,23 +181,23 @@
- - {#each searchResults as result} - - {/each} + {#each searchResults as result} + + {/each} - {#if searchResults.length === 0} + {#if searchResults.length === 0} +
@@ -201,8 +208,8 @@ {/if}
- {/if} -
+
+ {/if}