Closed Bug 1982733 Opened 9 months ago Closed 2 months ago

Support Taskbar Tabs on Linux

Categories

(Firefox :: Web Apps, enhancement, P3)

Unspecified
Linux
enhancement

Tracking

()

RESOLVED FIXED
150 Branch
Tracking Status
firefox150 --- fixed

People

(Reporter: dmcintosh, Assigned: dmcintosh)

References

(Blocks 3 open bugs)

Details

(Whiteboard: [fidedi-pbm])

Attachments

(10 files, 2 obsolete files)

48 bytes, text/x-phabricator-request
Details
48 bytes, text/x-phabricator-request
Details
48 bytes, text/x-phabricator-request
Details
48 bytes, text/x-phabricator-request
Details
48 bytes, text/x-phabricator-request
Details
48 bytes, text/x-phabricator-request
Details
48 bytes, text/x-phabricator-request
Details
48 bytes, text/x-phabricator-request
Details
48 bytes, text/x-phabricator-request
Details
48 bytes, text/x-phabricator-request
Details

...and other freedesktop-y systems (BSD).

General requirement is creating .desktop files and putting them in $XDG_DATA_HOME/applications, possibly with the dynamic launcher portal if supported. The WM_CLASS/app_id also needs to match the .desktop file.

Implementing pinning is more difficult, and might require reaching out to GNOME/KDE/etc. about an xdg-desktop-portal or similar for the purpose; some WMs/DEs don't even support pinning, so we'll have to work out what happens there.

Systems that don't support .desktop files will be out-of-scope.

Whiteboard: [fidedi-pbm]
Depends on: 1985098
Component: Shell Integration → Web Apps

This can probably be done in a single patch stack, and Linux-related bugs should just be filed under 'Web Apps' with the Linux platform, so I don't think this needs to be a metabug anymore.

Assignee: nobody → dmcintosh
Status: NEW → ASSIGNED
Keywords: meta
Summary: [meta] Taskbar Tabs on Linux → Support Taskbar Tabs on Linux

This is picked up by Gecko as the application ID, which is used by Linux
desktops to determine which app the window belongs to.

It seems like there isn't a guarantee that the 'focus' event is actually
sent when .focus is called. Linux (in my case, testing on GNOME) seems
to be more wary about giving up focus, so the test gets stuck waiting
for a 'focus' event. Since we only really want to check that our event
handlers work, just poke them (relatively) directly.

Depends on: 2013677
Attachment #9541503 - Attachment description: Bug 1982733 - Pre 1: Add ShellService.createLinuxDesktopEntry and use it from TaskbarTabsPin. r=nrishel,emilio → Bug 1982733 - Pre 1: Add ShellService.createLinuxDesktopEntry and matching ShellService.deleteLinuxShortcutEntry. r=nrishel,emilio
Attachment #9541510 - Attachment description: Bug 1982733 - Part 6: Avoid actually manipulating window focus in browser_taskbarTabs_pageAction.js and browser_taskbarTabs_telemetry.js. r=nrishel → Bug 1982733 - Part 6: Use SimpleTest.promiseFocus in Taskbar Tabs tests instead of window.focus() directly. r=nrishel!,hsohaney
Attachment #9541511 - Attachment description: WIP: Bug 1982733 - Post (workaround): Avoid focusing TaskbarTabs windows on Linux after creation/ejection to avoid a frequent crash (bug to be filed). → WIP: Bug 1982733 - Workaround: Avoid focusing TaskbarTabs windows on Linux after creation/ejection to avoid a frequent crash (bug to be filed).
Attachment #9541511 - Attachment is obsolete: true

This is nice! Have you checked whether this works in snap/flatpak? https://phabricator.services.mozilla.com/D281292 seems to always write directly to the system path, contrary to what comment #0 says. Or maybe I missed the right patch for that?

Flags: needinfo?(dmcintosh)
Blocks: 2019113
Blocks: 2019115

(In reply to Kagami Rosylight [:saschanaz] (they/them) from comment #13)

This is nice! Have you checked whether this works in snap/flatpak? https://phabricator.services.mozilla.com/D281292 seems to always write directly to the system path, contrary to what comment #0 says. Or maybe I missed the right patch for that?

I hadn't really tried in Flatpak, thanks for the reminder! It didn't work in Flatpak, and I'm 99% sure it doesn't work in Snap; reason being that (a) ~/.local/share/applications isn't available, and (b) the desktop entry doesn't point inside the sandbox, so it tries to run /app/... which doesn't work. I just filed followup bugs for those, and I've poked you on Slack around the approach for Flatpak in particular.

Hopefully it'll work on both, if not we can just keep the page action invisible where it doesn't work (namely Snap might have some delay).

Flags: needinfo?(dmcintosh)

Those will still be addressed for Fx150, but I'd like to land the rest of
the stack so I don't have to worry about it.

Pushed by dmcintosh@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/48dd44a05e3f https://hg.mozilla.org/integration/autoland/rev/e5fb30d23f22 Pre 1: Add ShellService.createLinuxDesktopEntry and matching ShellService.deleteLinuxShortcutEntry. r=nrishel,emilio,hsohaney https://github.com/mozilla-firefox/firefox/commit/08adc6f3a72c https://hg.mozilla.org/integration/autoland/rev/b022b7d28839 Pre 2: Split TaskbarTabsPin tests between Windows-specific tests and cross-platform tests. r=nrishel https://github.com/mozilla-firefox/firefox/commit/226ec105e068 https://hg.mozilla.org/integration/autoland/rev/dc3ed76faa35 Part 1: Set the windowclass attribute when opening a Taskbar Tab window. r=nrishel https://github.com/mozilla-firefox/firefox/commit/cda212165db1 https://hg.mozilla.org/integration/autoland/rev/40234734130e Part 2: Use ShellService.createLinuxDesktopEntry from TaskbarTabsPin.sys.mjs. r=nrishel https://github.com/mozilla-firefox/firefox/commit/e0a192f794e8 https://hg.mozilla.org/integration/autoland/rev/e8b9e6aff102 Part 3: Show the Taskbar Tabs page action on Linux if browser.taskbartabs.enabled is true. r=nrishel https://github.com/mozilla-firefox/firefox/commit/2d01b13f16ad https://hg.mozilla.org/integration/autoland/rev/965e399e4d25 Part 4: Only invoke Windows-specific functions if they are available. r=nrishel https://github.com/mozilla-firefox/firefox/commit/aff82d9902e5 https://hg.mozilla.org/integration/autoland/rev/50f7c3b8e74c Part 5: Enable most Taskbar Tabs tests on Linux. r=nrishel https://github.com/mozilla-firefox/firefox/commit/9a90eb89bfcd https://hg.mozilla.org/integration/autoland/rev/12daf2d45e7a Part 6: Use SimpleTest.promiseFocus in Taskbar Tabs tests instead of window.focus() directly. r=nrishel https://github.com/mozilla-firefox/firefox/commit/59ad330e59a9 https://hg.mozilla.org/integration/autoland/rev/98103c824903 Post: Rename test_taskbarTabs_pin.js to test_taskbarTabs_pinWindows.js. r=nrishel https://github.com/mozilla-firefox/firefox/commit/d1e7213ef8c7 https://hg.mozilla.org/integration/autoland/rev/232079a3aa64 Post 2: Temporarily disable Taskbar Tabs for Flatpak and Snap installations. r=nrishel

:dmcintosh did you want to include this in the Fx150 release notes? Feel free to nominate if so.

Flags: needinfo?(dmcintosh)
See Also: → 2021458
Blocks: 2021459

Comment on attachment 9545086 [details]
Bug 1982733 - Enable Taskbar Tabs by default on Linux. r=nrishel!,hsohaney

Revision D283354 was moved to bug 2021459. Setting attachment 9545086 [details] to obsolete.

Attachment #9545086 - Attachment is obsolete: true

Note to the people cc'd here, if you weren't aware: this has now landed and is available in Firefox Nightly! For now, it's disabled by default; you can turn it on by switching browser.taskbarTabs.enabled to true in about:config. Hopefully it'll either be enabled by default shortly or we'll figure out some non-about:config way to turn it on.

Feel free to take a look and report any bugs you find! Some quick known issues/notes:

  • If your Applications menu has sections, the web apps are currently under 'Other'. You can also pin them to your dash/dock/taskbar/whatever, which is what you're meant to do, they're taskbar tabs :)
  • GNOME doesn't always assign the correct application, so the icons etc might be a bit wonky. It should generally work OK, though, see bug 2021458 for details.

:diannaS — I'm currently thinking to hold off on putting it in release notes until we know what it'll look like in the actual Fx150 beta/release. I'll set a reminder for March 16, since it looks like March 18 is the first beta notes draft?

Flags: needinfo?(dmcintosh)

Although, quick qualification just after I hit Submit — it isn't available yet in Flatpak or Snap builds, unfortunately, I'll be working on that shortly.

See Also: → 2021897

diannaS: FYI current plan is unfortunately to keep pref'd off until Firefox 151, so no need for changelog entries yet. If that changes this week I'll add a nomination.

QA Whiteboard: [qa-triage-done-c151/b150]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: