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

Warn users if markdown is going to kick-in on their message, and give a nice UI for disabling it if desired #1189

Open
ara4n opened this issue Dec 9, 2015 · 23 comments
Labels
A-Composer O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Enhancement X-Needs-Design X-Needs-Product More input needed from the Product team Z-WTF

Comments

@ara4n
Copy link
Member

ara4n commented Dec 9, 2015

This was originally element-hq/element-web#439.

Conversely, we could warn the user that their message contains markdown, and they should turn it on when desired.

UI-wise... um.... this could be a toggleable plinth that appears at the RHS of the input box? Or at the RHS of the the status area above the input box? The latter is probably nicest. We probably want regexp-based heuristics to guess about presence of markdown rather than to run markdown on the message every time you press a key.

@AmandineLP
Copy link

A toggle on the RHS of the status area would be confusing IMO: one might wonder to what it applies. I think it should be in the text input box.

A small icon like in here would be nice, much smaller than the attachment/call ones, literally similar to the one here:
image

Ideally, if we had a few of them, I would have them displayed as a column before the attachment one. But with one only it would look a bit strange. The other option would be to display it above the text being typed.
In any case I agree it should be displayed only when markdown is detected.

@lampholder
Copy link
Member

I haven't ever felt the need for this feature in a RT/MD composer world. Do we still want it?

@turt2live
Copy link
Member

/me raises lampholder's question again: do we still want/need this?

@aaronraimist
Copy link

/me raises lampholder's question again: do we still want/need this?

Yes people still want this

Screen Shot 2020-01-17 at 4 18 58 PM

@tleydxdy
Copy link

tleydxdy commented Mar 10, 2020

please have options to disable markdown, perhaps in the settings there can be a option to choose which to defaults to, and have both /plain and /md for temporary choosing one

@turt2live turt2live changed the title Warn uses if markdown is going to kick-in on their message, and give a nice UI for disabling it if desired Warn users if markdown is going to kick-in on their message, and give a nice UI for disabling it if desired Mar 10, 2020
@SilverWolf32
Copy link

I would also greatly appreciate having a way to disable Markdown besides /plain.

A lot of the time I don't need it, I do need to type a literal *, and putting /plain at the beginning of every single message gets old fast – besides the fact that you can't do that when editing existing messages.

@rohieb
Copy link

rohieb commented Jul 6, 2020

The default input method on RiotX (Android) also seems to be plain text only.

@rohieb
Copy link

rohieb commented Jul 6, 2020

Ah, my bad, the Markdown formatting is behind a preference option on RiotX, but I had disabled it long ago.

@nunoperalta
Copy link

nunoperalta commented Jul 19, 2020

I really have a hard time sometimes with Riot....

I type long messages frequently, and sometimes put multiple line breaks to separate paragraphs, for better understanding.
I may use enumeration, such as "1. 2. etc",
small separators like "--", and so on.

I still cannot understand what exactly decides whether all multiple line breaks will be ignored or not (converting into 1 line break with a slight margin between paragraphs).
Or, sometimes just Editing the message changes it again (either makes it the way I wanted initially, or reverts).

Sometimes I'm forced to put dots "." in every line break, to make sure the spacing that I want is respected.
However, sometimes formatting I never asked for is added for some reason, like making a whole paragraph a Heading, just because Riot decides to add "##" to the beginning of the line.

Seriously.... please stop Riot being obtrusive in the way we type.
If I want markdown, I can enable markdown.
But I really just want plain text...

Also, I think it's really not good that Riot actually makes replacements to my original text.
When I see the mess Riot did, and I go Edit my message, I see formatting/characters that I did not type myself.
E.g. from "1)" to "1.", or the "##" added like I mentioned above.

--

After reading this thread, I'm aware now that I can use the "/plain" command.
However:

  1. It's really inconvenient having to add that to every message

  2. I didn't even know there were commands on Riot... It's not a good UX when users are "supposed to know" this kind of things exist.

@resynth1943
Copy link

Would y'all be cool with a setting for this? I haven't changed anything UI-wise in the composer. I personally think we should keep this in the settings, as people wanting to disable Markdown seem to be in the minority.

image

Submitting a PR soon ;-)

@nunoperalta
Copy link

nunoperalta commented Oct 25, 2020

Would y'all be cool with a setting for this?

Thanks! Can I just confirm with you what will this setting do?

  1. Disables format in the messages we see, whether our own messages or other people's messages, while other people will see our messages formatted by Markdown

or

  1. Disables format in our own messages sending to others, and others will NOT see our messages formatted with Markdown, but we see other people's messages formatted by Markdown, if they have this option disabled

@resynth1943
Copy link

@nunoperalta it just disables any and all Markdown you send.

For example, **a** would literally show up as **a** for other people.
Any Markdown messages sent by other people would be formatted in the client.
This is in line with the issue:

that their message contains markdown,

I could change the message to "Format your messages with Markdown"? Anyway, HMU in #element-dev:matrix.org (happy to chat and explain) or the PR if you have any more questions :-)

@nunoperalta
Copy link

it just disables any and all Markdown you send.

Perfect! That's exactly what I'm looking for here :)
Thanks very much for that. This will be a life saver in many scenarios...

"Format your messages with Markdown"

This would likely clear any ambiguity! It would be better, in my opinion.

Thanks!

@SimonBrandner
Copy link

Related to #16304 (comment)

@dreaddr
Copy link

dreaddr commented May 19, 2021

Just add a toggle to switch between the two modes please as mentioned in element-hq/element-web#17401

@nunoperalta
Copy link

This, and "mark as unread", are currently the most important features my team are missing.
Not having these two functionalities is still causing daily inconveniences to us.

@RokeJulianLockhart
Copy link

RokeJulianLockhart commented Nov 8, 2021

This comment is response to http://github.com/vector-im/element-web/issues/483#issuecomment-844325462 and http://github.com/vector-im/element-web/issues/483#issuecomment-716231528.

"/plain" and "/html" are present, so this should be implemented as a toggle. Instead of that, it should be implemented as a combination-box when choosing the default.

@kilx
Copy link

kilx commented Dec 22, 2021

Don't care how it's done but please add the option of not screwing up the things I type. It's really really annoying if you have to type anything "technical".

Like even the simplest "+ 1" is rendered as a bullet point.

However if you try to edit it to put everything into a ``` block or something you'll discover it has been modified to be "- 1"!

Basically you can't trust Element to transmit/save what was actually typed. Horrible.

@ShadowJonathan
Copy link

@kilx you're collating multiple issues at once, the +1 thing is because commonmark (the markdown engine element uses) is interpreting those as bullet points, #330 deals with switching over to github-flavoured-commonmark, which'd help this issue.

The "transmit/save what was actually typed" bit is because element has to convert that markdown to HTML, another format which displays things easier, but then it is harder to extract the original bits and pieces of what's typed from that, because specific things such as "did this bullet point get made with a +, a *, or a -?" get lost in translation to HTML.

It's not nice all around, but its just the limits of the current system.

@kilx
Copy link

kilx commented Dec 22, 2021

Ok, it's always more complicated than it looks. However the "disable markdown, just let me use plain text" option would still solve all these issues from my point of view.

The "+ 1" was just the smallest example I could think of.

Thanks for replying!

@ShadowJonathan
Copy link

ShadowJonathan commented Dec 22, 2021

However the "disable markdown, just let me use plain text" option would still solve all these issues from my point of view.

Element iOS has this option, and I'm kinda surprised that element web doesn't as well.

While some likewise issues were closed as duplicates to this, i think that's an entirely seperate issue, let me open it.

Edit: created element-hq/element-web#20321

@kittykat kittykat added O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround X-Needs-Product More input needed from the Product team Z-WTF and removed P2 Help Wanted Extra attention is needed labels Jan 17, 2022
@niquewoodhouse
Copy link

There might be some ongoing work with the composer design that could impact the best way to show a UI for disabling md in the composer, so I'd rather not look at this specific interaction until its more clear what's happening with that work. For now, I believe element-hq/element-web#20321 is a good solution - I added a comment with a suggested design

@germain-gg
Copy link

@niquewoodhouse in that case should we close this issue in favour of element-hq/element-web#20321 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Composer O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Enhancement X-Needs-Design X-Needs-Product More input needed from the Product team Z-WTF
Projects
None yet
Development

Successfully merging a pull request may close this issue.