Skip to content

Conversation

Vendicated
Copy link
Owner

@Vendicated Vendicated commented Sep 30, 2025

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

image
Screencast.From.2025-10-02.23-40-55.mp4

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;
Copy link
Owner Author

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;
Copy link
Owner Author

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
Copy link
Owner Author

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

@Vendicated Vendicated changed the title [WP] add plugin ui customisation options Add plugin ui customisation options Oct 2, 2025
@Vendicated Vendicated marked this pull request as ready for review October 2, 2025 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant