Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not open the dialog automatically upon card creation, only upon click #2435

Merged
merged 5 commits into from
Oct 13, 2020
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
15 changes: 8 additions & 7 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,6 @@ export default {
}
}
}
</style>

<style lang="scss">

.multiselect {
width: 100%;
}

.modal__card {
min-width: 320px;
Expand All @@ -147,3 +140,11 @@ export default {
height: 80vh;
}
</style>

<style lang="scss">

.multiselect {
width: 100%;
}

</style>
5 changes: 4 additions & 1 deletion src/components/board/Stack.vue
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ export default {
]),
...mapState({
showArchived: state => state.showArchived,
cardDetailsInModal: state => state.cardDetailsInModal,
}),
cardsByStack() {
return this.$store.getters.cardsByStack(this.stack.id).filter((card) => {
Expand Down Expand Up @@ -248,7 +249,9 @@ export default {
this.$refs.newCardInput.focus()
this.animate = false
})
this.$router.push({ name: 'card', params: { cardId: newCard.id } })
if (!this.cardDetailsInModal) {
this.$router.push({ name: 'card', params: { cardId: newCard.id } })
}
} catch (e) {
showError('Could not create card: ' + e.response.data.message)
} finally {
Expand Down
8 changes: 5 additions & 3 deletions src/components/card/CardSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -571,14 +571,16 @@ export default {
// FIXME: Obivously we should at some point not randomly reuse the sidebar component
// since this is not oficially supported
.modal__card .app-sidebar {
$modal-padding: 14px;
border: 0;
min-width: 100%;
min-width: calc(100% - #{$modal-padding*2});
position: relative;
top: 0;
left: 0;
right: 0;
max-width: 100%;
max-height: 100%;
max-width: calc(100% - #{$modal-padding*2});
padding: 14px;
max-height: calc(100% - #{$modal-padding*2});
&::v-deep {
.app-sidebar-header {
position: sticky;
Expand Down
11 changes: 8 additions & 3 deletions src/components/cards/CardItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
class="card"
@click="openCard">
<div class="card-upper">
<h3 v-if="isArchived || showArchived || !canEdit">
<h3 v-if="compactMode || isArchived || showArchived || !canEdit">
{{ card.title }}
</h3>
<h3 v-else-if="!editing">
Expand All @@ -41,6 +41,7 @@
<form v-if="editing"
v-click-outside="cancelEdit"
class="dragDisabled"
@click.stop
@keyup.esc="cancelEdit"
@submit.prevent="finishedEdit(card)">
<input v-model="copiedCard.title"
Expand All @@ -59,9 +60,9 @@
name="zoom"
tag="ul"
class="labels"
@click="openCard">
@click.stop="openCard">
<li v-for="label in labelsSorted" :key="label.id" :style="labelStyle(label)">
<span @click="applyLabelFilter(label)">{{ label.title }}</span>
<span @click.stop="applyLabelFilter(label)">{{ label.title }}</span>
</li>
</transition-group>
<div v-show="!compactMode" class="card-controls compact-item" @click="openCard">
Expand Down Expand Up @@ -171,6 +172,10 @@ export default {
background-color: var(--color-main-background);
margin-bottom: $card-spacing;

&::v-deep * {
cursor: pointer;
}

body.dark &, body.theme--dark & {
border: 2px solid var(--color-border);
}
Expand Down