Open jewel-andraia opened 5 years ago
Hello. I am a beginner. Can I try to fix this issue?
Hi @codevenkat! Here's a high-level overview:
Since this is your first RES project, before you dive into the code, follow the instructions in CONTRIBUTING.md to get a dev build of RES running in your browser.
For this project, you'll be working in the "Vote Enhancements" module. There's already functionality in there to add little dots of color on comments corresponding to the score. I'm hoping to see those dots added to posts and comments in new.reddit.com.
RES has a helper function for "do stuff when a post element is loaded in the redesign": watchForEvent("post", function(container, data) { / do stuff / }) . In that callback function, you can add new elements to the container. data
contains metadata about the post or comment, including score.
Small gotcha: that callback can be called multiple times for the same post/comment. You can account for this by querying for an existing color dot inside the container and, if it exists, update it instead of adding a new dot.
@codevenkat have you made any progress on the issue? @andytuba I will be taking a crack at this
probably easiest to add these UI elements into the post/comment tools jsapi container