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

remove leading space from rendered output #55

Closed
roele opened this issue May 15, 2024 · 2 comments · Fixed by #57
Closed

remove leading space from rendered output #55

roele opened this issue May 15, 2024 · 2 comments · Fixed by #57
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@roele
Copy link
Collaborator

roele commented May 15, 2024

Currently components print their result with a leading space in front of every line.

Screenshot 2024-05-15 at 15 02 37

Apart from not providing much visual value it also complicates code a bit since that space needs to be accounted for on every new line that is rendered.

IMO this leading space should be removed.

@roele roele added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels May 15, 2024
@yk-amarly-20
Copy link
Contributor

Hello, @roele @jdx !
May I work on this issue?

I tried running the example, and I understand that this issue has not yet been resolved.

I understand that fixing around this area and the tests, for example, the Confirm struct, would address this.

writeln!(out, " {}", self.title)?;

@roele
Copy link
Collaborator Author

roele commented May 22, 2024

Hi @yk-amarly-20
Help around this would be much appreciated since i currently don't have much time on my hands.

The issue affects pretty much all input types of which Input might be a bit more involved with the cursor handling.

For example:

let mut offset = 1; // 1 for the column before the title/prompt

If you have any questions don't hesitate to reach out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants