Fix Card layout (#2420)

Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
Alexander Platov 2022-12-06 06:55:30 +03:00 committed by GitHub
parent e16f1921d8
commit 107c73593f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 14 additions and 13 deletions

View File

@ -15,7 +15,7 @@
--> -->
<script lang="ts"> <script lang="ts">
import type { IntlString } from '@hcengineering/platform' import type { IntlString } from '@hcengineering/platform'
import { Button, IconClose, Label, MiniToggle } from '@hcengineering/ui' import { Button, IconClose, Label, MiniToggle, Scroller } from '@hcengineering/ui'
import { createEventDispatcher } from 'svelte' import { createEventDispatcher } from 'svelte'
import presentation from '..' import presentation from '..'
import { deviceOptionsStore as deviceInfo, resizeObserver } from '@hcengineering/ui' import { deviceOptionsStore as deviceInfo, resizeObserver } from '@hcengineering/ui'
@ -71,7 +71,11 @@
/> />
</div> </div>
</div> </div>
<div class="antiCard-content"><slot /></div> <Scroller autoscroll>
<div class="antiCard-content">
<slot />
</div>
</Scroller>
{#if $$slots.header || $$slots.pool} {#if $$slots.header || $$slots.pool}
<div class="antiCard-pool"> <div class="antiCard-pool">
<slot name="pool" /> <slot name="pool" />

View File

@ -70,6 +70,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
flex-grow: 1; flex-grow: 1;
flex-shrink: 1;
margin: 0 1rem; margin: 0 1rem;
height: fit-content; height: fit-content;
min-height: 0; min-height: 0;

View File

@ -310,7 +310,7 @@
<svelte:window on:resize={_resize} /> <svelte:window on:resize={_resize} />
<div class="scroller-container {invertScroll ? 'invert' : 'normal'}"> <div class="scroller-container {invertScroll ? 'invert' : 'normal'}">
<div bind:this={divHScroll} class="horizontalBox flex-shrink"> <div bind:this={divHScroll} class="horizontalBox flex-col flex-shrink">
<div <div
bind:this={divScroll} bind:this={divScroll}
use:resizeObserver={(element) => { use:resizeObserver={(element) => {

View File

@ -243,6 +243,7 @@ export function fitPopupElement (
} else if (element === 'top') { } else if (element === 'top') {
newProps.top = '15vh' newProps.top = '15vh'
newProps.left = '50%' newProps.left = '50%'
newProps.maxHeight = '75vh'
newProps.transform = 'translateX(-50%)' newProps.transform = 'translateX(-50%)'
show = true show = true
} else if (element === 'float') { } else if (element === 'float') {

View File

@ -713,18 +713,11 @@
space={_space} space={_space}
alwaysEdit alwaysEdit
showButtons={false} showButtons={false}
maxHeight={'20vh'}
bind:content={object.description} bind:content={object.description}
placeholder={tracker.string.IssueDescriptionPlaceholder} placeholder={tracker.string.IssueDescriptionPlaceholder}
on:changeSize={() => dispatch('changeContent')} on:changeSize={() => dispatch('changeContent')}
/> />
<IssueTemplateChilds <IssueTemplateChilds bind:children={subIssues} sprint={object.sprint} project={object.project} isScrollable />
bind:children={subIssues}
sprint={object.sprint}
project={object.project}
isScrollable
maxHeight={'20vh'}
/>
<svelte:fragment slot="pool"> <svelte:fragment slot="pool">
<div class="flex flex-wrap" style:gap={'0.2vw'}> <div class="flex flex-wrap" style:gap={'0.2vw'}>
{#if issueStatuses} {#if issueStatuses}

View File

@ -108,6 +108,7 @@
/> />
{#each issues as issue, index (issue.id)} {#each issues as issue, index (issue.id)}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div <div
class="flex-between row" class="flex-between row"
class:is-dragging={index === draggingIndex} class:is-dragging={index === draggingIndex}
@ -139,6 +140,7 @@
issue.priority = evt.detail issue.priority = evt.detail
}} }}
/> />
<!-- svelte-ignore a11y-click-events-have-key-events -->
<span class="issuePresenter" on:click={(evt) => openIssue(evt, issue)}> <span class="issuePresenter" on:click={(evt) => openIssue(evt, issue)}>
<FixedColumn <FixedColumn
width={propsWidth.issue} width={propsWidth.issue}
@ -156,7 +158,7 @@
<div class="flex-center flex-no-shrink"> <div class="flex-center flex-no-shrink">
<EstimationEditor <EstimationEditor
kind={'link'} kind={'link'}
size={'small'} size={'large'}
bind:value={issue} bind:value={issue}
on:change={(evt) => { on:change={(evt) => {
dispatch('update-issue', { id: issue.id, estimation: evt.detail }) dispatch('update-issue', { id: issue.id, estimation: evt.detail })

View File

@ -86,7 +86,7 @@
</div> </div>
{#if hasSubIssues} {#if hasSubIssues}
<ExpandCollapse isExpanded={!isCollapsed} duration={400} on:changeContent> <ExpandCollapse isExpanded={!isCollapsed} duration={400} on:changeContent>
<div class="list" class:collapsed={isCollapsed}> <div class="flex-col flex-no-shrink list clear-mins" class:collapsed={isCollapsed}>
<IssueTemplateChildList <IssueTemplateChildList
{project} {project}
{sprint} {sprint}