guardian/frontend — pull request #1697 by jamesgorrie (2013-09-23 16:17:02+00:00)
Title: Discussion comment recommend button

# Ability to recommend comments

We can now recommend!

## Notes
* We will be adding a better desktop experience soon.
* The RecommendComments has been done as a utility object (Singleton). There are multiple reasons for this:
** All events will be delegated. At the moment this is to the page context, but moving forward this will be through the discussion element. This will be done when the discussion module is refactored.
** If each recommend button was it's own object we'd land up with massive memory usage.
* We have not implemented any nonJS version. For now we are saying nonJS users do not get to write / create content. This does not mean we it will be inaccessible, but accessibility will be addressed when refactoring the discussion / comments.

## WHAT-TODOs
* The discussion modules needs refactoring. This includes the JS and HTML. Things like Scheme.org / general accessibility have not been added, and we will be moving away from the current design / IA so this seems a more fitting time to do this (and we need to ship this and posting post-haste)
* We'll be implementing the idea of components with the comment box. This will be refactored into that.
* Client side templating? Discussion will hold a lot of duplicate content on the server and client when posting etc. We could however implement a post end point that returns the rendered content (I like this idea as it fits with the current methodology, but then we do not work directly on the API and need a server side API).
* Conditional loading of JS: On mobile, as we are assuming that a lot of users might just read content, would we need to serve all the JS to be able to write content? There are multiple solutions here that could be discussed.

[Recommended!](http://rubmint.com/wp-content/plugins/wp-o-matic/cache/c894e_4171b2a2-ef34-4cad-a7e1-050136938b6c.gif)