Sugar Learning Tools – Part III

Catching up

The last couple of months have been hectic: more Sugar applications with Flatpak, quality of life improvements to Flatseal, tinkered with the idea of a Flathub-based OS for phones, showed case the tools to create modern native applications with JavaScript, shared my views on how Flatpak is reshaping the desktop’s future, teased the GNOME Circle at the Linux App Summit, planted the initial seeds to kickstart the GNOME community in my home country, started contributing to Flathub’s backend and other non-desktop projects (oh, yeah, and then my actual job 😂).

For this post though, I would like to focus on the progress made to Sugar applications with Flatpak.

Sugar Learning Tools

During my GUADEC presentation I mentioned the things I wanted to achieve moving forward with this project. Primarily, improving the documentation and porting guide to ensure that this project can scale and, of course, port more art-oriented applications.

For improving the documentation, I ported Sugar’s official “hello world” and re-wrote the porting guide based on this application. By using this minimal application as an example, it becomes much easier to highlight the key porting steps and concepts. I also took the opportunity to update the application itself to the latest version of the Sugar toolkit.

As for porting new applications, I didn’t get to port as many art-oriented applications as I wished. Mostly due to the fact that most of those are still using GTK2 and Python2, so it would require more time I can afford at the moment. Nevertheless, I ported some pretty awesome ones.

Paint is a playful painting application. It provides all the classic tools a young learner would expect, e.g. brushes, shapes, text, transformations, adding images, etc. Plus, it can enable sounds to make the experience extra funny.

Pukllanapac is a Rubik’s Cube-like game. The objective is for the learner to exercise their problem solving skills. The application has different patterns for circles, triangles, and hexagons.

Solar System is an interactive visualization. The goal is encourage the learner to know more about the planets and their moons. In words of the original developer of this application (@cvgarciarea) :

It is my hope that this tool serves as a practical and interactive way to explore astronomy.

It’s worth noticing that he was one of the early young Sugar hackers that showed up, when the Uruguayan government introduced OLPC nation wide.

Swift Feet provides a series of entertaining physical activities. It encourages  the learner to stay active. Includes exercises and dances. This application was originally designed for OLPC Canada in collaboration with ParticipACTION Canada and Ophea organizations.

Sugar Chess is a friendlier front-end for gnuchess. Its features go beyond and above other popular chess applications, e.g. allows the learner to customize the graphics, replay matches, use different modes, and more.

Moving forward

There’re still plenty of applications that need to be ported but, for the time being, I need to find a better way to monitor these twenty five applications that were ported so far.

I have discussed the idea of a developer Dashboard with Flathub’s maintainers but, for the short term, I might end up hacking something quick for my own needs.

Another imminent task is to update the BaseApp and all applications to the latest GNOME runtime, but this should be trivial. If anyone is interested in learning about packaging applications with Flatpak this task could be good a opportunity, so feel free to contact me!

 

GUADEC 2020 and Flatseal 1.6.1

GUADEC 2020

Two weeks ago, I had the chance to share my experiences Flooding the desktop with learning tools, with the wider GNOME community at GUADEC Even though the event went online for the first time, due to COVID-19, it went pretty smooth!

The event was full of great talks, including many from former colleagues, Archaeology of Accessibility by @ebassi, Parental controls in GNOME by @pwithnall, What’s new with JavaScript in GNOME by @ptomato, Communication Hacks by @1nuritzi and many, many others.

The social hours were hilarious and was great to see so many familiar faces. I am really hoping that, whenever we go back to physical events, we can still keep this online experience for those unable to assist.

Flatseal 1.6.1

Since the previous release, I have been slowly making improvements and have finally collected enough of these for a new release.

What’s new?

I started with a second pass on the big refactor I made for 1.6.0. I finally got rid of some “evolutionary” leftovers, and made all the individual permissions models even more self-contained. Again, this makes things much easier to extend and maintain.

Before I move on to the user-visible work, a few words about this project. Flatseal uses overrides as its backend to modify permissions, but it’s really more than just a graphical version of flatpak-override command-line tool. What I am (at least) trying to do with this project is to provide an improved experience for how Flatpak users interact with their applications permissions.

The most noticeable change in this release happens to be a good example of that.

This release adds support for session-bus and system-bus overrides. Users can remove, add or modify existing bus names. Thanks to @digitalethics for requesting this feature.

Being able to modify an existing bus name without having to explicitly think in terms of removing an existing name and adding a new one, seems trivial, but it’s quite an improved experienced already. The model is “smart” enough to detect these changes and translate these properly to one or more overrides. Like this, every switch and text entry in Flatseal went through these kind of considerations.

This release also adds other minor changes, including a fix for cases where applications icons were missing (e.g. for LibreOffice), a small change in the permissions groups labels to match even closer the terms used in flatpak-run and flatpak-override (e.g. “allow” instead of “features“), a fix that prevents Flatseal from crashing when multiple versions of libhandy are available (e.g. when running non-flatpak versions of Flatseal) by @fushinari , among other even minor fixes.

What’s next?

As I mentioned in my previous blog post, my short term goal was to keep adding support for more overrides. Now that Flatseal has almost reached feature-parity with flatpak-override, and that the model representation is way more readable, I will start to reach out to some people from the community to see if they would be interested in seeing Flatseal model moved into a separate library. Help will be welcome!

Last but never least, special thanks to @eson57, @AsciiWolf, @ovari@cho2 , @Vistaus and others for keeping Flatseal translations up to date.

Recipes Hackfest 2018

GNOME and Endless have two similar apps, GNOME Recipes and Endless Cooking. Recipes specializes in sharing recipes between its users, by allowing them to add new recipes from the app, but the way it distributes the content is rudimentary. On the other hand, Cooking, specializes in distributing existing recipes. The distribution of this content is done with the Endless Knowledge framework and is used successfully in dozens of other Endless apps but, it is not possible to contribute new recipes from the app.

GNOME Recipes
Endless Cooking

Based on that, it was clear that both teams had a lot to share and learn from each other so, we held a hackfest at the University of AMIKOM in Yogyakarta, which kindly provided everything we needed.

From the GNOME Recipes team we had Matthias, Emel and Ekta, from the Endless team we had Philip, Emmanuele, Cosimo, Jonathan and me, and from the community we had  Umang, Ahmad, Kukuh and Siska. We also had students attendants from the university.

GNOME and Endless teams

On the first day of the hackfest both teams showed their apps. These presentations helped everyone in the room to understand the strengths and weaknesses of each app and, more importantly, to present the topics that we wanted to cover during the hackfest. The main conclusion of this session was that Recipes should use the Endless content library, and that we would aim to have this for GUADEC. Additionally, Philip did a demo about the Endless content libraries, taking an existing online content source and having it running in a native app. We also discussed ways of introducing more recipes from the local community into Recipes.

Philip writing goals

On the second day, we moved to the details of the front-end. Emmanuele talked about Emeus which triggered the discussions about the Layouts and Cards from the Endless Knowlegde framework. The conclusion was that it would beneficial to separate the Card implementation from the framework so it could be reused in other places like the Recipes app, GNOME Software and even other components of the Endless desktop. After that, we moved on hacking things. Philip started to reproduce the Recipes UI using the Endless framework, while I started converting the Recipes database into an Endless framework content.

On the last day, we showed what we hacked the previous day. I started by showing the converted Recipes database running in different Endless apps, Cosimo showed a Karaoke app that he bundled using flatpak, and Philip showed his recreation of the Recipes UI running with the converted database that I made, which looked incredibly similar and amazing.

Home page of the Recipes UI recreation using Endless framework
Real Recipes content

This exercise of recreating the Recipes app using the Endless framework was extremely helpful, because it revealed the places where we should improve our libraries to make these more flexible for new types of contents. On a personal level, this was the most productive hackfest I have attended. It gave me new directions on how to improve the tools that I am working on. Plus, it helped me to connect and to meet with a lot of new people from the community.

I really want to thank the GNOME Foundation for sponsoring my travel to Indonesia, from Paraguay, and to my employer Endless for giving me the time to attend to the hackfest.