Commit Graph

22 Commits

Author SHA1 Message Date
Machine Learning
4d27bbebad Add experimental machine learning 2021-08-16 16:31:04 +02:00
Javi Martín
c3e0a6b089 Remove duplication rendering comments
We were using the same code 5 times, with the only slight variation
being the extra heading in the debates section.
2021-06-27 23:22:00 +02:00
Javi Martín
ae41becd3a Use CSS to hide reply forms
We were using inline styles and passing local variables around, while
the rule we were following is very simple: it's only hidden if it's a
form to reply to a comment.
2020-05-12 23:57:57 +02:00
Javi Martín
4627372a62 Use a <ul> tag for a list of comments
We were using a <ul> tag for a single comment, where the first element
of the list was the comment itself and the second element was the list
of replies.

IMHO it makes more sense to have a list of all comments, where every
element is a comment and inside it there's a list of replies.

We're also rendering the list even if it has no children so it's easier
to add comments through JavaScript. Then we use the :empty CSS selector
to hide the list if it's empty. However, since ERB adds whitespace if we
structure our code the usual way and current browsers don't recognize
elements with whitespace as empty, we have to use the `tag` helper so no
whitespace is added.
2020-05-12 23:57:16 +02:00
Javi Martín
573f861ad1 Don't use comment_flags to cache comments
Flagging a comment automatically updates the comment, so the cache
expires anyway, making the `comment_flags` variable redundant.
2020-05-11 16:09:23 +02:00
Javi Martín
f5d8badeb6 Extract partial to show "login to comment" message 2019-10-05 14:07:24 +02:00
Javi Martín
ae64458fce Use the same I18n key for "login to comment" text
We were using several different keys, all of them having the same
translations.
2019-10-05 14:07:23 +02:00
Javi Martín
f9ed186909 Add rubocop spacing rules
We were following these rules in most places; we just didn't define them
anywhere.
2019-09-10 21:04:56 +02:00
Javi Martín
c62da726b8 Apply SpaceAroundErbTag ERB Lint rule 2019-09-10 20:02:15 +02:00
Julian Herrero
7fe6285fe3 Use double quotes in app/views/proposals 2019-03-19 12:16:50 +01:00
Alberto Garcia Cabeza
76a3c61020 improves html structure for comments on debates and proposals 2016-12-19 13:43:09 +01:00
Alberto Garcia Cabeza
dd7629b5af Adds notification menu and message for empty notifications 2016-06-15 21:00:56 +02:00
Alberto Garcia Cabeza
84f9dcaa76 Adds tabs for notifications on proposal show 2016-06-06 17:26:48 +02:00
Juanjo Bazán
63e8950d6c adds scopes for feasible values to spending props 2016-03-29 13:36:40 +02:00
Alberto Garcia Cabeza
3752f3a53b Adds foundation 6 🎉 2016-02-26 19:33:33 +01:00
kikito
60b3c65b05 Refactor comment tree calculation using a PORO 2015-10-30 17:00:32 +01:00
kikito
bfd89ed15a Adds current order to the comments cache in proposals and debates 2015-10-29 17:36:50 +01:00
kikito
e4bfc72649 Refactors design of comments order selector into a partial with i18n 2015-10-28 15:48:48 +01:00
Alberto Garcia Cabeza
82eb0bd902 Adds comments filter for debates and proposals 2015-10-28 13:28:37 +01:00
Sergio Arbeo
12ec1fe6f6 Update comments count when commenting on a debate or proposal 2015-10-27 01:02:39 +01:00
Juanjo Bazán
a0978c7040 adds cache to proposal comments 2015-09-14 17:14:46 +02:00
rgarcia
f2b917d486 adds proposal show 2015-09-12 12:30:20 +02:00