Vencord icon indicating copy to clipboard operation
Vencord copied to clipboard

[Plugin] NotesSearcher

Open vishnyanetchereshnya opened this issue 1 year ago • 6 comments

Allows you to open modal with all of your notes and search throught them by UserID, Note text and Global/Username if user is cached Discord_S1PuI7Rhym

vishnyanetchereshnya avatar Jun 20 '24 20:06 vishnyanetchereshnya

Why not just rename the pr?

Scyye avatar Jun 20 '24 20:06 Scyye

Why not just rename the pr?

feels like creating new pr is more correct ¯_(ツ)_/¯

vishnyanetchereshnya avatar Jun 20 '24 20:06 vishnyanetchereshnya

This plugin is pretty messy, especially the NotesDataModal.tsx file. I would split a lot of this file into different files

👍

vishnyanetchereshnya avatar Jun 21 '24 00:06 vishnyanetchereshnya

thanks for your contribution!

without having actually read the code, this plugin seems somewhat overengineered. so much code and 300 lines of css for what's basically just a simple request + array map render seems unreasonable

try to reduce the amount of code, prefer using discord components wherever possible

also like dolfies said, the user fetching stuff should not be exposed to the user at all. and doing it via RestAPI is api abuse, prefer using the gateway. Vencord might add a util soon that allows you to do this more easily

Vendicated avatar Jun 21 '24 03:06 Vendicated

thanks for your contribution!

without having actually read the code, this plugin seems somewhat overengineered. so much code and 300 lines of css for what's basically just a simple request + array map render seems unreasonable

try to reduce the amount of code, prefer using discord components wherever possible

also like dolfies said, the user fetching stuff should not be exposed to the user at all. and doing it via RestAPI is api abuse, prefer using the gateway. Vencord might add a util soon that allows you to do this more easily

I fully removed RestAPI from users caching and replaced it by gateway but I'm still using first one (UserUtils.getUser) if didn't have user in cache btw have an idea to remove cache menu at all and just cache all users on startup + remove UserUtils.getUser, if user anyway didn't cached then I'll just render Unable to load. in addition it will reduce amount of code/css

about overengineered I'm agree with you, just love to create functionality things. and yea, I'm trying to use Discord components where possible

vishnyanetchereshnya avatar Jun 21 '24 10:06 vishnyanetchereshnya

@Vendicated the way of caching of users is refactored and .css reduced, hope now fine about it

vishnyanetchereshnya avatar Jun 24 '24 19:06 vishnyanetchereshnya