Skip to content

Commit 7a8ee3c

Browse files
authored
Auto show left panel in Settings. UI fixes (#7055)
Signed-off-by: Alexander Platov <[email protected]>
1 parent 2f4f15e commit 7a8ee3c

File tree

5 files changed

+30
-12
lines changed

5 files changed

+30
-12
lines changed

plugins/setting-resources/src/components/Settings.svelte

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
deviceOptionsStore as deviceInfo
3939
} from '@hcengineering/ui'
4040
import { NavFooter } from '@hcengineering/workbench-resources'
41-
import { ComponentType, onDestroy } from 'svelte'
41+
import { ComponentType, onDestroy, onMount } from 'svelte'
4242
import { clearSettingsStore, settingsStore, type SettingsStore } from '../store'
4343
import { Analytics } from '@hcengineering/analytics'
4444
@@ -72,6 +72,11 @@
7272
})(loc)
7373
})
7474
)
75+
onMount(() => {
76+
setTimeout(() => {
77+
if (categoryId === undefined) $deviceInfo.navigator.visible = true
78+
}, 500)
79+
})
7580
7681
function findCategory (name: string): SettingsCategory | undefined {
7782
return categories.find((x) => x.name === name)

plugins/setting-resources/src/components/WorkspaceSettings.svelte

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@
2323
NavItem,
2424
getCurrentResolvedLocation,
2525
navigate,
26-
resolvedLocationStore
26+
resolvedLocationStore,
27+
deviceOptionsStore as deviceInfo
2728
} from '@hcengineering/ui'
28-
import { onDestroy } from 'svelte'
29+
import { onDestroy, onMount } from 'svelte'
2930
import { clearSettingsStore } from '../store'
3031
3132
export let kind: 'navigation' | 'content' | undefined
@@ -65,6 +66,11 @@
6566
})(loc)
6667
})
6768
)
69+
onMount(() => {
70+
setTimeout(() => {
71+
if (kind === 'content' && category === undefined) $deviceInfo.navigator.visible = true
72+
}, 500)
73+
})
6874
6975
function selectCategory (id: string): void {
7076
clearSettingsStore()
@@ -94,7 +100,7 @@
94100
<Component is={category.extraComponents?.navigation} props={{ kind: 'navigation', categoryName: categoryId }} />
95101
{/if}
96102
{/each}
97-
{:else if kind === 'content' && !category}
103+
{:else if kind === 'content' && category === undefined}
98104
<div class="hulyComponent" />
99105
{:else if category}
100106
<Component is={category.component} props={{ kind: 'content' }} on:change />

plugins/setting-resources/src/components/spaceTypes/ManageSpaceTypeContent.svelte

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// limitations under the License.
1515
-->
1616
<script lang="ts">
17-
import { onDestroy } from 'svelte'
17+
import { onDestroy, onMount } from 'svelte'
1818
import core, {
1919
Class,
2020
Doc,
@@ -30,18 +30,14 @@
3030
resolvedLocationStore,
3131
resizeObserver,
3232
Breadcrumbs,
33-
ButtonIcon,
3433
Header,
35-
IconCopy,
36-
IconDelete,
37-
IconMoreV,
3834
AnySvelteComponent,
3935
navigate,
4036
getCurrentResolvedLocation,
41-
IconWithEmoji
37+
IconWithEmoji,
38+
deviceOptionsStore as deviceInfo
4239
} from '@hcengineering/ui'
4340
import { createQuery, getClient } from '@hcengineering/presentation'
44-
import { showMenu } from '@hcengineering/view-resources'
4541
import setting, { SpaceTypeEditor } from '@hcengineering/setting'
4642
import { Asset, getResource } from '@hcengineering/platform'
4743
import view from '@hcengineering/view'
@@ -138,6 +134,12 @@
138134
navigate(loc)
139135
}
140136
}
137+
138+
onMount(() => {
139+
setTimeout(() => {
140+
if (type === undefined && descriptor === undefined) $deviceInfo.navigator.visible = true
141+
}, 500)
142+
})
141143
</script>
142144

143145
<div

plugins/tracker-resources/src/components/issues/edit/ControlPanel.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
<span class="labelOnPanel">
157157
<Label label={tracker.string.Priority} />
158158
</span>
159-
<PriorityEditor value={issue} size={'medium'} shouldShowLabel isEditable={!readonly} />
159+
<PriorityEditor value={issue} size={'medium'} shouldShowLabel isEditable={!readonly} width={'100%'} />
160160

161161
<span class="labelOnPanel">
162162
<Label label={core.string.CreatedBy} />

plugins/tracker-resources/src/components/issues/timereport/ReportedTimeEditor.svelte

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@
102102
<style lang="scss">
103103
.link-container {
104104
padding: 0px 0.75rem;
105+
border-radius: 0.375rem;
106+
107+
&:not(.readonly) {
108+
cursor: pointer;
109+
}
105110
.add-action {
106111
visibility: hidden;
107112
}

0 commit comments

Comments
 (0)