From dc57a187a3a0c120b6a064c27dbf9cef780714df 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 bb54300..43dce1c 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 a52c934..c1b6c58 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 77b3a6a..57b3add 100644 --- a/src/components/ExtendedTextarea.svelte +++ b/src/components/ExtendedTextarea.svelte @@ -17,6 +17,7 @@ import OutlineButton from "./OutlineButton.svelte"; interface Props { + textAreaSize?: "grow" | "resizable" | "fixed-height"; 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}