-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix jumping mute tab button when hovering on inactive tab #16860
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
Comments
The area of this tab is called alert indicator and it's used for multiple states: enum class TabAlertState {
MEDIA_RECORDING, // Audio/Video being recorded, consumed by tab.
TAB_CAPTURING, // Tab contents being captured.
AUDIO_PLAYING, // Audible audio is playing from the tab.
AUDIO_MUTING, // Tab audio is being muted.
BLUETOOTH_CONNECTED, // Tab is connected to a BT Device.
BLUETOOTH_SCAN_ACTIVE, // Tab is actively scanning for BT devices.
USB_CONNECTED, // Tab is connected to a USB device.
HID_CONNECTED, // Tab is connected to a HID device.
SERIAL_CONNECTED, // Tab is connected to a serial device.
PIP_PLAYING, // Tab contains a video in Picture-in-Picture mode.
DESKTOP_CAPTURING, // Desktop contents being recorded, consumed by tab.
VR_PRESENTING_IN_HEADSET, // VR content is being presented in a headset.
}; screen recording: alert_indicator_jump.movare we only moving the audio icon over or the whole section that holds the above states? and are there any visual changes to other state icons? for ex, we've opted to change the background for audio. |
@nullhook Aside from the audio playing/muting, the other icons don't seem actionable to me. If that's correct, then I think it would be fine to only move the audio playing/muting buttons since the user probably wouldn't try to click on the other icons. If it's cleaner to move everything over though, I'm fine with that too. |
@karenkliu the current implementation for hover/pressed states are "blended towards max contrast" based on the tab background color for dark/light and user custom themes. For ex, light mode: it takes the current background color for the tab and manipulates the alpha value for hover/pressed states. The values for those alphas are hardcoded as follows:
Can we change the default state color for the indicator to work under all scenarios? Ideally, if there's transparency/similarity to the current tab background would work. It has to work on all custom user themes. |
test.movHere's a test. i've manipulated the default state color (inherits from tab bg color) to alpha: |
Verified
Steps:
Confirmed the audio-playing icon is to the left of the page title in the tab's strip. @karenkliu if I'm not mistaken, it looks like the at-rest and hovered state colors for the Verification passed on
Verified no "jumping" audio-playing icon Verification passed on
|
@stephendonner Yes good catch! It should be reversed on dark theme. The reason is because we are keeping the change in contrast consistent for the same interaction in both themes: In light theme, it starts as high contrast (darker color) and goes to low contrast on hover (light color). In dark theme, it should also start as high contrast (lighter color) and go to low contrast on hover (darker color). |
Description
Currently when the user hovers over an inactive tab with audio, the mute button jumps to make room for the X icon. This causes accidentally clicking on the 'X' icon when the intended action was to mute the tab.
Original description:
Steps to Reproduce
Actual result:
Expected result:
Move the mute tab button to the left of the tab, between the favicon and page title. Give it a background color when unselected and on hover so that it reads as a button rather than an emoji.
Light theme
Dark theme
Reproduces how often:
Easily
Brave version (brave://version info)
all versions
Version/Channel Information:
Other Additional Information:
Assets
Figma
The text was updated successfully, but these errors were encountered: