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

Allow notifications to have newlines #101589

Closed
katelynienaber opened this issue Jul 2, 2020 · 15 comments
Closed

Allow notifications to have newlines #101589

katelynienaber opened this issue Jul 2, 2020 · 15 comments
Labels
feature-request Request for new features or functionality *out-of-scope Posted issue is not in scope of VS Code ux User experience issues workbench-notifications Notification widget issues
Milestone

Comments

@katelynienaber
Copy link

katelynienaber commented Jul 2, 2020

I would like to be able to use newlines in the notifications.

I know it has already been rejected here, but the VSCode native alerts are able to have multi-line comments, so why isn't this an option for the extensions? If "Notifications are imho not the right place to show structured text with formatting", then where else are we supposed to show complex notifications? Is there any other available location in VSCode?

Also I would argue that multi-line notifications are a pretty basic thing. I am not asking for the ability to add sixteen colors and a cursive font, I just need to be able to, say, make a confirmation message which shows the contents of an object in a structured way, for example.

And I am not the only one who still wants this.

Therefore opening this as a feature request again.

@bpasero bpasero added feature-request Request for new features or functionality workbench-notifications Notification widget issues labels Jul 3, 2020
@bpasero bpasero removed their assignment Jul 3, 2020
@RandomFractals
Copy link

RandomFractals commented Sep 29, 2020

this can't be a good reason to strip out new lines

// Remove newlines from messages as we do not support that and it makes link parsing hard
		message = message.replace(/(\r\n|\n|\r)/gm, ' ').trim();

Please reopen.

This issue now has 20 votes required to get added to the backlog based on the consensus reached by vscode extension authors in slack.

Thanks!

@eamodio eamodio reopened this Sep 29, 2020
@eamodio eamodio modified the milestones: Backlog Candidates, Backlog Sep 29, 2020
@bpasero bpasero added the *out-of-scope Posted issue is not in scope of VS Code label Nov 2, 2020
@RandomFractals
Copy link

RandomFractals commented Nov 2, 2020

well, good IDEs allow notification messages that contain paragraphs of text for more info.

not sure why this is such a big deal, marked as out of scope, or what that links parsing comment has to do with this change & such a simple request.

@eamodio
Copy link
Contributor

eamodio commented Nov 2, 2020

@bpasero Why is this out of scope? This has been asked for by the community many times, and imo feels like a very reasonable request. What is the main objection here?

@bpasero
Copy link
Member

bpasero commented Nov 3, 2020

I feel that notifications are not a good place to show a lot of information. The text should be short and concise. Allowing to use newlines and potentially other formatting only asks for larger notifications that consume even more space.

Does that make sense?

@eamodio
Copy link
Contributor

eamodio commented Nov 3, 2020

While I agree with the sentiment and don't want to have larger notifications, the ability of adding a newline or so can often improve readability and user-experience. The space is still constrained so packing too much content would still be highly discouraged. Also, we aren't talking about other formatting here.

@katelynienaber
Copy link
Author

I feel that notifications are not a good place to show a lot of information. The text should be short and concise. Allowing to use newlines and potentially other formatting only asks for larger notifications that consume even more space.

Does that make sense?

@bpasero Isn't that up to us? If we design our extensions badly and the alerts are obnoxiously big, then people just won't use our extension...

@bpasero
Copy link
Member

bpasero commented Nov 3, 2020

Let me bring this to the UX call and then report back the decision here. Depending on that call we may either close or leave the issue open.

@bpasero bpasero reopened this Nov 3, 2020
@bpasero bpasero changed the title Newline in showInformationMessage Allow notifications to have newlines Nov 3, 2020
@bpasero
Copy link
Member

bpasero commented Nov 3, 2020

@katelynienaber

@bpasero Isn't that up to us? If we design our extensions badly and the alerts are obnoxiously big, then people just won't use our extension...

That is not a good argument. Every extension author feels that their extension is the best and greatest and deserves notifications with lots of text to tell the user. The user may not agree but may also not have any alternative (e.g. imagine this was the one and only Python extension or C++). We would at least need #41767 so that the user can stop an extension from spamming.

@bpasero bpasero added ux User experience issues and removed *out-of-scope Posted issue is not in scope of VS Code labels Nov 3, 2020
@miguelsolorio
Copy link
Contributor

I'd be curious to know what the use cases are here. If all we're wanting to do is improve the readability of notifications, then I think we can look at how other systems structure their notifications:

Title
Detail
Message
[Actions]

@RandomFractals
Copy link

I don't know if Slack and Windows notifications are good examples of UX for IDE notifications.

I would agree that in the short form that toast would display message type (info, warning, error), perhaps an ext. name it's coming from & the 1st line of text with ... in a collapsed state.

However, there are instances when we'd like to display a notification, like an error, where we would provide brief error description, & more information on the new line, if that makes sense.

@miguelsolorio
Copy link
Contributor

miguelsolorio commented Nov 4, 2020

@RandomFractals I don't know, you're comparing a tool vs multiple platforms that use the same pattern. If you have other examples of better notifications please do share them.

Notifications are intended to be short and concise so that the user can act upon it. If they need more information, there should be an action to see that information. I don't believe we should try to cram too much information here.

@RandomFractals
Copy link

I don't have a better example. I believe I described the typical use case & notifications in the current form don't support it.

It doesn't sound like you are willing to provide that option, or formatted messages in notifications. So, feel free to close it.

Thanks!

@fabiospampinato
Copy link
Contributor

fabiospampinato commented Jul 16, 2021

IMO a decent compromise would be to allow a title and a body, but disallowing newlines in the body.

There are some use cases where a single uninterrupted line of text just isn't the best way to preset some information. I don't agree that bodies shouldn't be able to use newlines at all, but at least having 2 lines should cover a good chunk of use cases.

@capaj
Copy link

capaj commented Jul 28, 2021

Two lines FTW.

@bpasero bpasero added the *out-of-scope Posted issue is not in scope of VS Code label Oct 5, 2021
@madcapnmckay
Copy link

@bpasero - if notifications are not a good place for richer user feedback. What is the recommended approach? For example, in our extension, we show the info message while running a puppeteer test and then report the results in the same message or an error message if they fail. Having no room or flexibility to include additional data in a readable way is quite frustrating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality *out-of-scope Posted issue is not in scope of VS Code ux User experience issues workbench-notifications Notification widget issues
Projects
None yet
Development

No branches or pull requests

9 participants