Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrap long lines nicely #22

Merged
merged 2 commits into from Jul 20, 2022
Merged

Wrap long lines nicely #22

merged 2 commits into from Jul 20, 2022

Conversation

didib
Copy link
Member

@didib didib commented Jun 8, 2022

No description provided.

@didib
Copy link
Member Author

didib commented Jun 8, 2022

Did this in the context of [1], but asked Nikolai to open a separate bug.

I was annoyed by the output for years. Better late than never, I guess/hope.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1881280

Copy link
Member

@sandrobonazzola sandrobonazzola left a comment

Choose a reason for hiding this comment

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

LGTM

@sandrobonazzola sandrobonazzola added this to the ovirt-4.5.2 milestone Jul 6, 2022
@sandrobonazzola sandrobonazzola added this to In progress in oVirt Integration overview via automation Jul 6, 2022
@didib
Copy link
Member Author

didib commented Jul 19, 2022

Rebased

@didib
Copy link
Member Author

didib commented Jul 19, 2022

Updated test_note to include a long URL. This should fail. Will then fix with a next update.

@didib didib force-pushed the wrap-long-lines-nicely branch 5 times, most recently from 9361492 to 6339e0e Compare July 19, 2022 14:22
If dialog.note is passed long lines of text, it prepends some whitespace
to each line to make output "nice", but does not try to break it, thus
letting it wrap "normally" which looks ugly.

Instead, break lines according to terminal width and prepend the same
whitespace to each part.

Change-Id: I4706323a95103eff3257507dd1bd0fdbaa59cd74
Signed-off-by: Yedidyah Bar David <didi@redhat.com>
Add a plugin to output an arbitrary note. Useful for testing a recent
patch to wrap note texts.

Include a long URL in the note, and verify that it's output as-is,
unwrapped.

Change-Id: Id98433880c7bdf1cea3cfc80cc1cbbe59715fecf
Signed-off-by: Yedidyah Bar David <didi@redhat.com>
@didib
Copy link
Member Author

didib commented Jul 20, 2022

Tested engine-setup on a wide (190 column) terminal and it looks almost the same. Tested it on a 80-column terminal and I think it's an improvement, even if not perfect - we might want to further patch setup code. Merging, anyway.

@didib didib merged commit 0e6e4fb into oVirt:master Jul 20, 2022
oVirt Integration overview automation moved this from In progress to Done Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants