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

Improved the visual appeal of SelectionPrompt and MultiSelectionPrompt (text wrapping) #1578

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

yymqn
Copy link
Contributor

@yymqn yymqn commented Jul 1, 2024

fixes #1577

  • I have read the Contribution Guidelines
  • I have commented on the issue above and discussed the intended changes
  • A maintainer has signed off on the changes and the issue was assigned to me
  • All newly added code is adequately covered by tests
  • All existing tests are still running without errors
  • The documentation was modified to reflect the changes OR no documentation changes are required.

Changes

I've modified how SelectionPrompt<T> and MultiSelectionPrompt<T> render the prompt. Instead of using Grid with only one column, I split the row into two columns, where one is the indentation, arrow, or checkbox and the second column is the text itself. This makes the wrapping look better.

Before the change:
image

After the change:
image


Please upvote 👍 this pull request if you are interested in it.

…t when wrapping. Modified one test to pass this change.
@yymqn
Copy link
Contributor Author

yymqn commented Jul 2, 2024

I've fixed an issue with SelectionPrompt<T> where the indentation was incorrect when using groups and nesting. Also, I've updated the code formatting to pass the analyzers.

@yymqn
Copy link
Contributor Author

yymqn commented Sep 10, 2024

@patriksvensson Could you please take a look at my PR? There hasn't been any activity for over 2 months.

I would completely understand if this didn't get merged, as the code behind it might not be the best solution and could be written better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⭐ top pull request Top pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option text wrapping for SelectionPrompt<T> and MultiSelectionPrompt<T>
1 participant