Skip to content

Commit

Permalink
Auto show left panel in Settings. UI fixes (#7055)
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Platov <[email protected]>
  • Loading branch information
SasLord authored Oct 28, 2024
1 parent 2f4f15e commit 7a8ee3c
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 12 deletions.
7 changes: 6 additions & 1 deletion plugins/setting-resources/src/components/Settings.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
deviceOptionsStore as deviceInfo
} from '@hcengineering/ui'
import { NavFooter } from '@hcengineering/workbench-resources'
import { ComponentType, onDestroy } from 'svelte'
import { ComponentType, onDestroy, onMount } from 'svelte'
import { clearSettingsStore, settingsStore, type SettingsStore } from '../store'
import { Analytics } from '@hcengineering/analytics'
Expand Down Expand Up @@ -72,6 +72,11 @@
})(loc)
})
)
onMount(() => {
setTimeout(() => {
if (categoryId === undefined) $deviceInfo.navigator.visible = true
}, 500)
})
function findCategory (name: string): SettingsCategory | undefined {
return categories.find((x) => x.name === name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@
NavItem,
getCurrentResolvedLocation,
navigate,
resolvedLocationStore
resolvedLocationStore,
deviceOptionsStore as deviceInfo
} from '@hcengineering/ui'
import { onDestroy } from 'svelte'
import { onDestroy, onMount } from 'svelte'
import { clearSettingsStore } from '../store'
export let kind: 'navigation' | 'content' | undefined
Expand Down Expand Up @@ -65,6 +66,11 @@
})(loc)
})
)
onMount(() => {
setTimeout(() => {
if (kind === 'content' && category === undefined) $deviceInfo.navigator.visible = true
}, 500)
})
function selectCategory (id: string): void {
clearSettingsStore()
Expand Down Expand Up @@ -94,7 +100,7 @@
<Component is={category.extraComponents?.navigation} props={{ kind: 'navigation', categoryName: categoryId }} />
{/if}
{/each}
{:else if kind === 'content' && !category}
{:else if kind === 'content' && category === undefined}
<div class="hulyComponent" />
{:else if category}
<Component is={category.component} props={{ kind: 'content' }} on:change />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// limitations under the License.
-->
<script lang="ts">
import { onDestroy } from 'svelte'
import { onDestroy, onMount } from 'svelte'
import core, {
Class,
Doc,
Expand All @@ -30,18 +30,14 @@
resolvedLocationStore,
resizeObserver,
Breadcrumbs,
ButtonIcon,
Header,
IconCopy,
IconDelete,
IconMoreV,
AnySvelteComponent,
navigate,
getCurrentResolvedLocation,
IconWithEmoji
IconWithEmoji,
deviceOptionsStore as deviceInfo
} from '@hcengineering/ui'
import { createQuery, getClient } from '@hcengineering/presentation'
import { showMenu } from '@hcengineering/view-resources'
import setting, { SpaceTypeEditor } from '@hcengineering/setting'
import { Asset, getResource } from '@hcengineering/platform'
import view from '@hcengineering/view'
Expand Down Expand Up @@ -138,6 +134,12 @@
navigate(loc)
}
}
onMount(() => {
setTimeout(() => {
if (type === undefined && descriptor === undefined) $deviceInfo.navigator.visible = true
}, 500)
})
</script>

<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
<span class="labelOnPanel">
<Label label={tracker.string.Priority} />
</span>
<PriorityEditor value={issue} size={'medium'} shouldShowLabel isEditable={!readonly} />
<PriorityEditor value={issue} size={'medium'} shouldShowLabel isEditable={!readonly} width={'100%'} />

<span class="labelOnPanel">
<Label label={core.string.CreatedBy} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@
<style lang="scss">
.link-container {
padding: 0px 0.75rem;
border-radius: 0.375rem;
&:not(.readonly) {
cursor: pointer;
}
.add-action {
visibility: hidden;
}
Expand Down

0 comments on commit 7a8ee3c

Please sign in to comment.