Skip to content
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

feat(plugin): SwitchProfileButton #3137

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Sqaaakoi
Copy link
Contributor

Moves the View Main/Server Profile button out of the overflow menu

Screenshot of the View Main Profile button

Some code was copied from ReviewDB

How it works:
Replaces the MenuItem components with the button, props are reused as-is by the button component
Moves the item out of the overflow menu component props and into the row of buttons

Suggestions for a different icon are welcome

@Sqaaakoi Sqaaakoi changed the title Switch profile button feat(plugin): SwitchProfileButton Jan 11, 2025
@RedCrafter07
Copy link

Hey there, I love the idea!
What about a server icon? I think Discord has one, but don't quote me on that

variant="text-xs/medium"
>{props.subtext}</Text>
</>}
aria-label={false}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wha?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is how Discord does it for the other buttons there. I am aware that ReviewDB does not do it this way.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went digging again to find where I took this code from and it looks like I stole it from this component, and it turns out I didn't steal all of the code

Screenshot of the component code, where the outer aria-label is set to false and the inner aria-label is set to an explicitly defined value
(from module 475413)

Now that I've looked at it, I agree that this can be improved, but I'm unsure as to how I should improve it.
I can't use the actual component for this as the aria-label can't be set separately, which is what I need to do as the tooltip text isn't a string.

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.

3 participants