From 60c1b0ead6ab4c9e03427ec9ddb4c03d63294d27 Mon Sep 17 00:00:00 2001 From: "Seb. V" Date: Wed, 7 May 2025 21:25:35 +0200 Subject: [PATCH] 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 --- packages/cli/src/serve/output.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/cli/src/serve/output.rs b/packages/cli/src/serve/output.rs index b1ef92e78..a695a85e6 100644 --- a/packages/cli/src/serve/output.rs +++ b/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, ); }