feat(web): Display assignees as nodes

Previously assignees were displayed using a chip, which while it looked
nice had the following issues:
- It only showed the node ID rather than the alias (and actually the
  node ID was cut off)
- It wasn't clickable to go to the user's profile
- It was not a consistent experience with the rest of the users
  displayed around the application (e.g. in reviews, uploader, branches
  view).
This commit is contained in:
Samuel Shuert
2024-11-18 09:05:12 +01:00
committed by Sebastian Martinez
parent d37ccde1c4
commit 5ccce437ab
2 changed files with 9 additions and 9 deletions
+7 -7
View File
@@ -1,7 +1,5 @@
<script lang="ts">
import type { BaseUrl, Reaction } from "@http-client";
import Badge from "@app/components/Badge.svelte";
import type { Reaction, BaseUrl } from "@http-client";
import NodeId from "@app/components/NodeId.svelte";
export let baseUrl: BaseUrl;
@@ -17,6 +15,7 @@
display: flex;
flex-wrap: wrap;
flex-direction: row;
width: 100%;
gap: 0.5rem;
font-size: var(--font-size-small);
}
@@ -34,7 +33,8 @@
align-items: center;
}
.body {
align-items: flex-start;
align-items: center;
align-self: center;
}
.no-assignees {
height: 2rem;
@@ -47,10 +47,10 @@
<div class="wrapper">
<div class="header">Assignees</div>
<div class="body">
{#each assignees as { alias, id }}
<Badge variant="neutral" size="small">
{#each assignees as { id, alias }}
<div>
<NodeId {baseUrl} nodeId={id} {alias} />
</Badge>
</div>
{:else}
<div class="txt-missing no-assignees">No assignees</div>
{/each}
+2 -2
View File
@@ -205,7 +205,7 @@
<div
style:margin-top="2rem"
style="display: flex; flex-direction: column; gap: 0.5rem;">
<Assignees {baseUrl} assignees={issue.assignees} />
<Assignees assignees={issue.assignees} {baseUrl} />
<Labels labels={issue.labels} />
<Embeds embeds={uniqueEmbeds} />
</div>
@@ -248,7 +248,7 @@
</div>
</div>
<div class="metadata global-hide-on-medium-desktop-down">
<Assignees {baseUrl} assignees={issue.assignees} />
<Assignees assignees={issue.assignees} {baseUrl} />
<Labels labels={issue.labels} />
<Embeds embeds={uniqueEmbeds} />
</div>