Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/board/Board.vue
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ export default {
padding: $stack-spacing;
overflow-x: hidden;
overflow-y: auto;
scrollbar-gutter: stable;
padding-top: 15px;
margin-top: -10px;
}
Expand Down
42 changes: 30 additions & 12 deletions src/components/board/Stack.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,22 @@

<template>
<div class="stack">
<div v-click-outside="stopCardCreation" class="stack__header" :class="{'stack__header--add': showAddCard }">
<div v-click-outside="stopCardCreation"
class="stack__header"
:class="{'stack__header--add': showAddCard }"
tabindex="0"
:aria-label="stack.title">
<transition name="fade" mode="out-in">
<h3 v-if="!canManage || isArchived">
{{ stack.title }}
</h3>
<h3 v-else-if="!editing"
v-tooltip="stack.title"
tabindex="0"
:aria-label="stack.title"
class="stack__title"
@click="startEditing(stack)">
@click="startEditing(stack)"
@keydown.enter="startEditing(stack)">
{{ stack.title }}
</h3>
<form v-else @submit.prevent="finishedEdit(stack)">
Expand Down Expand Up @@ -325,36 +332,47 @@ export default {
flex-grow: 1;
display: flex;
cursor: inherit;
margin: 0;

input[type=text] {
flex-grow: 1;
}
}
}

.stack__title {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: calc($stack-width - 60px);
h3.stack__title {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: calc($stack-width - 60px);
border-radius: 3px;
margin: 6px;
padding: 4px 4px;

&:focus {
outline: 2px solid var(--color-border-dark);
border-radius: 3px;
}
}

form {
margin: 2px 0;
}
}

.stack__card-add {
width: $stack-width;
height: 44px;
flex-shrink: 0;
z-index: 100;
display: flex;
margin-left: 12px;
margin-right: 12px;
margin-top: 5px;
margin-bottom: 20px;
background-color: var(--color-main-background);

form {
display: flex;
margin-left: 12px;
margin-right: 12px;
width: 100%;
margin: 0;
box-shadow: 0 0 3px var(--color-box-shadow);
border-radius: var(--border-radius-large);
overflow: hidden;
Expand Down
27 changes: 20 additions & 7 deletions src/components/cards/CardItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,18 @@
{{ board.title }} » {{ stack.title }}
</div>
<div class="card-upper">
<h3 v-if="compactMode || isArchived || showArchived || !canEdit || standalone">
<h3 v-if="inlineEditingBlocked">
{{ card.title }}
</h3>
<h3 v-else-if="!editing">
<span @click.stop="startEditing(card)">{{ card.title }}</span>
<h3 v-else-if="!editing"
tabindex="0"
class="editable"
:aria-label="t('deck', 'Edit card title')"
@click.stop="startEditing(card)"
@keydown.enter.stop.prevent="startEditing(card)">
{{ card.title }}
</h3>

<form v-if="editing"
<form v-else-if="editing"
v-click-outside="cancelEdit"
class="dragDisabled"
@click.stop
Expand Down Expand Up @@ -135,6 +139,9 @@ export default {
const board = this.$store.getters.boards.find((item) => item.id === this.card.boardId)
return board ? !board.archived && board.permissions.PERMISSION_EDIT : false
},
inlineEditingBlocked() {
return this.compactMode || this.isArchived || this.showArchived || !this.canEdit || this.standalone
},
card() {
return this.item ? this.item : this.$store.getters.cardById(this.id)
},
Expand Down Expand Up @@ -217,14 +224,20 @@ export default {

}
h3 {
margin: 12px $card-padding;
margin: 5px $card-padding;
padding: 6px;
flex-grow: 1;
font-size: 100%;
overflow: hidden;
word-wrap: break-word;
padding-left: 4px;
span {
&.editable {
cursor: text;

&:focus {
outline: 2px solid var(--color-border-dark);
border-radius: 3px;
}
}
}
input[type=text] {
Expand Down