Plasma Sprint 2019 in Valencia

Last month the Plasma team met in Spain for their annual developer sprint. It was kindly hosted by Slimbook in their offices on the outskirts of Valencia. This time it was co-located with the Usability sprint and it was great to meet so many new faces there.

View from the rooftop bar at the hotel
View from the rooftop bar at the hotel

Continued improvements in notifications

On 11 June we released Plasma 5.16 with a completely redesigned notification center. In the weeks since I received numerous suggestions on how to improve the system even further and I started working on them. Since this technology is relatively new there’s also a lot of activity and changes being made to the “stable” branch of notification code, i.e. the one feeding subsequent 5.16 bugfix releases. Let’s talk about some of those changes:

  • Fixed job progress reporting when using Latte Dock: in the old system, there was a dedicated process kuiserver managing job tracking (the info popup when you copy a file) forwarding the information to every interested party. However, apart from plasmashell there was nobody else making use of it and it seemed like a huge waste to duplicate the DBus traffic happening while copying a file. Or so I thought :) I killed kuiserver and moved its logic into plasmashell. However, since Latte Dock also uses Task Manager progress reporting, it became random who claimed the service on login. This is resolved now using some clever DBus magic. If you still have issues with progress reporting in conjunction with Latte Dock with latest updates installed, please let me know!
  • More reliable popup placement: the popup should no longer fly all over the place on Wayland.
  • Ignore duplicates: When an application sends the same notification multiple times in quick succession, the additional requests are ignored.
  • Improved notifications for app bundles: notification center identifies applications based on the desktop-entry hint they send. However, in case of bundled apps, such as Flatpak and Snap, the desktop file in the bundle might be different from the one it originally got built with. To address this, I now also take into account the X-Flatpak-RenamedFrom key and BAMF_DESKTOP_FILE_HINT environment variable when trying to identify an application.
  • No unidentified apps in history: another side-effect of a failure to identify an application is that we cannot relate any user preferences to it. This means that you cannot prevent an application from flooding your history. Since 5.16.2 unidentified applications no longer show up in history. This is admittedly a stark behavior change for a stable release and I do apologize for breaking someone’s workflow. However, I needed a quick mitigation for the spam problem and will consider making it an option in Plasma 5.17.

Do not disturb while screens are mirrored
Do not disturb while screens are mirrored

Speaking of Plasma 5.17, I worked on additional notification features for the October Plasma feature release: since we had a projector in the meeting room and I got tasked to run through the agenda in the mornings, I realized that having a way to automatically enter do not disturb mode when mirroring screens could be useful. Since I already used our KScreen library before in PowerDevil (which by default will not suspend your laptop when you close the lid with an external monitor connected), a patchset was quickly created.

Quick reply. Application gets to choose placeholder text and submit button appearance
Quick reply. Application gets to choose placeholder text and submit button appearance

For a long time I’ve been craving for a quick reply feature where you get a text field inside the notification. In fact, this has been on the notification master plan since 2016. While implementing the feature itself was relatively straight-forward, keyboard focus is an issue still to be resolved, especially on Wayland: notification windows never get focus so they can’t steal it away from other applications. However, conditionally granting focus in this particular case is a lot harder than it sounds.

Shaping up the next Plasma Browser Integration release

Plasma Browser Integration is one of the projects I’m most proud of. In case you didn’t know, there’s a browser extension for Firefox and Chromium-based browsers that bridges the gap between browser and desktop. It lets you share links, find browser tabs in KRunner, and control music and video playback anytime from Plasma, or even your phone using KDE Connect!

A crossed icon indicates it’s not running and the popup gives some advice about it

For the next feature release I first of all worked on better error handling. Right now, when the bridge application acts up or isn’t installed, a popup is shown. This is especially annoying when you have the extension synced across devices to computers that may not be able to run it. I now make use of a so-called browser action to place an icon in the toolbar that indicates status.

WebShare API in action
WebShare API in action

Furthermore, I added support for the Web Share API so websites can trigger a share dialog from Purpose, our content sharing framework used throughout our applications. This feature also got added to the context menu, so you can not only send links to your phone via KDE Connect but to any registered application. What I’d love to see is a Purpose plug-in for KDE Itinerary so I could store boarding passes directly from the airline booking pages. :)

Automatic dark mode, maybe?
Automatic dark mode, maybe?

I also toyed around with Media Queries Level 5 to support “dark mode” CSS media queries. While I managed to have it query the current system color scheme to determine dark or light mode, the media queries are currently applied by tampering with the website CSS and installing new rules with the media query unset. This seems to work well but is not something I feel very confident in shipping. Let’s hope this feature request for letting extensions enforce a color scheme goes anywhere or maybe they could just start reading the gtk-application-prefer-dark-theme setting in the future.

Finally, the plan is to enable enhanced media controls by default now that I made it less invasive and more resilient. With this you’ll get more detailed track information, album covers, and more playback controls for websites using the Media Session API. Luckily, more and more websites are starting to make use of that API.

Please do me a favor and enable “Enhanced Media Controls” in the extension settings right now and report any websites that might misbehave, so we can fix that!

I'm going to Akademy 2019

Leave a Reply

Your email address will not be published. Required fields are marked *