-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reactions: Convert module to typescript #28375
Conversation
d69d878
to
8a4a240
Compare
8a4a240
to
fe94da2
Compare
Okay looking at this more closely, it seems to me that It’s converted here: Lines 74 to 76 in 9fde83c
zulip/zerver/models/realm_emoji.py Lines 88 to 95 in 9fde83c
zulip/zerver/lib/import_realm.py Lines 548 to 549 in 9fde83c
|
fe94da2
to
50ef8bb
Compare
More details here: zulip#28375 (comment)
50ef8bb
to
940e628
Compare
940e628
to
87bca1b
Compare
More details here: zulip#28375 (comment)
87bca1b
to
27fc271
Compare
More details here: zulip#28375 (comment)
27fc271
to
c4c7862
Compare
I haven't tried to analyze, but I want to be very cautious about changes in when we do If I recall correctly, the short of the issues there were things like that the previous code could do quadratic work (by computing the vote text summing up everyone's reactions for each reaction in the main loop over the reactions in a given message). Can you familiarize yourself with that and comment on the safety of these changes? It might be fine now, but I just want to make sure we're being careful here. |
@timabbott the PR you're linking to seems like it's only backend changes, and I'm having trouble seeing how it's related. Did you link to the wrong thing maybe? |
More details here: zulip#28375 (comment)
c4c7862
to
1541f7d
Compare
Pulled the less caution-needing prep commits to #28734 |
1541f7d
to
6ccd54a
Compare
I haven't seen what the issue was before yet, so I might be missing something, but I added some comments about why I don't think these changes make things quadratic. Let me know if you want further clarification/explanation! |
More details here: #28375 (comment)
6ccd54a
to
f1aaf99
Compare
f1aaf99
to
34799cc
Compare
@timabbott / @andersk ready for you to take a look :) |
34799cc
to
31ed0c4
Compare
@timabbott just making sure you saw this was ready |
More details here: zulip#28375 (comment)
When we move to typescript, we want to be able to calculate this value *before* creating the clean reactions, so that we can generate the clean reactions in one go instead of having some half-created object.
This is essential for converting to typescript, because we can't create half a clean reaction and then calculate vote_text afterwards. Instead, we should calculate it with the information we already have, and create the clean reaction object afterwards, all at once.
31ed0c4
to
68eefae
Compare
This looks like a correct conversion, so I think this is good to merge; going to do that without asking for revisions for the above, because it was a slog to read through and none of the issues above have functional impact. But I would appreciate a follow-up PR this week addressing them. Thanks @evykassirer! This definitely wasn't an easy one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made a followup PR: #29199
Split this into several commits since there was a lot going on.
reactions: Calculate vote_text before creating clean reaction. commit feels a bit messy but wasn't sure if there was a nicer way to do that. Would love feedback there