From e444694dc09e030d5f717400818e21617617849d Mon Sep 17 00:00:00 2001 From: Theo <36564257+theoholl@users.noreply.github.com> Date: Sun, 19 Jul 2026 10:41:40 +0000 Subject: [PATCH 01/12] Adds settings for creating new cards at the top or bottom of stacks Signed-off-by: Theo <36564257+theoholl@users.noreply.github.com> --- lib/Service/ConfigService.php | 21 ++++++++++++++++++++- src/components/DeckAppSettings.vue | 10 ++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/lib/Service/ConfigService.php b/lib/Service/ConfigService.php index b4afb8fc45..0b9dde777b 100644 --- a/lib/Service/ConfigService.php +++ b/lib/Service/ConfigService.php @@ -52,7 +52,8 @@ public function getAll(): array { $data = [ 'calendar' => $this->isCalendarEnabled(), 'cardDetailsInModal' => $this->isCardDetailsInModal(), - 'cardIdBadge' => $this->isCardIdBadgeEnabled() + 'cardIdBadge' => $this->isCardIdBadgeEnabled(), + 'stackAddCardAtTop' => $this->isStackAddCardAtTopEnabled() ]; if ($this->groupManager->isAdmin($userId)) { $data['groupLimit'] = $this->get('groupLimit'); @@ -90,6 +91,11 @@ public function get(string $key) { return false; } return (bool)$this->config->getUserValue($this->getUserId(), Application::APP_ID, 'cardIdBadge', false); + case 'stackAddCardAtTop': + if ($this->getUserId() === null) { + return false; + } + return $this->isStackAddCardAtTopEnabled(); } return false; } @@ -134,6 +140,15 @@ public function isCardIdBadgeEnabled(): bool { return (bool)$this->config->getUserValue($userId, Application::APP_ID, 'cardIdBadge', $defaultState); } + public function isStackAddCardAtTopEnabled(): bool { + $userId = $this->getUserId(); + if ($userId === null) { + return false; + } + + return (bool)$this->config->getUserValue($userId, Application::APP_ID, 'stackAddCardAtTop', true); + } + public function ensureFederationEnabled() { if (!$this->get('federationEnabled')) { throw new FederationDisabledException(); @@ -181,6 +196,10 @@ public function set($key, $value) { $this->config->setUserValue($userId, Application::APP_ID, 'cardIdBadge', (string)$value); $result = $value; break; + case 'stackAddCardAtTop': + $this->config->setUserValue($userId, Application::APP_ID, 'stackAddCardAtTop', (string)$value); + $result = $value; + break; case 'board': // extra check that user only send one of the allowed board settings and not something random $parts = explode(':', $key, 3); diff --git a/src/components/DeckAppSettings.vue b/src/components/DeckAppSettings.vue index 3935dbff5d..8045bcc2df 100644 --- a/src/components/DeckAppSettings.vue +++ b/src/components/DeckAppSettings.vue @@ -12,6 +12,8 @@ + @@ -119,6 +121,14 @@ export default { this.$store.dispatch('setConfig', { cardDetailsInModal: newValue }) }, }, + stackAddCardAtTop: { + get() { + return this.$store.getters.config('stackAddCardAtTop') !== false + }, + set(newValue) { + this.$store.dispatch('setConfig', { stackAddCardAtTop: newValue }) + }, + }, cardIdBadge: { get() { return this.$store.getters.config('cardIdBadge') From e2b6939ecc406e64d3617f8d98ac7164b25b6d2d Mon Sep 17 00:00:00 2001 From: Theo <36564257+theoholl@users.noreply.github.com> Date: Sun, 19 Jul 2026 11:01:20 +0000 Subject: [PATCH 02/12] Add a button for adding cards to the top or bottom of a stack Signed-off-by: Theo <36564257+theoholl@users.noreply.github.com> --- src/components/board/Stack.vue | 91 ++++++++++++++++++++++++++++------ 1 file changed, 76 insertions(+), 15 deletions(-) diff --git a/src/components/board/Stack.vue b/src/components/board/Stack.vue index 0531548e68..2a4c9f315c 100644 --- a/src/components/board/Stack.vue +++ b/src/components/board/Stack.vue @@ -69,14 +69,6 @@ {{ t('deck', 'Delete list') }} - - - {{ t('deck', 'Add card') }} - - - @@ -101,6 +93,39 @@ + +
+ + {{ t('deck', '+ Add card') }} + +
+ + + +
+
+
+ -
-
+ + {{ t('deck', '+ Add card') }} + + { this.$refs.newCardInput.focus() this.animate = false - this.$refs.card[(this.$refs.card.length - 1)].scrollIntoView() + if (this.$refs.card && this.$refs.card.length > 0) { + const index = addCardAtTop ? 0 : this.$refs.card.length - 1 + this.$refs.card[index].scrollIntoView() + } }) if (!this.cardDetailsInModal) { this.$router.push({ name: 'card', params: { cardId: newCard.id } }) @@ -512,10 +566,17 @@ export default { flex-shrink: 0; z-index: 100; display: flex; - padding-bottom: $stack-gap; background-color: var(--color-main-background); position: relative; + &--top { + padding-top: $stack-gap; + } + + &--bottom { + padding-bottom: $stack-gap; + } + // Smooth fade out of the cards at the top &:before { content: ''; From 8e6289010ccf813aca7f3c16310b8d4657c4ae4b Mon Sep 17 00:00:00 2001 From: Theo <36564257+theoholl@users.noreply.github.com> Date: Sun, 19 Jul 2026 11:12:22 +0000 Subject: [PATCH 03/12] Move 'Add card' button at bottom of stack right underneath last card but make it stick in visible area on overflow Signed-off-by: Theo <36564257+theoholl@users.noreply.github.com> --- src/components/board/Stack.vue | 77 ++++++++++++++++++++++++++++++++-- 1 file changed, 73 insertions(+), 4 deletions(-) diff --git a/src/components/board/Stack.vue b/src/components/board/Stack.vue index 2a4c9f315c..f954fcf82b 100644 --- a/src/components/board/Stack.vue +++ b/src/components/board/Stack.vue @@ -4,8 +4,12 @@ -->