UBERF-4867: fix issues mentions display (#4580)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina 2024-02-08 19:29:19 +04:00 committed by GitHub
parent 5d15702563
commit 815664e06f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 40 additions and 21 deletions

View File

@ -39,7 +39,7 @@
<style lang="scss"> <style lang="scss">
.root { .root {
display: flex; display: inline-block;
flex-direction: column; color: var(--global-primary-TextColor);
} }
</style> </style>

View File

@ -40,7 +40,28 @@
$: taskType = value !== undefined ? $taskTypeStore.get(value.kind) : undefined $: taskType = value !== undefined ? $taskTypeStore.get(value.kind) : undefined
</script> </script>
{#if value} {#if inline && value}
<DocNavLink
object={value}
{onClick}
{disabled}
{noUnderline}
{inline}
component={tracker.component.EditIssue}
shrink={0}
>
{#if inline}
<span class="antiMention" use:tooltip={{ label: tracker.string.Issue }}>@{value.identifier}</span>
{/if}
</DocNavLink>
{#if presenters.length > 0}
<div class="flex-row-center">
{#each presenters as mixinPresenter}
<Component is={mixinPresenter.presenter} props={{ value }} />
{/each}
</div>
{/if}
{:else if value}
<div class="flex-row-center"> <div class="flex-row-center">
<DocNavLink <DocNavLink
object={value} object={value}
@ -51,25 +72,21 @@
component={tracker.component.EditIssue} component={tracker.component.EditIssue}
shrink={0} shrink={0}
> >
{#if inline} <span class="issuePresenterRoot" class:list={kind === 'list'} class:cursor-pointer={!disabled}>
<span class="antiMention" use:tooltip={{ label: tracker.string.Issue }}>@{value.identifier}</span> {#if shouldShowAvatar}
{:else} <div class="icon" use:tooltip={{ label: tracker.string.Issue }}>
<span class="issuePresenterRoot" class:list={kind === 'list'} class:cursor-pointer={!disabled}> {#if taskType !== undefined}
{#if shouldShowAvatar} <TaskTypeIcon value={taskType} />
<div class="icon" use:tooltip={{ label: tracker.string.Issue }}> {:else}
{#if taskType !== undefined} <Icon icon={icon ?? tracker.icon.Issues} size={'small'} />
<TaskTypeIcon value={taskType} /> {/if}
{:else} </div>
<Icon icon={icon ?? tracker.icon.Issues} size={'small'} /> {/if}
{/if} <span class="overflow-label" class:select-text={!noSelect} title={value?.title}>
</div> {value.identifier}
{/if} <slot name="details" />
<span class="overflow-label" class:select-text={!noSelect} title={value?.title}>
{value.identifier}
<slot name="details" />
</span>
</span> </span>
{/if} </span>
</DocNavLink> </DocNavLink>
{#if presenters.length > 0} {#if presenters.length > 0}
<div class="flex-row-center"> <div class="flex-row-center">
@ -90,9 +107,11 @@
&:not(.list) { &:not(.list) {
color: var(--theme-content-color); color: var(--theme-content-color);
} }
&.list { &.list {
color: var(--theme-halfcontent-color); color: var(--theme-halfcontent-color);
} }
.icon { .icon {
margin-right: 0.5rem; margin-right: 0.5rem;
color: var(--theme-dark-color); color: var(--theme-dark-color);