Skip to content

Conversation

@sebdotv
Copy link
Contributor

@sebdotv sebdotv commented Apr 29, 2025

fix #3847

Update "Platform", "App features" and "Serving at" paragraphs by removing wrapping.

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 (i.e. URL gets truncated) but possibly less confusing.

before

╭────────────────────────────────────────────────────────────────────────── /:more ╮
│  App:     ━━━━━━━━━━━━━━━━━━━━━━━━━━  🎉 0.4s      Platform: Web                 │
│  Bundle:  ━━━━━━━━━━━━━━━━━━━━━━━━━━  🎉 3.7s      App features: ["web"]         │
│  Status:  Serving [_project_name_] 🚀 4.1s         Serving at:                   │
╰──────────────────────────────────────────────────────────────────────────────────╯

╭────────────────────────────────────────────────────────────── /:more ╮
│  App:     ━━━━━━━━━━━━━━━━━━━━━━━━━━  🎉 0.4s      Platform: Web     │
│  Bundle:  ━━━━━━━━━━━━━━━━━━━━━━━━━━  🎉 3.7s      App features:     │
│  Status:  Serving [_project_name_] 🚀 4.1s         Serving at:       │
╰──────────────────────────────────────────────────────────────────────╯

after

╭────────────────────────────────────────────────────────────────────────── /:more ╮
│  App:     ━━━━━━━━━━━━━━━━━━━━━━━━━━  🎉 0.4s      Platform: Web                 │
│  Bundle:  ━━━━━━━━━━━━━━━━━━━━━━━━━━  🎉 3.7s      App features: ["web"]         │
│  Status:  Serving [_project_name_] 🚀 4.1s         Serving at: http://127.0.0.1  │
╰──────────────────────────────────────────────────────────────────────────────────╯

╭────────────────────────────────────────────────────────────── /:more ╮
│  App:     ━━━━━━━━━━━━━━━━━━━━━━━━━━  🎉 0.4s      Platform: Web     │
│  Bundle:  ━━━━━━━━━━━━━━━━━━━━━━━━━━  🎉 3.7s      App features: ["  │
│  Status:  Serving [_project_name_] 🚀 4.1s         Serving at: http  │
╰──────────────────────────────────────────────────────────────────────╯

Note: an alternative would be to use non-breaking space \u{00a0} (which is honored by ratatui) instead of white-space, but it results in the same output as removing wrapping.

…nd "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.
@sebdotv sebdotv requested a review from a team as a code owner April 29, 2025 08:03
@sebdotv sebdotv changed the title update dx serve output: remove wrap right-side paragraphs update dx serve output: remove wrap in right-side paragraphs Apr 29, 2025
@sebdotv sebdotv changed the title update dx serve output: remove wrap in right-side paragraphs Update dx serve output: remove wrap in right-side paragraphs Apr 29, 2025
Copy link
Member

@jkelleyrtp jkelleyrtp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a better default - thanks for the effort

@jkelleyrtp jkelleyrtp merged commit 60c1b0e into DioxusLabs:main May 7, 2025
AnteDeliria pushed a commit to AnteDeliria/dioxus that referenced this pull request Jun 2, 2025
…abs#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 <[email protected]>
AnteDeliria pushed a commit to AnteDeliria/dioxus that referenced this pull request Jul 23, 2025
…abs#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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dx serve's cli output has a blank serving at field

2 participants