From d6d9c43ee6ab75f30080f8716be7b9563def9231 Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Sat, 14 Dec 2024 08:52:44 +0100 Subject: [PATCH] Fix regression on height of CreateIssue description field Also instead of calculating the height of the description textarea we should allow flexbox to extend the description field to fill the entire height. --- public/index.css | 6 ------ src/components/Border.svelte | 5 ++++- src/components/ExtendedTextarea.svelte | 30 +++++++++++--------------- src/components/Textarea.svelte | 5 ++++- src/views/repo/CreateIssue.svelte | 6 ++++-- 5 files changed, 25 insertions(+), 27 deletions(-) diff --git a/public/index.css b/public/index.css index bb5430034..43dce1c90 100644 --- a/public/index.css +++ b/public/index.css @@ -64,12 +64,6 @@ body { font-weight: var(--font-weight-regular); } -@media (max-width: 1600px) { - .global-hide-on-small-desktop-down { - display: none !important; - } -} - :root { --elevation-low: 0 0 48px 0 #000000ee; } diff --git a/src/components/Border.svelte b/src/components/Border.svelte index a52c9344f..c1b6c58f2 100644 --- a/src/components/Border.svelte +++ b/src/components/Border.svelte @@ -17,6 +17,7 @@ flatTop?: boolean; styleBackgroundColor?: string; styleFlexDirection?: string; + styleAlignItems?: string; styleJustifyContent?: string; } @@ -36,6 +37,7 @@ flatTop = false, styleBackgroundColor = "var(--color-background-default)", styleFlexDirection = "row", + styleAlignItems = "center", styleJustifyContent, }: Props = $props(); @@ -54,6 +56,7 @@ -webkit-user-select: none; user-select: none; + flex: 1; column-gap: 0; row-gap: 0; display: grid; @@ -128,7 +131,6 @@ .p3-3 { grid-area: p3-3; display: flex; - align-items: center; background-color: var(--local-background-color); } .p3-4 { @@ -229,6 +231,7 @@ style:gap={styleGap} style:overflow={styleOverflow} style:justify-content={styleJustifyContent} + style:align-items={styleAlignItems} style:flex-direction={styleFlexDirection}> {@render children()} diff --git a/src/components/ExtendedTextarea.svelte b/src/components/ExtendedTextarea.svelte index 77b3a6a93..7c673d6f6 100644 --- a/src/components/ExtendedTextarea.svelte +++ b/src/components/ExtendedTextarea.svelte @@ -17,6 +17,7 @@ import OutlineButton from "./OutlineButton.svelte"; interface Props { + textAreaSize?: ComponentProps["size"]; styleMinHeight?: string; rid: string; placeholder?: string; @@ -41,6 +42,7 @@ /* eslint-disable prefer-const */ let { + textAreaSize, preview = $bindable(false), styleMinHeight, rid, @@ -196,6 +198,7 @@ align-items: flex-start; gap: 1rem; width: 100%; + flex: 1; } .inline { border: 0; @@ -239,6 +242,8 @@ {:else}