Merge pull request #1576 from nextcloud/bugfix/noid/board-jumping

Fix card sizing when editing
This commit is contained in:
Julius Härtl
2020-03-10 12:39:10 +01:00
committed by GitHub

View File

@@ -25,7 +25,7 @@
--> -->
<template> <template>
<div :class="{'compact': compactMode, 'current-card': currentCard}" <div :class="{'compact': compactMode, 'current-card': currentCard, 'has-labels': card.labels.length > 0, 'is-editing': editing}"
tag="div" tag="div"
class="card" class="card"
@click.self="openCard"> @click.self="openCard">
@@ -36,9 +36,7 @@
<h3 v-else-if="!editing" @click.stop="startEditing(card)"> <h3 v-else-if="!editing" @click.stop="startEditing(card)">
{{ card.title }} {{ card.title }}
</h3> </h3>
<h3 v-else>
&nbsp;
</h3>
<form v-if="editing" <form v-if="editing"
v-click-outside="cancelEdit" v-click-outside="cancelEdit"
class="dragDisabled" class="dragDisabled"
@@ -87,7 +85,7 @@
</div> </div>
</Modal> </Modal>
</div> </div>
<ul class="labels" @click="openCard"> <ul v-if="card.labels.length > 0" class="labels" @click="openCard">
<li v-for="label in card.labels" :key="label.id" :style="labelStyle(label)"> <li v-for="label in card.labels" :key="label.id" :style="labelStyle(label)">
<span>{{ label.title }}</span> <span>{{ label.title }}</span>
</li> </li>
@@ -245,10 +243,10 @@ export default {
.card-upper { .card-upper {
display: flex; display: flex;
min-height: 50px;
form { form {
display: flex; display: flex;
padding: 5px 7px; padding: 5px 7px;
position: absolute;
width: 100%; width: 100%;
input[type=text] { input[type=text] {
flex-grow: 1; flex-grow: 1;
@@ -256,7 +254,7 @@ export default {
} }
h3 { h3 {
margin: $card-padding; margin: 14px $card-padding;
flex-grow: 1; flex-grow: 1;
font-size: 100%; font-size: 100%;
cursor: text; cursor: text;
@@ -308,16 +306,20 @@ export default {
margin-right: $card-padding; margin-right: $card-padding;
& > div { & > div {
display: flex; display: flex;
height: 44px; max-height: 44px;
} }
} }
} }
.compact { .compact {
min-height: 50px;
&.has-labels {
padding-bottom: $card-padding; padding-bottom: $card-padding;
}
.labels { .labels {
height: 6px; height: 6px;
margin-top: -10px; margin-top: -7px;
margin-bottom: 3px; margin-bottom: 3px;
} }
.labels li { .labels li {