Digital Wellbeing Contract

This month I have been accepted as a contractor to work on the Parental Controls frontent and integration as part of the Digital Wellbeing project. I’m very happy to take part in this cool endeavour, and very grateful to the GNOME Foundation for giving me this opportunity – special thanks to Steven Deobald and Allan Day for interviewing me and helping me connect with the team, despite our timezone compatibility 😉

The idea is to redesign the Parental Controls app UI to bring it on par with modern GNOME apps, and integrate the parental controls in the GNOME Shell lock screen with collaboration with gnome-control-center. There also new features to be added, such as Screen Time monitoring and setting limits, Bedtime Schedule and Web Filtering support. The project has been going for quite some time, and there has been a lot of great work put into both designs by Sam Hewitt and the backend by Philip Withnall, who’s been really helpful teaching me about the project code practices and reviewing my MR. See the designs in the app-mockups ticket and the os-mockups ticket.

We started implementing the design mockup MVP for Parental Controls, which you can find in the app-mockup ticket. We’re trying to meet the GNOME 49 release deadlines, but as always it’s a goal rather than certain milestone. So far we have finished the redesign of the current Parent Controls app without adding any new features, which is to refresh the UI for unlock page, rework the user selector to be a list rather than a carousel, and changed navigation to use pages. This will be followed by adding pages for Screen Time and Web Filtering.

Refreshed unlock page
Reworked user selector
Navigation using pages, Screen Time and Web Filtering to be added

I want to thank the team for helping me get on board and being generally just awesome to work with 😀 Until next update!

Taking out the trash, or just sweeping it under the rug? A story of leftovers after removing files

There are many things that we take for granted in this world, and one of them is undoubtedly the ability to clean up your files – imagine a world where you can’t just throw all those disk space hungry things that you no longer find useful. Though that might sound impossible, turns out some people have encountered a particularly interesting bug, that resulted in silent sweeping the Trash under the rug instead of emptying it in Nautilus. Since I was blessed to run into that issue myself, I decided to fix it and shed some light on the fun.

Trash after emptying in Nautilus, are the files really gone?

It all started with a 2009 Ubuntu launchpad ticket, reported against Nautilus. The user found 70 GB worth of files using disk analyzer in the ~/.local/share/Trash/expunged directory, even though they had emptied it with graphical interface. They did realize the offending files belonged to another user, however, they couldn’t reproduce it easily at first. After all, when you try to move to trash a file or a directory not belonging to you, you would usually be correctly informed that you don’t have necessary permissions, and perhaps even offer to permanently delete them instead. So what was so special about this case?

First let’s get a better view of when we can and when we can’t permanently delete files, something that is done at the end of a successful trash emptying operation. We’ll focus only on the owners of relevant files, since other factors, such as file read/write/execute permissions, can be adjusted freely by their owners, and that’s what trash implementations will do for you. Here are cases where you CAN delete files:

– when a file is in a directory owned by you, you can always delete it
– when a directory is in a directory owned by you and it’s owned by you, you can obviously delete it
– when a directory is in a directory owned by you but you don’t own it, and it’s empty, you can surprisingly delete it as well

So to summarize, no matter who the owner of the file or a directory is, if it’s in a directory owned by you, you can get rid of it. There is one exception to this – the directory must be empty, otherwise, you will not be able to remove neither it, nor its including files. Which takes us to an analogous list for cases where you CANNOT delete files:

– when a directory is in a directory owned by you but you don’t own it, and it’s not empty, you can’t delete it.
– when a file is in a directory NOT owned by you, you can’t delete it
– when a directory is in a directory NOT owned by you, you can’t delete it either

In contrast with removing files in a directory you own, when you are not the owner of the parent directory, you cannot delete any of the child files and directories, without exceptions. This is actually the reason for the one case where you can’t remove something from a directory you own – to remove a non-empty directory, first you need to recursively delete all of its including files and directories, and you can’t do that if the directory is not owned by you.

Now let’s look inside the trash can, or rather how it functions – the reason for separating permanently deleting and trashing operations, is obvious – users are expected to change their mind and be able to get their files back on a whim, so there’s a need for a middle step. That’s where the Trash specification comes, providing a common way in which all “Trash can” implementation should store, list, and restore trashed files, even across different filesystems – Nautilus Trash feature is one of the possible implementations. The way the trashing works is actually moving files to the $XDG_DATA_HOME/Trash/files directory and setting up some metadata to track their original location, to be able to restore them if needed. Only when the user empties the trash, are they actually deleted. If it’s all about moving files, specifically outside their previous parent directory (i.e. to Trash), let’s look at cases where you CAN move files:

– when a file is in a directory owned by you, you can move it
– when a directory is in a directory owned by you and you own it, you can obviously move it

We can see that the only exception when moving files in a directory you own, is when the directory you’re moving doesn’t belong to you, in which case you will be correctly informed you don’t have permissions. In the remaining cases, users are able to move files and therefore trash them. Now what about the cases where you CANNOT move files?

– when a directory is in a directory owned by you but you don’t own it, you can’t move it
– when a file is in a directory NOT owned by you, you can’t move it either
– when a directory is in a directory NOT owned by you, you still can’t move it

In those cases Nautilus will either not expose the ability to trash files, or will tell user about the error, and the system is working well – even if moving them was possible, permanently deleting files in a directory not owned by you is not supported anyway.

So, where’s the catch? What are we missing? We’ve got two different operations that can succeed or fail given different circumstances, moving (trashing) and deleting. We need to find a situation, where moving a file is possible, and such overlap exists, by chaining the following two rules:

– when a directory A is in a directory owned by you and it’s owned by you, you can obviously move it
– when a directory B is in a directory A owned by you but you don’t own it, and it’s not empty, you can’t delete it.

So a simple way to reproduce was found, precisely:

mkdir -p test/root
touch test/root/file
sudo chown root:root test/root

Afterwards trashing and emptying in Nautilus or gio trash command will result in the files not being deleted, and left in the ~/.local/share/Trash/expunged, which is used by the gvfsd-trash as an intermediary during emptying operation. The situations where that can happen are very rare, but they do exist – personally I have encountered this when manually cleaning container files created by podman in ~/.local/share/containers, which I arguably I shouldn’t be doing in the first place, and rather leave it up to the podman itself. Nevertheless, it’s still possible from the user perspective, and should be handled and prevented correctly. That’s exactly what was done, a ticket was submitted and moved to appropriate place, which turned out to be glib itself, and I have submitted a MR that was merged – now both Nautilus and gio trash will recursively check for this case, and prevent you from doing this. You can expect it in the next glib release 2.85.1.

On the ending notes I want to thank the glib maintainer Philip Withnall who has walked me through on the required changes and reviewed them, and ask you one thing: is your ~/.local/share/Trash/expunged really empty? 🙂

Using Portals with unsandboxed apps

Nowadays XDG Desktop Portal plays an important part in interaction between apps and the system, providing much needed security and unifying the experience, regardless of the desktop environment or toolkit you’re using. While one could say it was created for sandboxed Flatpak apps, portals could bring major advantages to unsandboxed, host apps as well:

– Writing universal code: you don’t need to care about writing desktop-specific code, as different desktops and toolkits will provide their own implementations

– Respecting the privacy of the user: portals use a permission system, which can be granted, revoked and controlled by the user. While host apps could bypass them, user can still be presented with dialogs, which will ask for permission to perform certain actions or obtain information.

Okay, so they seem like a good idea after all. Now, how do we use them?

More often than not, you don’t actually have to manually call the D-Bus API – for many of the portals, toolkits and desktop will interact with them on your behalf, exposing easy to use high-level APIs. For example, if you’re developing an app using GTK4 on GNOME and want to inhibit suspend or logout, you would call gtk_application_inhibit  which will actually prefer using the Inhibit portal over directly talking to gnome-session-manager. There are also convenience libraries to help you, available for different programming languages.

That sounds easy, is that all? Unfortunately, there are some caveats.

The fact that we can safely say that flatpaks are first-class citizen when interacting with portals, compared to host apps, is a good thing – they offer many benefits, and we should embrace them. However, in the real world there are many instances of apps installed without sandbox, and the transition will take time, so in the meantime we need to make sure they play correctly with portals as well.

One such instance is the getting the information about the app – in flatpak land, it’s obtained from a special .flatpak-info file located in the sandbox. In the host apps though, xdg-desktop-portal tries to parse the app id from the systemd unit name, only accepting “app-” prefixed format, specified in the XDG standardization for applications. This works for some applications, but unfortunately not all, at least at this time. One such example is D-Bus activated apps, which are started with “dbus-” prefixed systemd unit name, or the ones started from the terminal with even different prefixes. In all those cases, the app id exposed to the portal is empty.

One major problem, when xdg-desktop-portal doesn’t have access to the app-id, is undoubtedly failure of inhibiting logout/suspend when using the Inhibit portal. Applications on GNOME using GTK4 will call gtk_application_inhibit, which in turn calls xdg-desktop-portal-gtk inhibit portal implementation, which finally talks to the gnome-session-manager D-Bus API. However, it requires app-id to function correctly, and will not inhibit the session without it. The situation should get better in the next release of gnome-session but it could still cause problems for the user, not knowing the name of the application that is preventing logout/suspend.

Moreover, while not as critical, other portals also rely on that information in some way. Account portal used for obtaining the information about the user will mention the app display name when asking for confirmation, otherwise will call it the “requesting app”, which the user may not recognize, and is more likely to cancel. Location portal will do the same, and Background portal won’t allow autostart if it’s requested.

GNOME Shell logout dialog when Nautilus is copying files, inhibiting indirectly via portal

 

How can we make sure our host apps play well with portals?

Fortunately, there are many ways to make sure your host app interacts correctly with portals. First and foremost, you should always try to follow the XDG cgroup pathname standardization for applications. Most desktop environments already follow the standard, and if they don’t, you should definitely report it as a bug. There are some exceptions, however – D-Bus activated apps are started by the D-Bus message bus implementations on behalf of desktops, and currently they don’t put the app in the correct systemd unit. There is an effort to fix that on the dbus-broker side, but these things take time, and there is also the case of apps started from the terminal, which have different unit names altogether.

When for some reason your app was launched in a way that doesn’t follow the standard, you can use the special interface for registering with XDG Desktop Portal, the host app Registry, which overwrites the automatic detection. It should be considered a temporary solution, as it is expected to be eventually deprecated (with the details of the replacement specified in the documentation), nevertheless it lets us fix the problem at present. Some toolkits, like GTK, will register the application for you, during the GtkApplication startup call.

There is one caveat, though – it needs to be the first call to the portal, otherwise it will not overwrite the automatic detection. This means that when relying on GTK to handle the registration, you need to make sure you don’t interact with the portal before the GtkApplication startup chain-up call. So no more gtk_init in main.c, which on Wayland uses Settings portal to open display, all such code needs to be moved just after the application startup chain-up. If for some reason you really cannot do that, you’ll have to call the D-Bus method yourself, before any portal interaction is made.

The end is never the end…

If you made it this far, congratulations and thanks for taking this rabbit hole with me. If it’s still not enough, you can check out the ticket I reported and worked on in nautilus, giving even more context to how we ended up here. Hope you learned something that will make your app better 🙂

GSoC 2022: Overview

Introduction

Throughout this summer I’ve been working on making the New Documents feature discoverable in Nautilus, a file manager for GNOME as part of the GSoC project. This post is an overview with links of the work I did together with my mentor Antonio Fernandes.

Results

For the project I was supposed to resolve the discoverability problem of this feature – when there are no templates in the Templates directory, the new document menu is not shown, and many users don’t know about its existence. Below is a list of steps I’ve taken to fulfill that quest:

 

  1. Planning – first we had to establish a schedule for our work
  2. Research – then we had to do some research about how others implement this feature
  3. Design – afterwards we had to design a mockup for the improved feature
  4. Code – at last a prototype was made, and after several design iterations, a final MR was submitted and merged to a feature branch (not master yet), during that phase I also presented at GUADEC

 

Future

While the short term solution is implemented in a feature branch, it’s still not a final one – we need to keep iterating on the design, perform usability testing, get more feedback, before we implement it in master branch and it can reach the users. There is also a long term plan detailed in the mockups – it’s an ambitious one that requires changes across the app ecosystem, but some day the work towards it needs to start, and I’m going to aim towards it. I’m also planning on keeping contributing to Files, as well as other core GNOME apps written in C.

Conclusion

This GSoC project has been an amazing journey – I expanded my knowledge of C, Glib, GTK, Libadwaita, and the internals of Files. I also learned how to do proper research with Boxes, use Inkscape for creating mockups, ask for designer feedback, and how to use Builder to create magic.

I would like to thank my mentor Antonio Fernandes for answering my questions and guiding me through the project, as well as Tobias Bernard, Allan Day and Michaël Bertaux for designer feedback.

GSoC 2022: Fourth update – Code

Introduction

I published my last blog post about the design phase of my GSoC project on 17 July. It’s been a month, and it’s been far from uneventful. I’m going to talk about the first prototype and my short presentation at GUADEC, as well as the review from designers and the result of it – the new mockup and the second prototype.

First prototype and GUADEC

Following the old mockup from my last update, I prepared the first prototype of the revamped New File menu; it wasn’t really functional but served its main purpose as something that the designers at mini-GUADEC could test and review. Speaking of GUADEC, I took part in the Intern Lightning Talks where I presented the old mockup – you can watch my presentation on YouTube.

Me presenting the old mockup at GUADEC Intern Lightning Talks

Review at mini-GUADEC

Equipped with the old mockup and the first prototype, my mentor Antonio Fernandes presented the work at mini-GUADEC satelite event to the designers, and we got following feedback:

 

  • Templates functionality in the file manager is an exotic feature – as the feature matrix from the research phase shows, no other file browser is doing it (except elementary). At the same time, completely removing this feature was discarded because some people rely on it a lot, so the consensus was to keep it but not promote it too much, which means dropping the “no templates” empty state
  • The “+” button in the headerbar was discarded
  • The ideal situation would be for every editor app to accept a path to a new file and take care of everything. Then, in Files, when creating a new file in a folder, we would only have to ask the user which app they wanted to create the new file with. However, this requires changes across the ecosystem, so it’s not a short-term plan

 

New mockup and second prototype

After additional discussions in the project chatroom, we’ve come up with the following new mockup adhering to the feedback:

For more information check out the Whiteboards issue.

Here are the screenshots of the second prototype (merge request) implementing the above mockup:

Conclusion

During this month we’ve iterated on the mockup and made two prototypes, I presented the project at GUADEC, and even made my first review in an effort to help with the Nautilus beta release – I’m very pleased with how the project is going and how it helped me find my place in the GNOME community 🙂 As for what’s next, the MR needs to be reviewed and we’ve got usability testings to do, so hang tight until the future updates!

GSoC 2022: Third update – Design

Introduction

It’s been a while since my last update, in which I’ve shared my research about the underlying problem and use cases of the “New Document” feature, regarding its discoverability and ease of use, as part of my Nautilus GSoC Project. Since then I’ve been focusing on the following phase of the project: “Design a mockup based on aforementioned research”, and I’m here today to share the results with you.

Use cases

Figuring out hypothetical user profiles and their use cases could prove really helpful in designing and refining prototypes, so together with my mentor Antonio Fernandes we’ve come up with the following examples:

User profile 1 – Programmer

A programmer or system administrator with a repertoire of many pre-made code snippets/basic scripts for a variety of needs.

Use case: has to create source/script files at specific locations with the premade content.

User profile 2 – Computer science student

An aspiring programmer, who attends classes where they learn about the  basics of programming or operating systems.

Use case: writes simple code in text editors, and needs to create many empty text files with a specific extension, i.e. “.c”, in specific directories representing classes, i.e. fundamentals-of-programming/lesson-1

User profile 3 – Teacher

A teacher at school with a collection of many different materials for different classes and groups of students.

Use case: has to manage worksheets, documents and presentations in order of subjects, classes or groups of students; and accomplish that by creating directories with a topic name, and creating empty documents in that directory which they immediately want to edit.

Discussing the templates layout

While we were pondering over how to best tackle the discoverability of the “New Documents” feature in the design chat room, one interesting idea strongly stood out – changing the implementation of templates so that they have a layered structure (in the same spirit as systemd unit files), and so not only users could be able to create them, but also distributions, apps, and even administrators:

 

  • /usr/share/xdg/templates – distro/app packaging, when applications install template files on the system, this is the location where they are placed by default
  • /etc/xdg/templates – site customization, templates found in this directory take precedence over any of the other locations on the filesystem, this is where administrators create new templates, but also where they can create ones that override those provided by applications
  • $HOME/.Templates, or $HOME/.local/share/xdg/templates, or $HOME/.local/ – basically, nautilus should ignore XDG_TEMPLATES_DIR (Templates), and mark it as deprecated

 

One would of course need to figure out how to handle sandboxed applications in that case, so the overall concept is definitely a long term goal.

Mockup

After considering amount of discussion and pointers gained at the gnome-design chat room and the tremendously helpful input from Michael Bertaux in the whiteboard issue, we’ve currently developed the following mockup:

Do note that it’s by no means final – it could be iterated on many times after I prepare a code prototype or perform the usability testing, etc. I’ve actually presented two ideas there, one building up on the other – the top half part of the mockup is the short term plan, that I aim to implement during the project, and the bottom half shows the long term plan, that could be a follow up in the future. There are many things happening even considering the short term idea, so I’ll try to go over some of the most important ones:

Combining “New Folder” and “New Document” features in one single “New” menu

The research showed that almost all of the implementations moved the “New Folder” entry into a “New” submenu, which makes sense, considering there are often more features in that menu, like “New Link” (or even “New Zip” in one case), which would otherwise clutter the main context menu. So I followed that suggestion in my mockup, and in the image of the web apps, added a “+” button on the header bar, to make sure that the number of mouse clicks needed to access the “New Folder” feature stays the same, for it to become even more discoverable.

Default templates for most common types of files

Another conclusion we’ve drawn from the research is that the user may expect to be able to create new files without configuring anything prior themself. With that in mind, we would show special, default, empty file types in the menu if the user has appropriate applications installed – a text editor, and office suite.

Custom templates dialog

In order to fix the discoverability problem of the custom templates feature, we’ve come up with a dialog with a helpful empty state, in which users can easily import new templates. Such templates can also be searched, and we’re planning to extend the mockup to include the “edit” mode that will allow for removing or editing them as well. Each template would have an icon based on its MIME file type, and users would be able to instantly rename them after or when they  create them (same for the common empty file types).

Long term vision

Considering future expansion, the design proposal includes the app templates, which allows for more than just the text editor and office suite to provide empty templates for each file type. There’s also the matter of custom non-empty app templates, but we’re currently wondering whether that’s something to be handled only on the applications side.

Adjusting the timeline

Since most of the design pointers exchange has been asynchronous, the design process took a little longer than we expected – that’s why we’ve updated the timeline of the project:

 

  1. Research the underlying problem and use cases (3 weeks) – 12.06-03.07
  2. Design a mockup based on aforementioned research (½ week) – 03.07-07.07
  3. Code prototype iteration in a development branch (2 weeks) – 07.07-19.07
  4. Test and review the prototype iteration (1½ week) – 20.07-31.07
  5. Open a Merge Request to merge the development branch to the master branch (4 days) – 31.07-04.08

 

I’ve neglected the blog a little though among all of the tasks, as I’m already in the “code prototype” phase, but better late than never :’D

Conclusion

Thanks to the research and help we got both in the design chat room as well as the Whiteboard issue, we’ve managed to prepare a solid mockup, part of which I’ll implement in the next (current) stage of the project. We’ve also prepared some user profiles that will be helpful in the future review, discussed changing the layout of templates overall, and adjusted the schedule. Now it’s finally time to write some code, see you in the next update 🙂

GSoC 2022: Second update – Research

Introduction

Two weeks have passed since I started the first phase of my “Make New Documents feature discoverable” Nautilus GSoC project. It’s called “Researching the underlying problem and use cases”, and according to the timeline that was set up in my last planning post, I’m here to share our findings and results.

Why do the research

Before we start revamping/fixing issues with our implementation of the “New Document” feature, it’s essential that we look into other operating systems, file managers, and web apps, to see how they approach allowing the user to create files. Do not be mistaken – the intention is not to blindly copy them, but to take inspiration from them, identify potential problems with specific solutions, and find out what users may expect from us. If there’s a clear trend in some approach, there may be a valid reason to implement it. We don’t exist in a vacuum, and we are definitely able to learn from the accomplishments or mistakes of others.. Everybody, in some way or the other, builds up on their predecessors work, and continues the everlasting chain of inspiration and creation. While doing the research one needs to take into account the different types of problems they are trying to solve and specific kinds of users that they need to focus on.

List of software to test

And so I put on my spying disguise and began my journey through the multiverse of different Operating system’s file managers and web apps:

  • Other Operating Systems
    • Windows 11 File Explorer
    • macOS 12 Finder
    • ChromeOS Files
  • Other Linux distributions
    • KDE’s Dolphin
    • Deepin File Manager
    • elementaryOS Files
  • Web apps
    • Google Drive
    • Dropbox
    • Microsoft Onedrive
    • Apple iCloud
    • Nextcloud
    • GitLab file tree web UI  — templates are offered by the text editor after creating new file

Some of them, like macOS 12 Finder, Apple iCloud and CrOS don’t have the “New Document” feature at all – they rely on an application-centric model, therefore they are ignored in the rest of the post.

Enter the matrix, (KDE) Neo(n)!

Putting a stop to the movie references here – we’ve quickly identified several common features across different implementations, and to avoid repetition, we’ve summarized them in the following matrix:

Pretty pictures

If all you wanted from this post are fancy screenshots, here are the goodies. I’ve divided the screenshots not by the implementation itself, but rather by the features I’ll be referring to.

“New” menu containing a “New Folder” submenu

All of the tested implementations except for Deepin Files moved the “New Folder” entry into a “New” submenu, which could be something we might consider doing as well. If we move the “New Folder” item into a “New” menu, we should also add a [ + ] menu button to the headerbar, since all of the web apps have one.

Windows 11 File Explorer groups the “New Folder” feature together with creating other files in one single “New” menu. Among others, it also allows creating empty zip archives no-questions-asked, perhaps because they are treated as normal folders, i.e. user can double click and “enter” them in the file explorer.

elementaryOS Files “New” menu which allows creating folders

KDE Dolphin “Create New” feature which offers “New Folder” option, among others

Gitlab file tree web UI also groups “New File” with “New directory” in one specific “+” menu, as all of the other web solutions do.

Links

KDE Neon 5.25 Dolphin, Windows 11 File Explorer and Dropbox add a “New Link” entry to the “New” menu which allows you to create a link to a file. Nautilus doesn’t even show the option to create links by default, perhaps this way of creating links is more intuitive than copy->paste link. It could be interesting to consider adding it to the “New” menu, since there may be a discoverability problem with links as well. It would require a whole new dialog, so unfortunately it’s out of scope of this project.

KDE Neon 5.25 Dolphin allows creating links from the “Create New” menu.

Windows 11 File Explorer opens a link wizard after selecting the “Create Shortcut” option.

Default entries

One of the conclusions is that the new text files and new office documents are both common features users can fairly expect us to have.

Deepin Files offering default templates for office documents and plain text files

Google Drive also creates a shortcut to each editor application’s “choose template” functionality, and there are even more default templates in the “more” submenu

OneDrive showing default templates in its specific format

Dropbox allowing to choose a specific format when selecting a general default file type

Nextcloud showing many default templates

Templates directory

Deepin 20 File Manager preserves the Templates directory functionality, but hides the directory as .Templates, while KDE Neon 5.25 Dolphin ignores the Templates directory altogether and requires creating .desktop files in .local/share/templates directory pointing to the templates, wherever they are. Although there are implementations using it, the XDG Templates directory seems not to be that much of a standard after all – XDG_DIR_TEMPLATES is a standard location, but it doesn’t look like it mandates any special behaviour at all. We are free to change how the Templates integration works!

elementaryOS Files uses the XDG Templates directory to allow the user to add more “New File” entries, just like GNOME Files

Deepin Files hides the Templates (.Templates) directory, but the functionality remains.

KDE Dolphin ignores the XDG Templates directory altogether, requiring the user to create .desktop files in .local/share/templates directory pointing to the templates.

Adding more app templates

Google Drive allows the user to add more items than the default ones by guiding users through the installation of apps, which after installing add the templates to the “New” menu, which is something we could consider doing as well.

Renaming on creation

All of the implementations (except for Google Drive and Dropbox, which open the document handling app) immediately allow the user to rename files after creation, except for Nautilus. It’s outside of the scope of this project, but important to note nonetheless.

elementaryOS Files and Deeping Files allowing the user to immediately rename the created file

KDE Dolphin opening a dialog after creating a file in which user can change the filename

Immediately opening new files in the app

All of the web apps immediately open new files in their appropriate editor applications, while all of the non-web apps don’t.

Google Docs allowing the user to choose from different templates while creating a new file

Nextcloud allowing the user to choose from different templates or a blank file before opening it in a web app

Conclusion

The research highlighted many interesting things, including how unique GNOME Files is with not grouping the “New File” and “New Directory” features, how popular it is to include default templates for office and text files in other implementations, how XDG Templates “standard” is neglected, how often the other implementations allow for renaming the files on creation or how consistent web solutions are with providing a “+” button. There’s also the matter of discoverability of the “New Link” feature, but it’s out of the scope for my project. The next phase is “Designing a mockup based on aforementioned research”, which includes asking the design team for pointers – that’s what I’ll be doing now, so I can prepare a design later. I also want to tremendously thank my mentor Antonio Fernandes, who’s credited for the awesome feature matrix, and most of the conclusions from the research. See you in the next update 🙂

GSoC 2022: First update – Planning

Introduction

This summer I’m contributing to Nautilus as part of GSoC, focusing on improving the discoverability of the new document feature. In this post I will describe how the project was split between me and Utkarsh, briefly go over the schedule established for my work, and briefly mention my current research in GNOME Boxes.

The split

The initial short project idea assumed that only one student was going to work on it, so when both me and Utkarsh Gandhi were accepted, we had quite an unexpected situation. Fortunately, the fact that the project had many stretch goals allowed us to split it so that both of us can work independently. The unexpected situation has taught us to share tasks in a meaningful way, which has made us all the more able to grow at our assignments, furthermore we have learned how to work without blocking each other’s progress. Most of the initial tasks that aim to revamp the UI and the code of the New Document menu go to Utkarsh, while I’m going to focus on the discoverability side and the default experience of the user, meaning what happens when there are no templates in the Templates directory.

Make “New Documents” feature discoverable

Finally, the subject of my project turned out to be about resolving the accessibility issue of this feature – when there are no templates in the Templates directory, the new document menu is not shown, and many users don’t know about its existence. They completely ignore the Templates directory, not knowing what it does and just assuming it’s one of those “just there” directories and files. Another thing I’ll take a look at is the ability to easily add templates, without the cumbersome process of creating and copying files. I’ll also reconsider the pros and cons of default templates.

Timeline

While it’s not final, because we’ve lost our crystal balls, here’s the current anticipated schedule I’ll be following:

  1. Research the underlying problem and use cases by looking at other implementations (operating systems, file managers, web apps) (2 weeks) – 12.06-26.06 (current)
  2. Design a mockup based on above research, adhering to GNOME HIG and designers review (1 week) – 26.06-03.07
  3. Code prototype iteration in a development branch that provides a meaningful empty state, makes sure the “new documents” menu item is always shown, and the user can add more templates (2 weeks) – 03.07-17.07
  4. Test and review the prototype iteration, refine the prototype based on feedback and repeat if necessary (2 weeks) – 17.07-31.07
  5. Open a Merge Request to merge the development branch to the master branch (4 days) – 31.07-04.08

Beginning of research

As I have started the first point of my timeline/schedule, I found myself in need of many virtual machines. Equipped with powerful yet simple and elegant GNOME Boxes, I managed to run 2 different operating systems on it:

  • ChromeOS Flex – knowledge gained on how to work with libvirt xml files allowed me to figure out how to get this web centric system running in Boxes. I have documented the necessary steps in this guide, but it definitely deserves a separate blog post.
  • Windows 11 thanks to this excellent guide.

Next to try are file managers from other linuxes, and web apps; already tested macOS Finder. My next GSoC update definitely won’t lack colorful pictures.

Conclusion

The project is coming along quite smoothly, with reasonable objectives and deliverables. We’ve managed to figure out how to split the project, establish a schedule for our work, and I’ve learnt how to use GNOME Boxes to test different implementations of the “New Document” feature. I found the community very helpful and welcoming, just like my mentor Antonio Fernandes who’s very understanding and patient 🙂

GSoC 2022: Introduction

Hello there!

My name is Ignacy Kuchciński and I’m studying computer science at UMCS in Lublin, Poland. I’ve been making minor contributions to GNOME over the past few years, and among the projects I was looking into was GNOME Files, a.k.a Nautilus. I learned about GSoC in #nautilus irc chat room as I observed the effort to port nautilus properties dialog to use GtkBuilder, and I really liked the idea of it – have a chance to make a more significant contribution and be a part of an awesome community on a deeper level. Fast-forward two years, I’ve applied to Nautilus for GSoC’22 and got accepted to help revamp the “New Document” submenu – an adventure I’m very excited to undertake.

The project

GNOME Files, also known as Nautilus, as many of you already know, is a file manager for GNOME. Its goal is to provide the user with a simple way to navigate and manage files.

One of its abilities, the New Document creation feature, is considered to be a part of core user experience, but its design implementation has room for improvement, especially in discoverability and usability. There are also further regressions to be addressed caused by the GTK 4 port.

For this project the idea is to design and implement a new UI for this feature, the main goals are following:

1. Exposing an entire tree of possible templates in a single view, instead of nested submenus.

2. Making use of visual representations of each template, such as icons, to help users find what they’re looking for.

3. Always showing the New Documents menu, even if the Templates directory is empty – in that case, offer the user the ability to add new templates, both pre-defined as well as custom.

4. Add the ability to search the list of templates.

5. Add the ability to quickly rename the newly created files.

I’ll be working in close cooperation with the Nautilus maintainer Antonio Fernandes who will be my mentor, GNOME design team, and with various user studies in mind. Initially, the project was supposed to have only one student working on it. However, in quite an unexpected turn of events, two interns were selected. As a result I’ll be working on this project together with Utkarsh Gandhi whom I congratulate for getting selected as well!

Nevertheless, the fact remains that the initial project was meant for a single person. Fortunately, there is a room for expansion: resolving the “no default templates” situation, which has a very big impact on the discoverability and ease of use of this feature. We’re still figuring our strategy, but one of the possible scenarios is one of us focusing on revamping the “New Document” submenu, and the other figuring out how to deal with the lack of initial templates.

Conclusion

I will keep track of my progress on this blog, and you can contact me on the GNOME IRC/Matrix on the #nautilus channel. I’m very excited to take part in this journey among the welcoming community and I look forward to contributing towards it. 🙂