Skip to content

Conversation

@XangelMusic
Copy link

No description provided.

Copy link
Member

@r2dev2 r2dev2 left a comment

Choose a reason for hiding this comment

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

Functionality is great and works!

However, I think there might be some rendering issues. On Chrome, it looked fine, but at least in my Firefox, the text looks weird (as seen below). Would you be able to fix this?

Image

Also, would you be able to add a hover effect for when the mouse hovers over the button? See the comment I had for the :hover rule, I think the color just needs to be tweaked and then it'll work!

Copy link
Member

@r2dev2 r2dev2 left a comment

Choose a reason for hiding this comment

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

Functionality good, just some quick css + logging changes!

import outline from '../assets/outline.svg?raw';
import { onDestroy, onMount } from "svelte";
let instanceTracker = 0;
Copy link
Member

Choose a reason for hiding this comment

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

Since instanceTracker is a local variable to this component, there will be a new instanceTracker variable for each instance of the component so it will always be 0 or 1 even if there are multiple SettingsButtons.

Would you be able to remove the instanceTracker variable, but keep the log of creating / deleting the SettingsButton? Also, would you be able to change console.log to console.debug?

Comment on lines +50 to +58
.button-label {
color: var(--yt-spec-text-primary);
white-space: nowrap;
font-family: sans-serif;
font-size: 1.4rem;
line-height: 2rem;
font-weight: 100;
-webkit-font-smoothing: var(--paper-font-subhead_-_-webkit-font-smoothing);
}
Copy link
Member

Choose a reason for hiding this comment

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

I think this is why it's rendering looks a bit funky in the screenshot I sent. From inspecting element, I see that the other items in the menu are rendered with below (font-weight is 400 and font-family is "Roboto","Arial",sans-serif)

Image

height: 24px;
}
.button-icon {
Copy link
Member

Choose a reason for hiding this comment

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

The icon isn't centered, as show in below screenshot:

Image

I think you probably need display: flex; justify-content: center in .button-icon too in order to center the button.

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.

2 participants