From 08322a4bc9718a52a17c891f0fcb5abaab8c7caa Mon Sep 17 00:00:00 2001
From: Owen Jacobson <owen@grimoire.ca>
Date: Thu, 31 Oct 2024 11:09:51 -0400
Subject: Fix scrolling new messages into view, and layout of the bottom edge
 of message runs.

---
 ui/lib/components/Message.svelte | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'ui/lib/components/Message.svelte')

diff --git a/ui/lib/components/Message.svelte b/ui/lib/components/Message.svelte
index 004a484..75e4cc9 100644
--- a/ui/lib/components/Message.svelte
+++ b/ui/lib/components/Message.svelte
@@ -3,11 +3,15 @@
 
     export let at;
     export let body;
+
+    let scroll = (message) => {
+        message.scrollIntoView();
+    }
 </script>
 
 <div class="message relative">
     <span class="timestamp chip variant-soft absolute top-0 right-0">{at}</span>
-    <section class="mx-4 my-1">
+    <section use:scroll class="py-1">
         <SvelteMarkdown source={body} />
     </section>
 </div>
-- 
cgit v1.2.3

