소스 검색

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 개월 전
부모
커밋
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,
         );
     }