mtxr / vscode-sqltools

Database management for VSCode
https://vscode-sqltools.mteixeira.dev?utm_source=github&utm_medium=homepage-link
MIT License
1.43k stars 290 forks source link

QueryError component does not wrap long messages #1307

Closed joaoguilhermeall closed 2 months ago

joaoguilhermeall commented 2 months ago

Describe the bug

I am developing a new driver to be used with SQLTools and I noticed that when an error message is too long it is not formatted correctly and prevents the error from being read.

When observing, I noticed that this happens because the component uses a pre element to display the messages, which by default does not actually wrap the messages. See reference.

However, I understand the use of pre, but I believe it would also be valid to have a line break when messages exceed the maximum width of the view used.

To Reproduce Steps to reproduce the behavior:

  1. Execute any query whose error has a long description

Expected behavior

Show the error message with line breaks if necessary so that it can be read

Screenshots

How the error screen is displayed if the pre element does not have the style to perform the line break image

What could the error screen be like if the pre element is configured to perform line wrapping image

Desktop (please complete the following information):

Additional context

gjsjohnmurray commented 2 months ago

@joaoguilhermeall please update to 0.28.2 (released today) and see if we've fixed this correctly.