Skip to content

Commit d4b32fc

Browse files
committed
feature(3331): aligned stack children spacing and fixed linting issues
Signed-off-by: Luutzen Dijkstra <[email protected]>
1 parent 20d25a0 commit d4b32fc

File tree

4 files changed

+41
-24
lines changed

4 files changed

+41
-24
lines changed

src/components/board/Board.vue

+3-2
Original file line numberDiff line numberDiff line change
@@ -310,11 +310,12 @@ export default {
310310
position: relative;
311311

312312
.smooth-dnd-container.vertical {
313+
$margin-x: calc($stack-gap * -1);
313314
display: flex;
314315
flex-direction: column;
315316
gap: $stack-gap;
316-
padding: 5px calc(#{$stack-gap / 2}) $stack-gap;
317-
margin: 0 calc(#{$stack-gap / -2});
317+
padding: $stack-gap;
318+
margin: 0 $margin-x;
318319
overflow-y: auto;
319320
scrollbar-gutter: stable;
320321
}

src/components/board/Stack.vue

+20-11
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
</Container>
109109

110110
<transition name="slide-bottom" appear>
111-
<div v-show="showAddCard" class="stack__card-add">
111+
<div v-if="showAddCard" class="stack__card-add">
112112
<form :class="{ 'icon-loading-small': stateCardCreating }"
113113
@submit.prevent.stop="clickAddCard()">
114114
<label for="new-stack-input-main" class="hidden-visually">{{ t('deck', 'Add a new card') }}</label>
@@ -384,16 +384,12 @@ export default {
384384
display: block;
385385
position: absolute;
386386
width: 100%;
387-
height: 20px;
388-
top: 30px;
389-
left: 0px;
387+
height: $stack-gap;
388+
bottom: 0;
390389
z-index: 99;
391390
transition: top var(--animation-slow);
392-
background-image: linear-gradient(180deg, var(--color-main-background) 3px, rgba(255, 255, 255, 0) 100%);
393-
394-
body.theme--dark & {
395-
background-image: linear-gradient(180deg, var(--color-main-background) 3px, rgba(0, 0, 0, 0) 100%);
396-
}
391+
background-image: linear-gradient(180deg, var(--color-main-background) 0%, transparent 100%);
392+
transform: translateY(100%);
397393
}
398394

399395
& > * {
@@ -451,9 +447,22 @@ export default {
451447
flex-shrink: 0;
452448
z-index: 100;
453449
display: flex;
454-
margin-bottom: 5px;
455-
padding-top: var(--default-grid-baseline);
450+
padding-bottom: $stack-gap;
456451
background-color: var(--color-main-background);
452+
position: relative;
453+
454+
// Smooth fade out of the cards at the top
455+
&:before {
456+
content: '';
457+
display: block;
458+
position: absolute;
459+
width: 100%;
460+
height: $stack-gap;
461+
z-index: 99;
462+
transition: bottom var(--animation-slow);
463+
background-image: linear-gradient(0deg, var(--color-main-background) 0%, transparent 100%);
464+
transform: translateY(-100%);
465+
}
457466

458467
form {
459468
display: flex;

src/components/overview/Overview.vue

+13-8
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,23 @@
1414
</div>
1515

1616
<div v-else-if="isValidFilter" class="overview">
17-
<div v-for="columnProps in columnPropsList" class="dashboard-column" :key="columnProps.title">
17+
<div v-for="columnProps in columnPropsList" :key="columnProps.title" class="dashboard-column">
1818
<div class="dashboard-column__header">
1919
<h3 class="dashboard-column__header-title"
2020
:title="columnProps.title"
21-
:aria-label="columnProps.title"
22-
>{{ t('deck', columnProps.title) }}</h3>
21+
:aria-label="columnProps.title">
22+
{{ t('deck', columnProps.title) }}
23+
</h3>
2324
</div>
2425
<div class="dashboard-column__list">
2526
<template v-if="columnProps.sort === false">
26-
<CardItem :id="card.id" v-for="card in filterCards(columnProps.filter)" :key="card.id" />
27+
<CardItem v-for="card in filterCards(columnProps.filter)"
28+
:id="card.id"
29+
:key="card.id" />
2730
</template>
2831
<template v-else>
29-
<CardItem :id="card.id" v-for="card in sortCards(filterCards(columnProps.filter))"
32+
<CardItem v-for="card in sortCards(filterCards(columnProps.filter))"
33+
:id="card.id"
3034
:key="card.id" />
3135
</template>
3236
</div>
@@ -131,7 +135,7 @@ export default {
131135
this.loading = false
132136
},
133137
filterCards(when) {
134-
return this.assignedCardsDashboard[when];
138+
return this.assignedCardsDashboard[when]
135139
},
136140
sortCards(cards) {
137141
if (!cards) {
@@ -217,11 +221,12 @@ export default {
217221
}
218222

219223
.dashboard-column__list {
224+
$margin-x: calc($stack-gap * -1);
220225
display: flex;
221226
flex-direction: column;
222227
gap: $stack-gap;
223-
padding: 5px calc(#{$stack-gap / 2}) $stack-gap;
224-
margin: 0 calc(#{$stack-gap / -2});
228+
padding: $stack-gap;
229+
margin: 0 $margin-x;
225230
overflow-y: auto;
226231
scrollbar-gutter: stable;
227232
}

src/components/search/GlobalSearchResults.vue

+5-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
<section v-if="searchQuery!==''" class="global-search">
88
<header class="search-header">
99
<h2>
10-
<NcRichText
11-
:text="$route.params.id ? t('deck', 'Search for {searchQuery} in other boards') : t('deck', 'Search for {searchQuery} in all boards')"
10+
<NcRichText :text="$route.params.id ? t('deck', 'Search for {searchQuery} in other boards') : t('deck', 'Search for {searchQuery} in all boards')"
1211
:arguments="queryStringArgs" />
1312
<span v-if="loading" class="icon-loading-small" />
1413
</h2>
@@ -18,7 +17,10 @@
1817
</header>
1918
<div class="search-wrapper">
2019
<template v-if="loading || filteredResults.length > 0">
21-
<CardItem v-for="card in filteredResults" :id="card.id" :key="card.id" :standalone="true" />
20+
<CardItem v-for="card in filteredResults"
21+
:id="card.id"
22+
:key="card.id"
23+
:standalone="true" />
2224
<Placeholder v-if="loading" />
2325
<InfiniteLoading :identifier="searchQuery" @infinite="infiniteHandler">
2426
<div slot="spinner" />

0 commit comments

Comments
 (0)