I have a programming question related to a new feature that I am building on a theme component. I prepared a short video to demonstrate what I already have and where I am blocked.
Here is a short description though:
I want people to be able to “like” specific text inside posts (also other peoples’ posts) - not just the entire post.
Once a user selects a text, he clicks a new icon which in turn wraps the selected text with the [warp] block, which I then use to style.
The wrapping happens by modifying the raw text - which poses a problem for non-admin users who cant modify other people’s posts.
- I am looking for a way to save my “meta information” on the model itself.
- I am looking for a way to modify/decorate the text in a way that every user can do it.
Thanks for your help
like you i’m really interested in this feature. It helps us get community input in selecting/quoting good and valuable content to host for ourselves or create a publicly shared directory.
I actually got this implemented in a more secure way, also using a theme component.
Give people the ability to like content inside a post, not just the post itself, e.g. people should be able to express that they like a picture specifically or text passages.
Since we are on a theme component I needed to find a way to save the meta information about such a “user like” somewhere, because apparently, only real plugins can modify the database. My initial approach was to edit the raw text of the post but this ended up being really messy since we were modifying users’ posts which we didn’t want.
The solution I ended up with was using Firebase Firestore to save things.
Users can now “heart” thumbs, and texts inside LI elements and Ps.
I am planning on making this available as a theme component but the data storage part has to be handled by the developers themselves if they want to host the data elsewhere.
If people give enough likes I will push this out soon
This feature could be useful for very large posts where some parts stand out more than others.
By the way, if there are multiple likes, could the 25% most liked be shown so that it is clearer? It may look very messy with lots of red lines of text all over the place.
Sure thing, we can build whatever we want What do you mean with the most 25% percent?
Posts that are liked higher than the third quartile (the highest 25 percent.)
Please, release this feature soon!
I love the highlight feature on medium and now i wish it could appear in the discourse. because sometimes we will want to express our feelings on a piece of text and save it so we can review it as a bookmark feature (but currently can only bookmark the entire article)
Hello, we have it workng stable now. Need to to code cleanup and provide a community ready version.
Perception of this is really amazing, people love it.
Will keep you posted! I hope to provide something this week.
This seems to be impressive work. I’d love to have a look at the code (and probably understand 30%) when it’s released.
Amaziiing! I’m anxious to see it working. Thanks!
Hey, guys! I had a similar idea, as I explain in this post. Do you have any news on it, @Sören_Geier?
These past few days I started considering it would be nice if, besides liking a specific part of a text, parts that were quoted had some sort of link list to every answer given to it – if you quoted this word, it’d be highlighted in the original text and, when anyone clicked this highlight they would get a preview of how many answers quoted it, whose they are etc. It’d be a nice way of understanding the depth of specific parts of a discussion.
I don’t know if my idea is clear enough haha but I imagine it would work in a similar manner as this like feature and have the same data storage issue.