-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add plugin ui customisation options #3693
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
base: dev
Are you sure you want to change the base?
Conversation
function VencordChatBarButtons(props: ChatBarProps) { | ||
// FIXME: subscribing to all settings here is bad, but the settings api currently | ||
// only supports exact key subscriptions, which doesn't work for our use case | ||
const { chatBarButtons } = useSettings().uiElements; |
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.
TODO: we should probably fix this before merging to avoid unnecessary rerenders
|
||
// FIXME: subscribing to all settings here is bad, but the settings api currently | ||
// only supports exact key subscriptions, which doesn't work for our use case | ||
const { messagePopoverButtons } = useSettings().uiElements; |
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.
ditto
.filter(([key]) => messagePopoverButtons[key]?.enabled !== false) | ||
.map(([key, { render }]) => { | ||
try { | ||
// FIXME: this should use proper React to ensure hooks work |
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.
probably better done in a separate PR but still needs fixing in the future
Allows you to toggle plugin ChatBar and MessagePopover buttons.
We could also allow hiding stock Discord buttons in the future but that will require more code / patches
Screencast.From.2025-10-02.23-40-55.mp4