Closed Bug 2048382 Opened 3 months ago Closed 1 month ago

Nova updates for tab close button and tab mute button

Categories

(Firefox :: Tabbed Browser, task, P2)

task
Points:
1

Tracking

()

RESOLVED FIXED
157 Branch
Tracking Status
firefox157 --- fixed

People

(Reporter: sthompson, Assigned: kpatenio)

References

(Blocks 3 open bugs)

Details

(Whiteboard: [fidefe-nova])

Attachments

(2 files)

After bug 2023619, the tab mute button and tab close buttons do not follow the Nova spec. This is likely because these buttons are only specced out in the Nova Components file https://www.figma.com/design/PqfaOcMGbX5liEXTTUzeYX/Nova-Components--Experimental-?node-id=9819-13980&m=dev

Looks like both of these buttons should be round and have a colored hover state. They are inconsistent right now, mostly since the close button is a custom styled <image> while the mute button is a <moz-button>.

  • horizontal and vertical expanded tab strip (20x20 round button)
  • pinned/vertical collapsed tab strip (16x16 round button with box shadow and a border on hover)

The vertical collapsed tab strip close button is 15x15 and squashing its 12x12 close icon into an 8x8 content box. It should be more like the vertical collapsed tab strip mute button that's 16x16 and puts the icon into a 12x12 icon box.

Whiteboard: [fidefe-nova]
Duplicate of this bug: 2047691

Note from Jules in bug 2047691 about the mute button: "We can probably alias off the tab radius."

Priority: -- → P2
Assignee: nobody → kpatenio
Attachment #9617081 - Attachment description: WIP: Bug 2048382 — update tab mute and close buttons for Nova → Bug 2048382 — update tab mute and close buttons for Nova
Blocks: 2062406
Blocks: 2062410
Pushed by kpatenio@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/75f04a72c569 https://hg.mozilla.org/integration/autoland/rev/92313f0da4ac — update tab mute and close buttons for Nova r=desktop-theme-reviewers,tabbrowser-reviewers,niklas,dao
Pushed by sstanca@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/f8c395c128c2 https://hg.mozilla.org/integration/autoland/rev/31ad1892c2cd Revert "Bug 2048382 — update tab mute and close buttons for Nova r=desktop-theme-reviewers,tabbrowser-reviewers,niklas,dao" for causing mochitests failures in browser_delay_autoplay_silentAudioTrack_media.js.

Reverted this because it was causing mochitests failures in browser_delay_autoplay_silentAudioTrack_media.js.

  • Revert link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | toolkit/content/tests/browser/browser_delay_autoplay_silentAudioTrack_media.js | should_not_show_sound_indicator_after_resume_tab - Test timed out
Flags: needinfo?(kpatenio)

The test fails locally for me. I can get it to pass if I set these css changes in .tab-audio-button:

  --button-size-icon-small: 24px; /* Reverted to Proton size */
  --button-min-height-small: var(--tab-content-button-size); /* Kept from the patch, 20px, for Nova */
  --button-border-radius: var(--border-radius-small); /* Reverted, no longer gate to just Proton */

When we set --button-size-icon-small to 20px (which is the value of --tab-content-button-size in the patch for Nova), then the test hangs, failing because the expected tooltip is never shown. I posted the wrong head.js link in Comment 7. It should be in https://searchfox.org/firefox-main/rev/017a9913bd6c272a859aea16d3cab5a4d46bf1b0/toolkit/content/tests/browser/head.js#153-158.

I first suspected that the smaller button size, combined with the rounded radius, was the cause of the failure. Waiting for a mouseover event though before attempting to mousemove in hover_icon seemed to fix it:

async function hover_icon(icon, tooltip) {
  disable_non_test_mouse(true);

  let mouseOverPromise = BrowserTestUtils.waitForEvent(icon, "mouseover");
  let popupShownPromise = BrowserTestUtils.waitForEvent(tooltip, "popupshown");
  EventUtils.synthesizeMouse(icon, 1, 1, { type: "mouseover" });
  await mouseOverPromise;
  EventUtils.synthesizeMouse(icon, 2, 2, { type: "mousemove" });
  EventUtils.synthesizeMouse(icon, 3, 3, { type: "mousemove" });
  EventUtils.synthesizeMouse(icon, 4, 4, { type: "mousemove" });
  await popupShownPromise;
}

The test passed with this change, even with ./mach mochitest --headless --verify toolkit/content/tests/browser/browser_delay_autoplay_silentAudioTrack_media.js. Might have to double check with a try push.

hover_icon in https://searchfox.org/firefox-main/rev/017a9913bd6c272a859aea16d3cab5a4d46bf1b0/toolkit/content/tests/browser/head.js#153-158 has a similar implementation and is used by the test https://searchfox.org/firefox-main/rev/017a9913bd6c272a859aea16d3cab5a4d46bf1b0/browser/components/tabbrowser/test/browser/tabs/browser_audioTabIcon.js#90. I didn't observe any failures running browser/components/tabbrowser/test/browser/tabs/browser_audioTabIcon.js. Making the same changes for this file actually caused the test to fail, so I don't see a need to wait for a mouseover event there.

The original test failure seems to have been fixed, but I observed more when I ran try pushes (see my comments in https://phabricator.services.mozilla.com/D314533). Still investigating.

Attachment #9617081 - Attachment description: Bug 2048382 — update tab mute and close buttons for Nova → WIP: Bug 2048382 — update tab mute and close buttons for Nova
Attachment #9617081 - Attachment description: WIP: Bug 2048382 — update tab mute and close buttons for Nova → Bug 2048382 — update tab mute and close buttons for Nova
Pushed by kpatenio@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/9e896fb277f6 https://hg.mozilla.org/integration/autoland/rev/2114b7085d1e — update tab mute and close buttons for Nova r=desktop-theme-reviewers,tabbrowser-reviewers,niklas,dao,sthompson

Re-landed the patch. I updated several helper functions for tabbrowser/ tests to try reduce flakiness.

Flags: needinfo?(kpatenio)
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 157 Branch
Regressions: 2067439
Regressions: 2067435
QA Whiteboard: [qa-triage-done-c158/b157]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: