Browse Source

Update dx serve output: remove wrap in right-side paragraphs (#4055)

* update dx serve output: remove wrap from "Platform", "App features" and "Serving at" paragraphs

ratatui's Wrap system causes text to disappear into an invisible 2nd line when paragraph content exceeds available space, which might confuse new users when terminal width is small.
This PR removes wrapping entirely, using ratatui default behavior (truncation) instead, which is not optimal either but possibly less confusing.

---------

Co-authored-by: sebdotv <sebdotv@gmail.com>
Seb. V 1 month ago
parent
commit
60c1b0ead6
1 changed files with 4 additions and 7 deletions
  1. 4 7
      packages/cli/src/serve/output.rs

+ 4 - 7
packages/cli/src/serve/output.rs

@@ -13,7 +13,7 @@ use crossterm::{
 };
 };
 use ratatui::{
 use ratatui::{
     prelude::*,
     prelude::*,
-    widgets::{Block, BorderType, Borders, LineGauge, Paragraph, Wrap},
+    widgets::{Block, BorderType, Borders, LineGauge, Paragraph},
     TerminalOptions, Viewport,
     TerminalOptions, Viewport,
 };
 };
 use std::{
 use std::{
@@ -642,8 +642,7 @@ impl Output {
                 } else {
                 } else {
                     " ".dark_gray()
                     " ".dark_gray()
                 },
                 },
-            ]))
-            .wrap(Wrap { trim: false }),
+            ])),
             current_platform,
             current_platform,
         );
         );
 
 
@@ -663,8 +662,7 @@ impl Output {
                     "ServerFns at: ".gray()
                     "ServerFns at: ".gray()
                 },
                 },
                 address,
                 address,
-            ]))
-            .wrap(Wrap { trim: false }),
+            ])),
             serve_address,
             serve_address,
         );
         );
     }
     }
@@ -689,8 +687,7 @@ impl Output {
                 lines.push("]".yellow());
                 lines.push("]".yellow());
 
 
                 lines
                 lines
-            }))
-            .wrap(Wrap { trim: false }),
+            })),
             area,
             area,
         );
         );
     }
     }