Add browser action for status reporting
ClosedPublic

Authored by broulik on Aug 13 2019, 1:59 PM.

Details

Summary

This adds a tool bar icon for reporting extension status in lieu of the error notification.
When the extension isn't supported or fails to start, the Plasma icon is crossed out. Especially when synced to a device without plasma-browser-integration, the error notification that used to show up can be annoying and misleading.
When the extension crashes, an overlay is shown.
Currently, the overlay is disabled when the extension is running properly, but additional controls such as sharing and media controls blacklist settings could be added to the browser action. This patch is mostly for the base infrastructure of such a toolbar icon.

Test Plan

Needs proper icon from VDG, cf. Bug 410821

Disabled icon


Explanation for not working

Crashed icon


Crashed explanation

When the host crashes, you also get a DrKonqi dialog but don't think there's a way for us (other than matching the "Native host has exited" string) to tell whether it crashed (DrKonqi) or got disconnected for violating the communication protocol or just quit gracefully because of some other issue (No DrKonqi)

All working


Chrome always shows an extension icon which has a default context menu, on Firefox the icon hides completely in this case.

Diff Detail

Repository
R856 Plasma Browser Integration
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Aug 13 2019, 1:59 PM
Restricted Application added a project: Plasma. · View Herald TranscriptAug 13 2019, 1:59 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Aug 13 2019, 1:59 PM
broulik updated this revision to Diff 63707.Aug 14 2019, 9:06 AM
  • Rebase
ognarb added a subscriber: ognarb.

I will provide more feedback tomorrow, when I have more time.

extension/action_popup.css
32

Why it is empty?

45

same

Tested in Firefox:

The PNG is not displayed.

I'm not a fan of using string as enum value (portStatus).

extension/action_popup.css
22

Not used

32

Or maybe add a breezy background-color :)

ognarb accepted this revision.Wed, Aug 21, 10:02 AM

For the png problem it was because I had a navbar with the same color.

This revision is now accepted and ready to land.Wed, Aug 21, 10:02 AM
This revision was automatically updated to reflect the committed changes.