Mattermost-server: <enter> to send should be sensitive to context

Created on 12 Sep 2016  Â·  10Comments  Â·  Source: mattermost/mattermost-server

Summary

Pressing enter should probably not send if in an unclosed block (e.g. ```) and potentially other contexts.

Steps to reproduce

Mattermost Team Edition 3.3.0

Expected behavior

Matter most gives the option to send on enter or ctrl-enter. I'm in the enter camp. But i think most of us reflexively hit our send keystroke at the end of a line. However, it seems that if you are in an open code block (```) or typing a list, you might want to swap the defaults to better predict intended behavior.

I would recommend an option to swap enter behavior in open blocks.

All 10 comments

Thanks for the feedback @jerlich, I have queued this to discuss in our UX design meeting. I will circle back on the decision.

After discussing with the UX team we decided to follow the GitHub model for this case, which follows our model of fast, obvious and forgiving. If the user attempts to send a message with an open code block, the codeblock should automatically close. I've created a ticket here for this, if any community members would like to work on it please comment in JIRA.

@esethna From my perspective, a GitHub comment is pretty different from an IM, and this proposed auto-close codeblock doesn't feel helpful. There's three possible situations here —

  • The user just typed the opening code block delimiter and hit Enter.

    • Here the autoclose just produces an unhelpful blank code block.

  • The user is partway into typing the code and forgetfully hits Enter.

    • Here the autoclose actually loses information — the code isn't complete but unless you can tell from the code itself, there's no way to see that the message was incomplete.

  • The user finished typing the code but just forgot to close the code block

    • Here, and only here, the autoclose does something helpful, but this, in my experience, is the 1% of cases.

I definitely prefer @jerlich's concept.

@pydsigner thanks for the feedback. Do you have examples of other software products using the concept proposed (swapping the behavior of enter inside an open code block)? The issue the design team had is that it's not obvious that the behaviour for sending a message would change because you opened a code block. Users may be confused why their message isn't sending.

@esethna I think that in all but case three, and perhaps a fourth where for some reason they intentionally try to send a broken code block, the user will never notice, because it's not that hitting Enter does nothing, it's that it does what the user was (forgetfully) expecting it to do.

@esethna The point I failed to communicate though was that I think that both @jerlich's approach and the current behavior are preferable to autoclosing code tags.

The behavior I described is used in slack.
Btw, thanks for being super responsive to suggestions!

@jerlich I was about to disagree on that, but sure enough, there is such an option.

screenshot_2016-09-21_21-11-52

This feature definitely doesn't need to be on by default in Mattermost, but having at least the option would be greatly appreciated, and will help continue the pattern of Mattermost's feature parity/superiority.

Thanks for the great feedback. Agree that this should definitely not be the default behavior, but a setting option would make sense. The complication is that we have the setting for sending messages on Ctrl-Enter, which I don't think Slack has, so we'd have to figure out how the UI fits for this setting. @jerlich can you please help submit a feature request to our feature idea forum so the community can up vote and discuss?

Was this page helpful?
0 / 5 - 0 ratings