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

AnsiConsole.Write receives an IEnumerable from IRenderable #1437

Open
jos3s opened this issue Jan 30, 2024 · 0 comments · May be fixed by #1438
Open

AnsiConsole.Write receives an IEnumerable from IRenderable #1437

jos3s opened this issue Jan 30, 2024 · 0 comments · May be fixed by #1438

Comments

@jos3s
Copy link

jos3s commented Jan 30, 2024

Is your feature request related to a problem? Please describe.
I find it frustrating that I need to do an AnsiConsole.Write when I want to create text that are pieces of library classes. For example, I want to display "File create, in the path: {PATH} ", where PATH would be an item of type TextPath.

Describe the solution you'd like
image
My solution would be to allow an overload of AnsiConsole's Write method, which receives a list of IRenderable items and assembles them in one line.

Where the final output would be something like this:
image

Describe alternatives you've considered

Another solution that has been considered would be for items such as Text, TextJson and the like to have a ToString method that returns the string to be used in string interpolations
image

Additional context
Add any other context or screenshots about the feature request here.


Please upvote 👍 this issue if you are interested in it.

@jos3s jos3s linked a pull request Jan 30, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo 🕑
Development

Successfully merging a pull request may close this issue.

1 participant