Sailfish Community News, 15th June, Opal

Sailfish OS update from Jolla

Following our summary of Jolla’s 2023 activity in the previous newsletter, we’re happy to be focusing on community news this time.

There’s so much going on in the Sailfish community that it’s hard to do it justice in a short fortnightly newsletter. We’re not always able to keep track of it all! So don’t forget that if there’s something particular that you’d like covered, or you have any hot tips of exciting community gossip news, we’re always keen to here about them for inclusion in the newsletter.

Read on to learn more about the Opal initiative, to complement Jolla’s activities developing Silica and Amber.

Energy from the Community

App development can be hard work, and often the hardest step for a Sailfish OS app developer, as with any creative endeavour, can be getting started. The Sailfish SDK does a good job of creating the scaffolding for a new application, but there’s always a trade-off between providing a solid start and obscuring the underlying app development process.

As a consequence, most of the actual meat of an app (if you’ll forgive the mixed metaphors) is left for app developers to build themselves.

Jolla does of course provide a whole host of useful components that developers can plug into their apps: dialogue pages, scrolling lists, gallery pages, file pickers, authentication components, web page viewers and so on.

But Jolla can’t anticipate everything that a developer might want, and there are always going to be omissions. This isn’t a bad thing: it leaves space for other developers to come in and fill the gaps. And we were interested to discover that this is exactly what the Opal developers have set themselves the task of doing.

Opal is a set of QML components for use alongside Jolla’s Silica toolkit. At present it includes just a couple of completed components, but the plan is to grow this to include more over time.

Using something like Opal has obvious benefits: it avoids the need to reimplement components that other developers have already implemented a thousand times already. Just as importantly, if developers are using templates for commonly used components it also results in a consistent feel across the operating system.

To find out more about Opal we spoke to Mirian Margiani (ichthyosaurus) about developing Sailfish OS apps and working with the Opal team to help other developers do the same. Mirian is currently studying social anthropology and political science in Switzerland with research interests that range from digital commons from an anthropological and political perspective, over marginalised communities in international policy, to holistic sustainability on a democratic basis. To kick things off, I asked Mirian what fills his time when he’s not working on Opal.

As with everyone on this forum, of course Sailfish things fill 99% percent of my life. The remaining 1% is split between other things: When I am not studying or coding, I am very involved in voluntary work at my university: organising student events, running an anthropological blog, and promoting mental health awareness. And as a rare creature of a social scientist who knows their way around computers, all the techy things tend to end up with me.

Mirian started the Opal project with Michał Szczepaniak (Mister_Magister) who you’ll recognise from previous newsletters. More recently they’ve also been joined by Anton Thomasson (attah), Levone1 and Peter G. (nephros).

We wanted to understand a little more about what exactly Opal is for and who might use it.

Opal is a library for developers, providing a collection of pretty QML components, documentation, examples, snippets, recipes and resources for building more sailfishy Sailfish apps.

Opal was born to provide other app developers components that allow them to make their apps more beautiful and more sailfishy with little effort. It was also meant as an example of good practice, so that other developers can learn from the code and documentation.

Where Silica provides lower-level building blocks, Opal aims to provide more complete parts of an app that can be integrated into other apps with easy customization.

To this end Opal currently provides four QML components for use with Silica and Sailfish OS. Two are fully completed, while another two are work-in-progress.

The first, and currently better documented of the four, is Opal.About. This provides a very well-featured About page, showing the name and description of the app, with details of the developers and contributors. It includes the ability to add links to source code licences, include separate pages for contributors and licence details that push to the stack on top of the About page. The second fully-documented component is Opal.InfoCombo which provides a Combobox, but with the addition of longer descriptions for all of the options.

Documentation for the Opal.TabBar component is under development. The component provides a tab bar along the bottom or left hand side of the screen (depending on orientation), similar to that found in the default Jolla Clock app. You can swipe pages left and right, or select the icon or text in the tab bar to jump directly to a page.

Finally there’s the newly added Opal.Delegates component as an alternative to a ListItem that offers multiple lines of text and icons by default.

The components I tested are very slick, and with no equivalent alternatives in Silica or any of the other official Jolla component plugins. So they’re very sensible components to include in a third-party component repository like Opal.

During my testing I found integrating the components into the standard app template provided by the Sailfish SDK to be a little fiddly at times. But the instructions are good and after working through them carefully I found things worked as expected. What’s more, having been through the process once, they’d be much easier to integrate a second time.

Moreover both components I tried work really nicely. Creating a snazzy About page really is as simple as changing a few of the parameters in the component implementation. You can see an excellent example of this in Mirian’s explanation elsewhere in the forum. And as Mirian explains, “it is thoroughly documented in its Git repository”.

There are two directories: opal-development, with tools helping with developing Opal itself, and snippets with tools helping with general app development. Each tool has a related documentation file but documentation is not yet finished for some snippets.

Besides from helping other app developers, Mirian also has his own reasons for working on Opal.

Opal is not just a library, it is also intended to help others write more
beautiful apps, and help with learning the intricacies of Sailfish/QML/mobile development.

For me personally, Opal is a way to lend others a hand who may be learning QML and mobile app development just like I did once. Plus it forces me to reflect, rethink, and improve myself and my own coding. Opal is as much a learning process for me as it is intended to help others with learning.

It’s the moddability and flexibility of QML and the Sailfish OS user interface that got Mirian into developing for it in the first place.

I was fascinated by the possibilities of a QML-based and fully “moddable” GUI shell, and immediately got into development. Sailfish is a great platform to learn QML (mostly through my first app, a native client for Switzerland’s weather service), which I could then use for my other non-Sailfish coding projects.

This is a good opportunity to give a big shoutout to the developers of the Sailfish SDK, and especially the good integration with QmlLive. Back when I started writing apps, I wrote my own tools to achieve mostly what QmlLive gives us today, but the SDK has matured immensely since then. It is such a good way to learn everything concerning mobile app development - smooth sailing indeed!

Apart from developing apps, what caught my fascination was the ability to patch almost everything using the great Patchmanager. One of the first projects I started was sailfish-patch, a tool that has helped me a lot with all my patches ever since. At the same time, I started sf-about-page, a reusable and easily configurable “About” page component which has then matured into the first Opal module, as well as various tools like render-icons.sh that are now available as Opal snippets.

Mirian explains that for Opal, so he has been responsible for writing “all the code, tooling, and documentation” but that this “will hopefully change, though, with new contributions coming in from other developers who could easily package some of their personal QML components as Opal modules.” In fact, as we go to press, a new contribution — Opal.Delegates from nephros — is being added, demonstrating that the process works.

If you’d like to get involved in the project in order to contribute code or in some other way, then Mirian has some excellent advice for you. In fact, this is probably useful advice even if you’re not planning to contribute.

Do your programmer self a favour and start as I did: by having a thorough look at Lydia Pintscher’s (ed.) “Open Advice [pdf]”. This great book describes the basis of what Opal is intended to be. By doing this, even without writing any code or documentation for Opal, you will contribute to the goal of the project: creating a better community.

What if you want to do more? That’s documented as well. Basically, there are four ways to support Opal:

  1. Use Opal modules in your apps, e.g. use Opal.About for your About pages and rip out these hand-knit pages, bundled copies of various licenses, and incomplete lists of contributors.
  1. Translate Opal modules on Weblate so that all apps using Opal can benefit from ready-made translations, making Sailfish truly international.

  2. Write documentation, recipes and tutorials, targeting all levels of expertise. You solve intricate issues while developing apps or patches all the time — document them so that others can learn from it.

  3. Provide your own reusable QML modules. You can use Opal.InfoCombo as a very simple basis: copy the module, adapt the configuration, and put in your own QML files.

As I noted above, the current components are written in QML, but Mirian is also keen to provide C++ plugins too.

Opal is not finished yet, and probably never will be, so you can also help by finding issues, and helping with finding the best way to include C++ plugins for easy distribution. A widely-used C++ component is SortFilterProxyModel, which needs a patch to work on Sailfish. You could get your hands dirty by finding a way to package it as an Opal module.

From my own experience playing around with Opal, the availability of good reference implementations was especially helpful in understanding how to use it well. The Opal components have already been integrated into many apps, and — for example — for the tab bar I found examining how it’s used in Sailtrix was an excellent way to deploy it in my own app.

There is also an Opal Gallery in development. This currently includes the About and InfoCombo components, but not yet the remaining components that are still under development. I was curious to know where else the Opal components are being used.

As far as I know, all my apps (like File Browser, Minidoro, Captain’s Log, etc.) are the only apps that officially use Opal so far. In the Opal readme I started a list of apps using Opal: if you are using it, please tell me so I can add your app to the list! For example, Sailtrix and Olive goes shopping use my sf-docked-tabbar, which I am working on incorporating into Opal.

Here at the Community Newsletter we’d also love to hear of apps using Opal components, so do get in touch if you’re using them. And if you’re interested in some of the other apps Mirian mentions, we’ve also covered some of them in our usual App Roundup below.

Let’s wrap up by letting Mirian explain what the future looks like for Opal.

I hope that Opal will grow from community contributions, so that it becomes a library providing a broad spectrum of ready-to-use and easy-to-use, thoroughly documented QML components, resources, and plugins.

Writing such code is a great way to help oneself with refining skills in documentation, QML, visual design, and software architecture.

My larger hope is that through this we will get more and higher quality apps, and in the end (now we are in dream territory) maybe even convincing Jolla of the importance of openness so that Silica and core apps could be opened up under a Free Software license.

Thank you to Mirian for this excellent insight and we wish the Opal developers the best of luck with the Opal initiative. If all goes to plan we can look forward to a future that includes better, more consistent and slicker Sailfish OS apps as a consequence.

App roundup

As promised we have a duo of apps that make use of Opal components in the app roundup this newsletter. But the common thread that runs through all four of our apps is their careful focus on streamlining processes that might otherwise be laborious. Thoughtful design decisions can make all the difference, especially for apps that combine multiple steps into a single pipeline. Whenever I see these careful touches in an app it reminds me of how lucky Sailfish OS is as a platform to have such great apps, and how much care and attention has gone in to developing them.

Captain’s Log

Captain’s Log is the first of our two apps featured today by Mirian Margiani (ichthyosaurus). If you’ve skipped over the Energy from the Community section to read this first, then it’s worth reiterating that this is one of the apps that makes use of the Opal component library discussed above. Don’t forget to go back and read the it to find out what all the fuss is about!

Visiting the About page of the app immediately highlights the benefits of using Opal. The page is packed full of details, and there are multiple contributors, all of whom are listed on the contributions page with all of the relevant licence details present.

Beautiful About page aside, what’s the app about? It’s essentially a diary app allowing you to keep track of your thoughts, however exciting or mundane they may happen to be. It’s like a blog, but private!

The app includes some very nice and well-thought-out touches. For example, as you might expect each entry can include a title and description, and you can also assign a mood (between fantastic and horrible) with an emoji Likert selector, alongside multiple additional tags. But the nice touch is that the mood selector automatically opens when you create a new entry, allowing you to quickly assign the basics with minimal prodding. Previous tags you’ve used also appear at the end of the dialog so you can quickly assign common ones again. It makes for very streamlined entry creation.

That allows you to focus your effort on the text entry portions. Writing a diary using an on-screen keyboard can be a bit laborious, but as the old saying goes: “the best diary you have is the one you have with you”. It makes it easy to note down ideas when you have them, rather than having to rely on memory for when you get back to your keyboard (or hardbacked diary!).

If you’re using Captain’s Log for your innermost thoughts, you’ll be pleased to hear you can set a passcode to lock out prying eyes. Bear in mind that this blocks access via the app, but doesn’t encrypt the underlying database, but it should do the job for keeping out casual snoopers.

Another really nice touch is that you can export your full diary in multiple formats, including text, comma-separated variables, markdown and pandoc markdown. I’d like to see the ability to import entries this way too, and it would also be useful to be able to export single entries rather than just the entire diary. This would make it a great tool for writing short missives for upload to a website platform such as Hugo or Jekyll.

We really like Captain’s Log, and the latest version 3.0.0 brings better translations, remorse timers when editing or deleting entries, improved search and a whole lot more.

If you’re looking for a phone-based app for recording diary entries, Captain’s Log should be your first port of call. It’s available from the Jolla Store and OpenRepos.

Laundry List

As the second of our Opal apps in the App Roundup today, you’ll find Laundry List also sports a very effective About page. This is another app written by Mirian Margiani (ichthyosaurus) which, as this nice About page states: “fills a very specific niche”. In particular, it helps identify snowdropping (which, in case you’re not familiar with the term, means to steal clothes from a washing line for financial gain).

How does it do this? By allowing you to maintain meticulous records of the clothes that go up on the line, and the clothes that come down from the line. Or, in case you’re of a conspiratorial bent and suspect your washing machine is plotting against you, you might use it to track clothes that go in the machine, and clothes that come out again.

Although in some places snowdropping may be a real issue, the app is also useful for the forgetful or careless, liable to lose items of clothing for more mundane reasons. And although it can be a little laborious to set things up with the contents of your wardrobe, having done so the app becomes a breeze to use.

The app provides a prefilled list of your clothes. Tapping on a line increases or decreases the count of clothes out, or increases or decreases the count of clothes returned. The app won’t allow you to count more clothes in than out, which probably makes sense but might catch you out on the odd occasion that you gain a sock.

Helpfully the app will highlight lines that don’t balance, so you can immediately see if you’re missing any clothes on your way back from the washing line.

On account of the fact you create the clothes database yourself, there’s nothing stopping you using the app for other counting tasks: shopping lists, library lending or keeping track of screws when performing an iFixit teardown.

So while it is indeed a niche app, it has more potential than might it first appear. If you’re using it for something other than laundry, please share in the comments below.

A simple app to keep track of your laundry.

Version 1.0.0 of Laundry App is available from the Jolla Store and OpenRepos

Imageworks

We’re back to our old habits again this week with an updated app from Mark Washeim (poetaster). But not all habits are bad, and we’re really pleased to see Mark’s tireless work updating his app portfolio continue.

Imageworks is a superb image editing app, originally written by Tobias Planitzer but having now been maintained by Mark for the last couple of years. Although not designed for creating images from scratch, it will allow you to apply a dizzying selection of filters, tools and effects to an existing image, including adding labels, rotating, applying colour filters, creating collages, cropping and more.

We’ve covered Imageworks a few times previously, so we won’t go in to all the detail today. But we do want to look at the last of these: cropping.

The cropping tool allows you to drag out a rectangle across the image. Selecting the ‘tick’ button applies the cropping, cutting the size of the image down to the area enclosed by the rectangle.

The latest change adds in various ratios such as “4:3” (classic television), “16:10” (widescreen), “1:1” (square) and many others. Having selected one of these options, dragging the corners of the crop rectangle will still increase and decrease its size, but without changing the specified ration of width to height.

This is potentially a really useful feature. There’s also a new button that appears during a crop which will ‘invert’ the ratio, so that the ration “width:height” gets switched to “height:width”.

It’s an incremental update, but a useful feature and with every update the app becomes even more proficient and useful. Imageworks remains one of the most full-featured of Sailfish OS apps.

The latest update brings the app to version 1.2.3, which is available from the Jolla Store, OpenRepos and Chum.

Fotokopierer

It’s great having a camera to hand at all times on your phone, but when it comes to taking photos of documents, the results aren’t always that great. It’s hard to line things up correctly, especially if there’s glare from nearby lights to consider, and invariably the resulting image will have corners missing, uneven edges and distracting perspective. Moreover, multipage documents will be left as a collecting of separate JPEG files, making them harder to read and share.

Fotokopierer from Frank Fischer (fifr) attempts to address these issues by creating a simple pipeline for turning photographs of documents into digital documents.

The app includes its own camera viewfinder, but you can also import images you’ve taken previously. The pipeline is then made up of three steps.

First drag the four corners of quadrilateral so they match the four corners of the document. The app is careful to enforce minimal restrictions, so this needn’t be a square and all four corners can be dragged independently. There are multiple ways the app helps you get this right: the magical ‘autoselect’ button is particularly nice and surprisingly effective and picking out the edges of the page automatically. But if you do need to tweak the positions, a pixel-level close-up of the area under your finger appears while you drag.

Second, amend the colouring of the image by converting it to black and white, greyscale, primary colours, auto correct, or controlling the brightness and contrast levels directly.

Finally, select the pages you want to include in your document and export the result out to PDF. It actually works very well, and we got great results testing with a magazine even in poor light conditions on a table shared with a whole lot of other mess.

The latest version 0.4.7 updates several of the underlying libraries and fixes some bugs. It’s available from the Jolla Store, OpenRepos and Chum.

Repository roundup

Concerning these recent changes, there are two commits that catched my attention: two sailors made modifications in repositories (where Sailfish OS is upstream) to allow compilation with Qt6. Is it some personal initiative or a signal that finally a Qt upgrade may be sooner than later ? Future will tell, but this is the first time that such modifications are done by sailors. Up to now, they have always come from community members using the code in a different context (Nemo mobile, LuneOS…).

The network stack

Calendar stack

Browser

  • gecko-dev, Mozilla’s Gecko web rendering engine, attah proposed to enable the dialog element, since this element is now standard and available since Firefox 53.

Audio and video layer

Low level libraries

SDK and developer tools

  • busybox, a single binary which includes versions of a large number of system commands, mal updated it to 1.36.1.

Please feed us your news

Thank you for reading!

As was mentioned in the previous newsletter, we are heading towards the summer vacations, which also means that there will be a gap in the newsletters. The next newsletter will be published in August, but that doesn’t mean that you shouldn’t send us your topic ideas - it just means that it will take a while before those ideas become newsletter articles.

22 Likes

Regarding Silica openness, its QML part is licensed under BSD if I’m not mistaken. But C++ part is proprietary. What about re-implement it with some open license? It would allow easy porting of SFOS apps to other mobile platforms or even running UI on x86_64 during development…

1 Like

Sadly, most of the more recent additions have either no copyright header or an explicit “License: Proprietary” notice. It seems these files were mostly modified by Open Mobile Platform and now that Jolla is severing ties with Russia, maybe they (Jolla) can rethink their stance…

That should be possible but its a massive and unnecessary amount of work - Jolla could simply decide to open it up. All the things people are patching now through Patchmanager could then be upstreamed.

Exactly, plus it would make Sailfish independent of Jolla’s financial situation. If they decide one day to discontinue Sailfish, or if they don’t have the money to continue, then all the community effort has been for nothing as all Sailfish apps can’t run anywhere else.

5 Likes

Thank you @flypig for this article and for giving me the opportunity to talk about my work! :slight_smile:

I was thinking already about exporting search results, maybe I could expand that to make it more flexible. Regarding importing: you’re not the first to request this but I’m hesitant to implement something without a concrete use case. Did you think of re-importing exported data? Or importing from other file formats? Maybe even the notes app?

Does it show up in the Jolla Store for anyone? It was accepted but I don’t see it on my phone…

3 Likes

It doesn’t show here either.

Also - I’m confused how I missed the Opal announcement by ichtyosaurus and now a community news made by flypig in June 15h… is this 2023? (Or am I replying to a last year thread)

Way to go, folks!

(now back to debugging my droidmedia:)

3 Likes

I see it. Are you on old versions for some reason?

1 Like

It’s been available for a while. I see it on 4.5 devices, in any case. Could be that some include is 4.5 only. I noticed that with ‘Solver’. I think I used a Quick declaration that’s a bit new? 2.6?

1 Like

There was a remark from Jolla somewhere that these license remarks in files don’t matter that much, and that J own the rights to all of that regardless.

Probably something in the original licensing agreement between J and OMP.

But I can’t find the quote atm.

1 Like

Doesn’t show for me in the jolla store (4.5)

1 Like

Same here with XA2 3.4 and 10III 4.5. Visible in Storeman on both devices.

1 Like

Thank you as always for this great newsletter. It is always a nice read. Also big thank you to each contributor (jolla employee or opensource sailor). Great job.

3 Likes

No, 4.5.0.19 64-bit on both Mi Note 10 and Zenfone 8.
I don’t see it on my official Xperia 10 32-bit either while searching for Laundry or in recent apps

2 Likes

Thanks to everyone for checking the store! I think it might be an 32bit vs. 64bit issue: I’m using an Xperia X (32bit), @vlagged is on 32bit too, while @mSorvisto is on 64bit, right? That’s weird though, because I built it for all three architectures and I’m using that build on my phone.

No, latest 4.5…

IIRC, importing QtQuick 2.6 shouldn’t be an issue since SFOS 3.x.

1 Like

That would be nice, at least… There was also a remark from Jolla somewhere (don’t find it either right now) that BSD headers “don’t mean it’s BSD” - which isn’t how licensing works, I think. So let’s hope you’re right and hope that they change their minds :).

AFAIK XA2 is 32bit and 10III is 64bit.

1 Like

Just checked. Right you are. I still haven’t figured out what’s flagging my Solver as > 4.5 only. Works fine on 3.4 (from chum).

1 Like

Opal shows up in Jolla Store and Storeman (on Volla / 4.4.0.64).
Also the same on Xperia 10 / 4.5.0.19.

1 Like

Hmm, then it makes no sense…

Does anyone know if there is a way to contact the Harbour team?

Wrong. Some days I use too many devices. There are several reasons install won’t work on 3.4.

I think I may have a clue. Actually, @olf had a merge request that contained:

%define _binary_payload w2.xzdio

as an rpm macro to ensure that the rpm compression would work pre 4.4 that might also be an issue depending on the port?

1 Like