-
+ {#if !compactMode}
+
+ {/if}
{countComplete}/{subIssues.length}
{/if}
diff --git a/plugins/tracker-resources/src/components/milestones/MilestoneEditor.svelte b/plugins/tracker-resources/src/components/milestones/MilestoneEditor.svelte
index d1a194cea8..8495a204cd 100644
--- a/plugins/tracker-resources/src/components/milestones/MilestoneEditor.svelte
+++ b/plugins/tracker-resources/src/components/milestones/MilestoneEditor.svelte
@@ -78,7 +78,7 @@
{#if kind === 'list'}
{#if value.milestone}
-
+
= {}
export let selection: number | undefined = undefined
+ export let compactMode: boolean = false
export let documents: Doc[] | undefined = undefined
@@ -138,6 +139,7 @@
{disableHeader}
{props}
{listDiv}
+ {compactMode}
bind:dragItem
on:select={(evt) => {
select(0, evt.detail)
diff --git a/plugins/view-resources/src/components/list/ListCategories.svelte b/plugins/view-resources/src/components/list/ListCategories.svelte
index 876afaab5a..2a9a14ec85 100644
--- a/plugins/view-resources/src/components/list/ListCategories.svelte
+++ b/plugins/view-resources/src/components/list/ListCategories.svelte
@@ -58,6 +58,7 @@
export let listDiv: HTMLDivElement
export let selection: number | undefined = undefined
export let groupPersistKey: string
+ export let compactMode: boolean = false
$: groupByKey = viewOptions.groupBy[level] ?? noCategory
let categories: CategoryType[] = []
@@ -310,6 +311,7 @@
{createItemDialogProps}
{createItemLabel}
{viewOptionsConfig}
+ {compactMode}
on:check
on:uncheckAll
on:row-focus
diff --git a/plugins/view-resources/src/components/list/ListCategory.svelte b/plugins/view-resources/src/components/list/ListCategory.svelte
index c2e62ef976..97bf60cdcf 100644
--- a/plugins/view-resources/src/components/list/ListCategory.svelte
+++ b/plugins/view-resources/src/components/list/ListCategory.svelte
@@ -66,6 +66,7 @@
export let listDiv: HTMLDivElement
export let index: number
export let groupPersistKey: string
+ export let compactMode: boolean = false
$: lastLevel = level + 1 >= viewOptions.groupBy.length
@@ -448,6 +449,7 @@
on:mouseover={mouseAttractor(() => handleRowFocused(docObject))}
on:mouseenter={mouseAttractor(() => handleRowFocused(docObject))}
{props}
+ {compactMode}
on:on-mount={() => {
wasLoaded = true
}}
diff --git a/plugins/view-resources/src/components/list/ListItem.svelte b/plugins/view-resources/src/components/list/ListItem.svelte
index fd08556306..f055fc9d77 100644
--- a/plugins/view-resources/src/components/list/ListItem.svelte
+++ b/plugins/view-resources/src/components/list/ListItem.svelte
@@ -16,7 +16,7 @@
import { AnyAttribute, Doc, getObjectValue } from '@hcengineering/core'
import notification from '@hcengineering/notification'
import { getClient, updateAttribute } from '@hcengineering/presentation'
- import { CheckBox, Component, deviceOptionsStore as deviceInfo, IconCircles, tooltip } from '@hcengineering/ui'
+ import { CheckBox, Component, IconCircles, tooltip } from '@hcengineering/ui'
import { AttributeModel } from '@hcengineering/view'
import { createEventDispatcher, onMount } from 'svelte'
import view from '../../plugin'
@@ -31,6 +31,7 @@
export let last: boolean = false
export let lastCat: boolean = false
export let props: Record = {}
+ export let compactMode: boolean = false
export function scroll () {
elem?.scrollIntoView({ behavior: 'auto', block: 'nearest' })
@@ -48,8 +49,6 @@
return elem
}
- $: compactMode = $deviceInfo.twoRows
-
const client = getClient()
function onChange (value: any, doc: Doc, key: string, attribute: AnyAttribute) {
@@ -64,13 +63,6 @@
return (value: any) => onChange(value, docObject, attribute.key, attr)
}
- let noCompressed: number
- $: if (model) {
- noCompressed = -1
- model.forEach((m, i) => {
- if (m.displayProps?.compression) noCompressed = i
- })
- }
onMount(() => {
dispatch('on-mount')
})
@@ -120,32 +112,55 @@
/>
- {#each model.filter((p) => !(p.displayProps?.optional === true)) as attributeModel, i}
+ {#each model.filter((p) => !(p.displayProps?.optional === true || p.displayProps?.suffix === true)) as attributeModel, i}
{@const displayProps = attributeModel.displayProps}
{#if !groupByKey || displayProps?.excludeByKey !== groupByKey}
{#if displayProps?.grow}
-
+ {#each model.filter((p) => p.displayProps?.optional === true) as attrModel}
+
+ {/each}
+
+ {:else}
+ {#each model.filter((p) => p.displayProps?.suffix === true) as attrModel}
+