Closed theel0ja closed 1 year ago
I just noticed that if you press CTRL+B, CTRL-U or CTRL+I in the chat box, the text changes its formatting to bold, underlined or italics, WYSIWYG-like. When you send it, it turns into plain HTML though...
This turns into this
Is that a browser thing (Chrome) or baked into Talk? Doesn't seem to work in Firefox (triggers browser functions)...
The nice thing about Markdown, is that the syntax is also formatting, so it is readable and understandable, whether rendered into styles or not.
Is that a browser thing (Chrome) or baked into Talk?
This is a browser thing of contenteditable.
Is this still underway?
Yes, we just talked about it again last week and discussed necessary steps and possible intermediate steps.
So NcRichText supports markdown, but similarly to GitHub it seems to use the double vs. single logic:
Input | Result |
---|---|
__bold__ |
bold |
**bold** |
bold |
_italic_ |
italic |
*italic* |
italic |
That however is not how telegram, whatsapp or any other handle them: https://github.com/nextcloud/spreed/issues/1027#issuecomment-406226961
So NcRichText supports markdown, but similarly to GitHub it seems to use the double vs. single logic:
That is also the logic markwon applies (markdown lib we use in files/talk Android), so I vote to go with the (more or less) standard markdown spec - anythign else will be a pain to implement - on Android at least
Yep:
For people not familiar with it we need a popover with formatting buttons when text is marked for example (like other apps do), and then the syntax does not matter.
I think the biggest issue is people on phones that use it in e.g. WhatApp, Telegram, etc. But yeah also there we might want to add "long press" options or something.
Hi, so I created the following mockup:
When selecting the formatting, markdown syntax should be used to directly add characters around the marked text and adjust the look of it.
I hope this looks fine to you. Do you have some feedback?
It's a bit unclear to me, how "remove formatting" is supposed to work
That would be on rightclick? But that is something the vue library should handle anyway, so that when an app uses the input component it can say "yes markdown please" (like NcRichText afterwards for the posted messages already does for the post rendering)
It's a bit unclear to me, how "remove formatting" is supposed to work
I guess that only would be available work, when the same style-marker (e.g. **
in the screenshot) is to the left and right of the selection. But I agree that the removing thing looks very complicated.
That would be on rightclick?
I would say it should rather be shown directly as soon as you select some text. (e.g. after the mouse click is done and text was selected)
But that is something the vue library should handle anyway, so that when an app uses the input component it can say "yes markdown please" (like NcRichText afterwards for the posted messages already does for the post rendering)
indeed. So should we transfer the ticket to the vue library?
It's a bit unclear to me, how "remove formatting" is supposed to work
I guess that only would be available work, when the same style-marker (e.g.
**
in the screenshot) is to the left and right of the selection. But I agree that the removing thing looks very complicated.
Indeed that looks complicated. So lets for now not offer this.
New mockup:
cc @nextcloud/designers wdyt?
@szaimen no underline since that is not supported by markdown (!)
So should we transfer the ticket to the vue library?
No, because this ticket is for Talk, to handle the output result, notifications and everything else. But feel free to create a new one there
PS I actually never thought of UI options to insert markdown in first place
PS I actually never thought of UI options to insert markdown in first place
I was asked to create a mockup for this ticket so that is what I did. If we dont need this then I am fine as well. Do we simply need a decision on the syntax to use or what is needed from design perspective?
@szaimen no underline since that is not supported by markdown (!)
All right. New one:
I was asked to create a mockup for this ticket so that is what I did. If we dont need this then I am fine as well.
I guess it's fine. but as mentioned just not the right place and a different work task. I will split the last mockup off into a new ticket inside the vue lib (with all relevant comment parts) and add it to the overview section of this ticket.
Do we simply need a decision on the syntax to use or what is needed from design perspective?
Syntax is Markdown. Nothing to discuss there.
Afaik @jancborchardt mentioned such a helper function to add Markdown to the Editor field during the planning call. Nevertheless it is not mandatory for the first iteration of the feature but a nice polishing to put on top, so should come last.
I think that the menu upon selecting the text would be useful, but I would prefer to have a buttons bar with just the icons in line, just like in Nextcloud text's top-bar. I think it would be much less obtrusive.
@marcoambrosini please keep the frontend discussion in https://github.com/nextcloud/nextcloud-vue/issues/4355
Closing as the base work is done 🎉
well done to everyone involved here : ) i appreciate very much.
i needed this feature, and was searching about its current status.
i'm a software developer, and happy to contribute if needed, just need a little overview about the current state.
Current status is "Completed, Markdown works"
I would like to have at least basic text formatting for chat, such as
strikethroughconsole.log("Hello!");
Spreed app
Spreed app version: Talk 3.2.2
Server configuration
Nextcloud Version: 1.0.4