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

Basic text formatting to chat #1027

Closed
6 of 7 tasks
theel0ja opened this issue Jul 9, 2018 · 75 comments
Closed
6 of 7 tasks

Basic text formatting to chat #1027

theel0ja opened this issue Jul 9, 2018 · 75 comments

Comments

@theel0ja
Copy link

theel0ja commented Jul 9, 2018

I would like to have at least basic text formatting for chat, such as

  • Basic text formatting, such as
    bold, italic and strikethrough
  • and code tags like this:
    console.log("Hello!");
  • and multi-line code this:
<html>
  <head></head>
  <body></body>
</html>


Spreed app

Spreed app version: Talk 3.2.2

Server configuration

Nextcloud Version: 1.0.4

@theel0ja theel0ja changed the title Basic text formatting Basic text formatting to chat Jul 9, 2018
@nickvergessen nickvergessen added enhancement feature: chat 💬 Chat and system messages labels Jul 9, 2018
@nickvergessen
Copy link
Member

I think most other things have bold and italic, so that's okay.
Not sure about code tags thou. THat will cause big trouble when we integrate with other services.

@nickvergessen
Copy link
Member

nickvergessen commented Jul 19, 2018

Checked the messengers which I use:

IM bold italic striked code
Whatsapp * _ ~ ```
Threema * _ ~ ✖️
Telegram ** _ _ ✖️ ```
Signal ✅ (WYSIWYG) ✅ (WYSIWYG) ✅ (WYSIWYG) ✅ (WYSIWYG)

@nickvergessen
Copy link
Member

Survey: Should we support * as bold?

@nickvergessen
Copy link
Member

Survey: Should we support _ as italic?

@nickvergessen
Copy link
Member

Survey: Should we support ~ as striked?

@nickvergessen
Copy link
Member

Survey: Should we support ``` as code?

@fancycode
Copy link
Member

Survey: Should we support ``` as code?

Backticks are bad on a German keyboard layout, but they are also consistent with markdown.

@mario
Copy link
Contributor

mario commented Jul 30, 2018

Why not add a full markdown support while we're at it? :)

@nickvergessen
Copy link
Member

Why not add a full markdown support while we're at it? :)

Because at somepoint we would like to integrate with other services (see https://github.com/nextcloud/spreed/labels/feature%3A%20integration ) which is highly difficult then

@tcitworld
Copy link
Member

tcitworld commented Jul 30, 2018

integrate with other services which is highly difficult then

Converting Markdown content into plain text shouldn't be that hard, no ?

@theel0ja
Copy link
Author

I'd add most stuff, but for example not headings because they aren't needed in chats.

@nickvergessen
Copy link
Member

Well as for markdown, apart from the things in the poll the following are missing:

  • url - but you can post plain urls, which are still made clickable, you can just not mask them
  • images - we will allow posting images in another way (similar to how all other IMs do it.
  • lists - do you really need lists in chat messages?
  • headlines - see lists

@fancycode
Copy link
Member

I think you can skip lists and headlines. If people want to write documents, they should not use the chat but some editor app 🙊

@jospoortvliet
Copy link
Member

Lists do make sense, though, I use it also in chat... But certainly bold, underline, strike-through and code are much more important. Headlines do seem weird yes.

@ryanprior
Copy link

With regard to #1027 (comment) (suggestion for full Markdown support)

I don't like the idea of having people post links (including potentially misleading ones,) images, or headlines to chat.

Syntax compatibility with markdown might be the most appropriate, but "full Markdown" seems like an own goal.

@ryanprior
Copy link

Also, info for @nickvergessen & others who prioritize issues: this is one of the major blockers keeping me from using Nextcloud Chat. I frequently post code & read other people's code in chat, and need it to be formatted nicely.

I would be interested in working on this issue if it's something you would like outside help on.

@lachmanfrantisek
Copy link

What about some quote/citation?

> used in markdown would be useful for that:

Example:

> something

something

@nickvergessen
Copy link
Member

I would be interested in working on this issue if it's something you would like outside help on.

No objection at all. Everything that is not actively being worked on can be picked up. The main issue I see is:

  1. This needs to also work on iOS/Android
  2. It should be mostly done in the UI so third party integration works as good as possible
  3. There is a difference between markdown and all other chat clients how to do bold/italic
  4. The next thing on our todo is to bring the UI to VueJS ( Migrating to Vue.JS #1347) and that might heavily conflict with any work being done, because we are basically redoing the UI.

@ryanprior
Copy link

How is the Android/iOS app built right now? I've never done mobile app development so I'm pretty ignorant of that side of things.

As far as building it into the UI and making it Vue proof, we might build it as an embedded Vue component right away without waiting for the rest of the UI to be re-done. My understanding is that Vue components can play well next to other things and it's not all-or-nothing.

@AndyScherzinger
Copy link
Member

AndyScherzinger commented Jul 6, 2023

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

@jancborchardt
Copy link
Member

jancborchardt commented Jul 11, 2023

Yep:

  • People familiar with Markdown or who use text for formatting will appreciate the same syntax being used (that is, standard Markdown)
  • 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.

@nickvergessen
Copy link
Member

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.

@szaimen
Copy link
Contributor

szaimen commented Jul 19, 2023

Hi, so I created the following mockup:

Image

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?

@ShGKme
Copy link
Contributor

ShGKme commented Jul 19, 2023

It's a bit unclear to me, how "remove formatting" is supposed to work

@nickvergessen
Copy link
Member

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)

@nickvergessen
Copy link
Member

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.

@szaimen
Copy link
Contributor

szaimen commented Jul 19, 2023

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?

@szaimen
Copy link
Contributor

szaimen commented Jul 19, 2023

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:
Board (12)

cc @nextcloud/designers wdyt?

@AndyScherzinger
Copy link
Member

@szaimen no underline since that is not supported by markdown (!)

@nickvergessen
Copy link
Member

nickvergessen commented Jul 19, 2023

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

@szaimen
Copy link
Contributor

szaimen commented Jul 19, 2023

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:
Board (13)

@nickvergessen
Copy link
Member

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.

@AndyScherzinger
Copy link
Member

AndyScherzinger commented Jul 19, 2023

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.

@marcoambrosini

This comment was marked as off-topic.

@nickvergessen

This comment was marked as off-topic.

@nickvergessen
Copy link
Member

Closing as the base work is done 🎉

@omoustaouda
Copy link

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.

@nickvergessen
Copy link
Member

Current status is "Completed, Markdown works"

@Antreesy Antreesy modified the milestones: 💔 Backlog, v17.1.0-rc.1 Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Archived in project
Development

No branches or pull requests