Closed BenGamma closed 5 years ago
ah cool, I had mentioned this in #209 but see it's covered here. Given the fairly general target audience I agree the most important thing is a simple set of buttons users can use instead of writing code.
I just took a look at react-mde and it says the repo is undergoing breaking changes. I imagine draft receives much better support and is more stable, so unless we have specific reason to prefer markdown over html (assuming the user won't be writing code in either case) then I would suggest just go for draft.
@tx4x markdown would be nice yes. Do you have any recommandations on a markdown library we could use ? Cherries on the cake would be a working example component 😍
React Draft Wysiwyg sound like a strong candidate. Thanks for sharing 🖖
Yes we'll probably need some custom integration at some point, thanks for asking 👍
For now what would be nice to have is a working example of React Draft Wysiwyg integrated in the project.
If you want to go further I suggest you create a branch from master
and from there create a working example on a new url (for example if I visit /discussions/post/<slug>
, the editor is displayed and we can console.log the submited data)
I personally much prefer writing things in in markdown, so if we expect people to be writing in a code format it makes a lot more sense (anyone who prefers html can still write it in markdown).
I think most users will be looking at using premade buttons however so I the number one priority has to be an editor that a) is easy to customise and b) integrates well with react.
Point a) might seem moot as at this stage pretty much all editors give you control over which buttons can be seen or hidden, however I'm thinking more ability to add custom buttons and bind to events (e.g. when the user drag/drops on to the editor). Not that we would want to do too much initially, but I think it makes sense to keep options for the future if we wanted to integrate custom web-components or functions on the rest of our db/services.
Point b) is probably less of an issue as building a wrapper really isn't a huge deal (easy enough to query the dom element and get the value from it if not already bound to the state), however if we can avoid doing this I'd definitely be in favour.
Draft looks like it should do what we want. Another I'm using a lot at the moment is quill, however by their own admission the only real benefits are for people not using react (https://quilljs.com/guides/comparison-with-other-rich-text-editors/). I particularly like that it stores info in json format to convert to either html or markdown (everyone's a winner!)
I'd be really interested to hear what features you think we need in the editor @tx4x
Good point about referencing quoting other messages, I hadn't thought about that... There will also be things like @mentions to think about. We will need to talk with @mattia-io to better decide how we want the users to interact before taking the dev too far (e.g. would messages all be displayed in a list, nested chats, seperate threads, quotes etc.)... I'm assuming the answer will vary for our different use cases.
For the first implementation I think the backend is mostly just a set of fields within the database (firestore) entry. We would later want to build apis on top of this, cloud functions already has the functionality to observe database changes (e.g. new comment added with fields x,y,z), and then we could look into building various microservices like email/push notifications etc. I think we're currently planning to implement Algolia for search.
Dream on. Anything is possible.
Hey everyone, thanks for all the inputs. It's now officially in my list to be discussed with Dave and UX. Will update soon on this.
@chrismclarke in regards to user interaction we have 3 posting types:
How-to: Author posts the How-To with all the different steps (no comments on individual steps). Users and the author can comment below the How-To and nested reply to comments.
Discussion Author posts the topic/discussion. Users and the author can comment back and forth and nested reply to comments.
Q&A Author posts the question. Users can comment their answers below (author cannot post answers). Users and author can nested reply to comment. Author can choose an answer to be the correct one.
Hope this clarifies it a bit. Let me know if still unclear.
Awesome, Crystal (ish). Brief follow-up:
Hey yo,
Peace 👀
It will definitely want to be its own standalone component to be implemented across at least 3 or 4 different places (ideally want to remain fairly flexible).
Custom tags could come through without any extra work if we build the custom components as webcomponents, otherwise yes I'd expect either to work with their existing extension system (haven't tried myself), or take a fork (less preferred but still possibility). Will be interested to see how showdown gets on
My initial thought would be that at the database level we would have very minimal nesting, most comments would sit as siblings with a single 'parent' or 'repliesTo' field to reference parent conversation if it is a response. A nested structure would be built once imported (so every comment could have a 'children' or 'replies' field which would hold more comments), and we would have _created and _modified properties which could be used to sort by date
Good luck with the implementation and thanks!
Could you explain a bit more what you mean by the experience sucks so we can know what your thoughts expectations are, and help decide also what the mvp for the community should include (separate out 'must haves' and 'nice-to-haves'). From the screenshot it looks like a pretty standard editor...
Really useful, thanks a lot! @mattia-io , you might also want to take a look and add your input.
From my side I would have the following points:
Hey all,
@tx4x big up on all the research and summary, helps a lot 👍
First of all I'd like to maybe clarify in which instances the text editor would be used:
Commenting on the table @tx4x nicely created my feedback pretty much agrees with @chrismclarke in all comments. Few addition:
Nice one, let me know if you need more inputs from me.
Even if there aren't buttons most editors will recognise any html/markdown typed in them directly (hence the giant text above), so for the most part whatever editor you are typing into you could always just use another and copy/paste the result if it doesn't give quick access to all the features you want.
This no longer applies if you're trying to do things outside of basic text blocks like images, mentions etc. so these are the things you ideally want to make sure you get right in your own editor. Although in the case of images (cropping, resizing, filters etc.) people can always of course do the heavy lifting outside too and just bring the final product in. I imagine people will always want all options, but would be pretty quick to adapt to whatever subset we offer.
Sounds like a plan, will be interest to see what TinyMCE can offer (took a look at ck editor and their pricing is insane!). I see they have a wrapper for react already too: https://www.tiny.cloud/docs/integrations/react/
The api endpoints shouldn't be too difficult, will be happy to help with them once we have the core in place (probably makes sense to initially work with some mock data to see what type of format is easiest to work with).
Agreed on the title and searching, but all that is independent of the editor. As mentioned above in this thread we plan to use algolia which will have good ways to handle this.
also keep the code for draft so we can keep a comparison of the two. I definitely would be too quick to discount it, it's still a popular library: [edit, figures wouldn't take into account people just using hosted solutions, so should read more popular for people that want to create their own editor] https://www.npmtrends.com/draft-js-vs-react-tinymce-vs-tinymce-vs-tinymce-react https://js.libhunt.com/compare-tinymce-vs-draft-js Remember that the editor itself should be the easy part, the potentially more challenging will be adding the customisations we want, which could swing things either way.
thanks for the update. Assuming we get this in this week I think we can start some user testing at the workspace on Friday and pass any feedback along following. Most of the users here are unlikely to care as much about the advanced editing, but may have some useful comments more generally.
I think this has been a really good conversation, tinymce is now integrated and working well so will close
Nice one. Thank you @tx4x 👊
i dont think we are ready to implement markdown or rich editors. yet. It's easy to implement but hard to implement properly. Opens up to many possibilities and options to mess up the layout and create a mess. Needs more thinking.
I really like markdown and am much more efficient with it, although at this stage I don't think it would have much use as we are literally only using plain text inputs + image uploads in the platform to keep a very consistent style for all posts. The academy site is all markdown though.
The purpose of this thread is to share opinions on this feature and found the best solution available out there to make it.
We want the user to be able to comment using markdown or an editor, like this github comment form, to make the font bold or italic, create points, title, add citations, links.
What I know :
The goal here is to test to implement these solutions in our current code base and see which one fits the best for our needs 💯