zulip/static
Steve Howell f59cca2dcd reactions: Rewrite code to use clean reactions.
Before this commit, the reactions code would
take the `message.reactions` structure from
the server and try to "collapse" all the reactions
for the same users into the same reactions,
but with each reaction having a list of user_ids.
It was a strangely denormalized structure that
was awkward to work with, and it made it really
hard to reason about whether the data was in
the original structure that the server sent or
the modified structure.

Now we use a cleaner, normalized Map to keep
each reaction (i.e. one per emoji), and we
write that to `message.clean_reactions`.

The `clean_reactions` structure is now the
authoritatize source for all reaction-related
operations.  As soon as you try to do anything
with reactions, we build the `clean_reactions`
data on the fly from the server data.

In particular, when we process events, we just
directly manipulate the `clean_reactions` data,
which is much easier to work with, since it's
a Map and doesn't duplicate any data.

This rewrite should avoid some obscure bugs.

I use `r` as shorthand for the clean reaction
structures, so as not to confuse it with
data from the server's message.reactions.

It also avoids some confusion where we use
`reaction` as a var name for the reaction
elements.
2020-03-23 17:30:18 -04:00
..
assets styles: Finish removing manual antialiasing configuration. 2019-08-30 14:51:52 -07:00
audio
generated
html 5xx.html: Build with webpack. 2019-10-28 15:53:15 -07:00
images portico: Update google play and app store badges. 2020-03-06 12:12:02 -08:00
js reactions: Rewrite code to use clean reactions. 2020-03-23 17:30:18 -04:00
shared typeahead: Convert to ES6 module. 2020-02-19 14:36:42 -08:00
styles css: Change emoji size within text to 20x20px. 2020-03-22 15:09:49 -07:00
templates ui: replace all mute icons from eye/eye-slash with bell/bell-slash. 2020-03-22 12:31:48 -07:00
third markdown: Fix HTML escaping of &. 2020-02-13 17:50:59 -08:00
.eslintrc.json lint: Delegate console.log check to ESLint. 2020-02-07 14:09:47 -08:00
.gitignore emoji: Resolve emoji sprite sheets and stylesheets through Webpack. 2020-02-25 14:43:46 -08:00
favicon.ico