Просмотр исходного кода

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 месяц назад
Родитель
Сommit
60c1b0ead6
1 измененных файлов с 4 добавлено и 7 удалено
  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::{
     prelude::*,
-    widgets::{Block, BorderType, Borders, LineGauge, Paragraph, Wrap},
+    widgets::{Block, BorderType, Borders, LineGauge, Paragraph},
     TerminalOptions, Viewport,
 };
 use std::{
@@ -642,8 +642,7 @@ impl Output {
                 } else {
                     " ".dark_gray()
                 },
-            ]))
-            .wrap(Wrap { trim: false }),
+            ])),
             current_platform,
         );
 
@@ -663,8 +662,7 @@ impl Output {
                     "ServerFns at: ".gray()
                 },
                 address,
-            ]))
-            .wrap(Wrap { trim: false }),
+            ])),
             serve_address,
         );
     }
@@ -689,8 +687,7 @@ impl Output {
                 lines.push("]".yellow());
 
                 lines
-            }))
-            .wrap(Wrap { trim: false }),
+            })),
             area,
         );
     }