bluesky-social / social-app

The Bluesky Social application for Web, iOS, and Android
https://bsky.app
MIT License
11.55k stars 1.47k forks source link

Add syntax highlighting to posts #5065

Open ocodista opened 2 months ago

ocodista commented 2 months ago

Is your feature request related to a problem? Please describe. No, just a lacking feature. Would love to have code blocks highlights on posts 😁

Describe the solution you'd like I would like to have formatted markdown on posts

Describe alternatives you've considered Code blocks, bold and italic would be a great start.

Additional context

kauefraga commented 2 months ago

I would like to see it too! Looks like there's a similar issue, #4750.

I am not very experienced with rendering markdown in React but react-remark seems to accomplish this task well. To highlight code blocks shikijs is interesting.

Also, I want to point that adding markdown support in a social media would require a WYSIWYG editor (or something similar) to be used by all users.

DanielHe4rt commented 2 months ago

If I remember well, rendering shiki in such a level can bring performance issues but it still can be done 😁

LukeberryPi commented 2 months ago

+1 this would be amazing

kauefraga commented 2 months ago

Paul Frazee wrote about this text formatting issue, "Why RichText facets in Bluesky", so I guess we won't get the markdown support. However, it would be really nice to have bold, italic and code blocks at least!

lokinmodar commented 2 months ago

Paul Frazee wrote about this text formatting issue, "Why RichText facets in Bluesky", so I guess we won't get the markdown support. However, it would be really nice to have bold, italic and syntax highlight at least!

This changes everything. There are valid reasons to not use it then. I agree with the linked post's arguments.

herbertcordeiro commented 2 months ago

+1 this would be amazing

Gubiar commented 2 months ago

+1 This feature will be awesome

fazedordecodigo commented 2 months ago

+1 This so cool!!

vitorxfs commented 2 months ago

Paul Frazee wrote about this text formatting issue, "Why RichText facets in Bluesky", so I guess we won't get the markdown support. However, it would be really nice to have bold, italic and code blocks at least!

Code blocks seem nice, but very limiting in 300 characteres. Maybe it would be nice to have a way of "attaching" code, the same way we attach pictures. It would not be limited by the 300 characters, and it would be more accessible than a screenshot.

nicolasmelo1 commented 2 months ago

I think that it should be a code snippet, the same way that slack does.

In a sense, it's just attaching a file to a post (on a different format from a video or a photo). I don't know how files work inside of Bluesky, but i think it would be the easiest implementation.

And the character limit wouldn't be an issue