TSK-890: Fix component icons (#2778)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2023-03-21 08:56:18 +07:00 committed by GitHub
parent 340b0c3198
commit af7ebceb9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 15 additions and 13 deletions

View File

@ -22,9 +22,11 @@
<symbol id="stop" viewBox="-4 -4 16 16">
<rect width="8" height="8"/>
</symbol>
<symbol id="component" viewBox="0 0 16 16">
<path d="M11.7,3.6h-1.1C10.4,2.7,9.7,2,8.8,2H7.2C6.3,2,5.6,2.7,5.4,3.6H4.3C3,3.6,2,4.6,2,5.9V8c0,0.2,0.1,0.3,0.2,0.4 C3.8,9.3,5.9,9.9,8,9.9c2.1,0,4.2-0.5,5.8-1.5C13.9,8.3,14,8.2,14,8V5.9C14,4.6,13,3.6,11.7,3.6z M7.2,3h1.5c0.4,0,0.6,0.2,0.8,0.6 H6.5C6.6,3.2,6.9,3,7.2,3z M13,7.7c-1.4,0.8-3.2,1.2-5,1.2c-1.8,0-3.6-0.4-5-1.2V5.9c0-0.7,0.6-1.3,1.3-1.3h7.4 c0.7,0,1.3,0.6,1.3,1.3V7.7z"/>
<path d="M13.5,9.7c-0.3,0-0.5,0.2-0.5,0.5l-0.1,1.5c-0.1,0.8-0.7,1.3-1.4,1.3H4.5c-0.7,0-1.4-0.6-1.4-1.3L3,10.1 c0-0.3-0.3-0.5-0.5-0.5C2.2,9.7,2,9.9,2,10.2l0.1,1.5C2.2,13,3.3,14,4.5,14h6.9c1.3,0,2.3-1,2.4-2.3l0.1-1.5 C14,9.9,13.8,9.7,13.5,9.7z"/>
<symbol id="component" viewBox="-3 -3 16 16">
<path d="M3.45455 0H0.545455C0.244208 0 0 0.244208 0 0.545455V3.45455C0 3.75579 0.244208 4 0.545455 4H3.45455C3.75579 4 4 3.75579 4 3.45455V0.545455C4 0.244208 3.75579 0 3.45455 0Z"/>
<path d="M9.95479 0H7.0457C6.74445 0 6.50024 0.244208 6.50024 0.545455V3.45455C6.50024 3.75579 6.74445 4 7.0457 4H9.95479C10.256 4 10.5002 3.75579 10.5002 3.45455V0.545455C10.5002 0.244208 10.256 0 9.95479 0Z"/>
<path d="M3.45455 6.50024H0.545455C0.244208 6.50024 0 6.74445 0 7.0457V9.95479C0 10.256 0.244208 10.5002 0.545455 10.5002H3.45455C3.75579 10.5002 4 10.256 4 9.95479V7.0457C4 6.74445 3.75579 6.50024 3.45455 6.50024Z"/>
<path d="M9.95479 6.50024H7.0457C6.74445 6.50024 6.50024 6.74445 6.50024 7.0457V9.95479C6.50024 10.256 6.74445 10.5002 7.0457 10.5002H9.95479C10.256 10.5002 10.5002 10.256 10.5002 9.95479V7.0457C10.5002 6.74445 10.256 6.50024 9.95479 6.50024Z"/>
</symbol>
<symbol id="issue" viewBox="0 0 16 16">
<path d="M13.3,8.3c-0.1,2.8-2.5,5.1-5.4,5.1C5,13.4,2.6,11,2.6,8c0-2.9,2.3-5.2,5.1-5.4c0.1-0.4,0.2-0.7,0.4-1c0,0-0.1,0-0.1,0 C4.4,1.7,1.6,4.5,1.6,8c0,3.5,2.9,6.4,6.4,6.4s6.4-2.9,6.4-6.4c0,0,0-0.1,0-0.1C14,8.1,13.7,8.2,13.3,8.3z"/>

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View File

@ -23,7 +23,7 @@
export let value: Ref<Component> | null | undefined
export let shouldShowLabel: boolean = true
export let isEditable: boolean = true
export let isEditable: boolean = false
export let onChange: ((newComponentId: Ref<Component> | undefined) => void) | undefined = undefined
export let popupPlaceholder: IntlString = tracker.string.AddToComponent
export let kind: ButtonKind = 'no-border'

View File

@ -755,7 +755,7 @@
}}
/>
<EstimationEditor kind={'no-border'} size={'small'} value={object} {currentProject} />
<ComponentSelector value={object.component} onChange={handleComponentIdChanged} />
<ComponentSelector value={object.component} onChange={handleComponentIdChanged} isEditable={true} />
<SprintSelector
value={object.sprint}
onChange={handleSprintIdChanged}

View File

@ -133,7 +133,7 @@
_class={tracker.class.Component}
itemsConfig={[
{ key: '', presenter: tracker.component.IconPresenter },
{ key: '', presenter: tracker.component.ComponentPresenter, props: { kind: 'list' } },
{ key: '', presenter: tracker.component.ComponentPresenter, props: { kind: 'list', withIcon: false } },
{
key: '$lookup.lead',
presenter: tracker.component.LeadPresenter,

View File

@ -19,7 +19,7 @@
import tracker from '../../plugin'
export let value: WithLookup<Component>
export let withIcon = false
export let withIcon = true
export let onClick: () => void | undefined
export let isInteractive = true
@ -45,7 +45,7 @@
<div class="flex" on:click={navigateToComponent}>
{#if withIcon}
<div class="mr-2" use:tooltip={{ label: tracker.string.Component }}>
<Icon icon={tracker.icon.Components} size={'small'} />
<Icon icon={tracker.icon.Component} size={'small'} />
</div>
{/if}
<span title={value.label} class="fs-bold cursor-pointer caption-color overflow-label clear-mins">

View File

@ -42,7 +42,7 @@
<svelte:fragment slot="label_selector">
<Button size={'small'} kind={'link'} on:click={selectComponent}>
<svelte:fragment slot="content">
<div class="ac-header__icon"><Icon icon={tracker.icon.Issues} size={'small'} /></div>
<div class="ac-header__icon"><Icon icon={tracker.icon.Component} size={'small'} /></div>
<span class="ac-header__title">{component.label}</span>
</svelte:fragment>
</Button>

View File

@ -50,7 +50,7 @@
<div bind:this={container}>
<Button size={'small'} kind={'link'} on:click={selectSprint}>
<svelte:fragment slot="content">
<div class="ac-header__icon"><Icon icon={tracker.icon.Issues} size={'small'} /></div>
<div class="ac-header__icon"><Icon icon={tracker.icon.Sprint} size={'small'} /></div>
<span class="ac-header__title mr-1">{sprint.label}</span>
<Icon icon={Expanded} size={'small'} />
</svelte:fragment>

View File

@ -80,7 +80,7 @@
/>
<svelte:fragment slot="pool">
<SprintStatusSelector selectedSprintStatus={object.status} onSprintStatusChange={handleComponentStatusChanged} />
<ComponentSelector value={object.component} onChange={handleComponentIdChanged} />
<ComponentSelector value={object.component} onChange={handleComponentIdChanged} isEditable={true} />
<EmployeeBox
label={tracker.string.SprintLead}
placeholder={tracker.string.AssignTo}

View File

@ -19,7 +19,7 @@
import tracker from '../../plugin'
export let value: WithLookup<Sprint>
export let withIcon = false
export let withIcon = true
export let onClick: () => void | undefined
export let isInteractive = true

View File

@ -190,7 +190,7 @@
}}
/>
<EstimationEditor kind={'no-border'} size={'small'} value={object} />
<ComponentSelector value={object.component} onChange={handleComponentIdChanged} />
<ComponentSelector value={object.component} onChange={handleComponentIdChanged} isEditable={true} />
<SprintSelector
value={object.sprint}
onChange={handleSprintIdChanged}