Vencord icon indicating copy to clipboard operation
Vencord copied to clipboard

[Plugin] Drag favorite emotes

Open pwall2222 opened this issue 1 year ago • 13 comments

pwall2222 avatar Jun 06 '24 20:06 pwall2222

i will test this later; this could be very useful

Sqaaakoi avatar Jun 06 '24 20:06 Sqaaakoi

Okay so right now it's very very very WIP, (although 90% of functionality is there)

But in the update function, it basically is hard coded to make 1 real drag (by setting a global flag). Right now that's with the purpose of debugging, because if you modify the emoji order, for some reason the drag data doesn't update, so when you try to do a second drag it references the old data.

(You can test this by putting a log-point/console.log/breakpoint in the drop function, and seeing that source and target are the ones that were there before the change)

(It was memoization, fuck react)

pwall2222 avatar Jun 06 '24 20:06 pwall2222

Please also make sure to run eslint in your project so your formatting matches the rest of the repo

MrDiamondDog avatar Jun 06 '24 20:06 MrDiamondDog

All the functionality works now, purged all the bugs (maybe I actually need to return something to FrecencyUserSettingsActionCreators but unsure).

The thing is I am not familiar how to create patches and I know I have a few hardcoded variables, like the Y to get target emote, I'll try to fix it as best I can.

Editable PR Also I can't make the PR editable, because I have an organization for my forks

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork

pwall2222 avatar Jun 06 '24 21:06 pwall2222

Okay, I have made the best effort to get a better find and to replace all hard coded variables.

pwall2222 avatar Jun 06 '24 21:06 pwall2222

this will be the best plugin of all time

byeoon avatar Jun 06 '24 22:06 byeoon

In my eyes, all is done, the only improvements you could make is make the drag item, be only the emote, but for native emojis, it's a pain. Although it is fairly easy for custom emotes with getEmojiURL.

pwall2222 avatar Jun 07 '24 00:06 pwall2222

force pushing kinda horror it'll get squashed into 1 commit later

Sqaaakoi avatar Jun 09 '24 06:06 Sqaaakoi

force pushing kinda horror it'll get squashed into 1 commit later

Half the force pushes, are rebases.

pwall2222 avatar Jun 09 '24 08:06 pwall2222

Heads up; over the past week I've noticed that this plugin causes Discord to crash whenever you type text into the "add reaction" emoji picker; the React error message is "Rendered fewer hooks than expected. This may be caused by an accidental early return statement."

Sqaaakoi avatar Jun 17 '24 18:06 Sqaaakoi

hi, are you still interested in continuing this pr? if not, do you mind if I finish it? I really like the idea and want to see it merged.

sadan4 avatar Sep 20 '24 19:09 sadan4

hi, are you still interested in continuing this pr? if not, do you mind if I finish it? I really like the idea and want to see it merged.

Is there something to finish? Did it break? When I left it was pretty much done as far as I remember.

pwall2222 avatar Sep 21 '24 00:09 pwall2222

it broke a bit

sadan4 avatar Sep 21 '24 00:09 sadan4