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>
This commit is contained in:
1 parent
cefb9ec640
commit
60c1b0ead6
1 file changed
+4
-7
@@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user