Skip to content

Commit

Permalink
feat(web): Display assignees as nodes
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
TheCodedProf authored and sebastinez committed Nov 18, 2024
1 parent d37ccde commit 5ccce43
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/views/repos/Cob/Assignees.svelte
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -17,6 +15,7 @@
display: flex;
flex-wrap: wrap;
flex-direction: row;
width: 100%;
gap: 0.5rem;
font-size: var(--font-size-small);
}
Expand All @@ -34,7 +33,8 @@
align-items: center;
}
.body {
align-items: flex-start;
align-items: center;
align-self: center;
}
.no-assignees {
height: 2rem;
Expand All @@ -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}
Expand Down
4 changes: 2 additions & 2 deletions src/views/repos/Issue.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit 5ccce43

Please sign in to comment.