Sfoglia il codice sorgente

docs: share fix last message not expandable

Jay V 7 mesi fa
parent
commit
25c876caa2
1 ha cambiato i file con 12 aggiunte e 1 eliminazioni
  1. 12 1
      packages/web/src/components/Share.tsx

+ 12 - 1
packages/web/src/components/Share.tsx

@@ -321,6 +321,7 @@ function TextPart(props: TextPartProps) {
 
   createEffect(() => {
     local.text
+    local.expand
     setTimeout(checkOverflow, 0)
   })
 
@@ -372,6 +373,7 @@ function ErrorPart(props: ErrorPartProps) {
 
   createEffect(() => {
     local.children
+    local.expand
     setTimeout(checkOverflow, 0)
   })
 
@@ -425,6 +427,7 @@ function MarkdownPart(props: MarkdownPartProps) {
 
   createEffect(() => {
     local.text
+    local.expand
     setTimeout(checkOverflow, 0)
   })
 
@@ -486,6 +489,14 @@ function TerminalPart(props: TerminalPartProps) {
     }
   }
 
+  createEffect(() => {
+    local.command
+    local.result
+    local.error
+    local.expand
+    setTimeout(checkOverflow, 0)
+  })
+
   onMount(() => {
     checkOverflow()
     window.addEventListener("resize", checkOverflow)
@@ -895,7 +906,7 @@ export default function Share(props: {
           fallback={<p>Waiting for messages...</p>}
         >
           <div class={styles.parts}>
-            <SuspenseList>
+            <SuspenseList revealOrder="forwards">
               <For each={data().messages}>
                 {(msg, msgIndex) => (
                   <Suspense>