Vencord icon indicating copy to clipboard operation
Vencord copied to clipboard

Add name and displayName props to known modules

Open sadan4 opened this issue 10 months ago • 2 comments

This makes it wildly easier to find what you are looking for in react devtools

Before

image

After

image

*not all of those names are provided by this pr, only the ones used in vencord are

sadan4 avatar Feb 26 '25 07:02 sadan4

I feel like this would be the most useful to people who are new to working with discords code, as they wouldn't feel completely lost with all the minified names

sadan4 avatar Feb 26 '25 13:02 sadan4

this api is really weird. especially the option for findComponentLazy is misleading

Vendicated avatar Feb 26 '25 13:02 Vendicated

ready for review

sadan4 avatar Jun 09 '25 05:06 sadan4

this api is really weird. especially the option for findComponentLazy is misleading

all changes to discord's components are LazyComponent(() => x) -> LazyComponent(() => wrapDiscordComponentName(x, "Name")), which is also the change inside findComponentLazy, it'd make more sense if the argument was in LazyComponent no? and no need for an opts object in that case, I think

rniii avatar Aug 14 '25 04:08 rniii

in that case you also have a fallback for LazyComponent itself which doesn't need to pollute discord

rniii avatar Aug 14 '25 04:08 rniii