<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>danigm.net - hackweek</title><link>https://danigm.net/</link><description></description><lastBuildDate>Fri, 22 Nov 2024 12:00:00 +0100</lastBuildDate><item><title>Hackweek 24</title><link>https://danigm.net/hackweek24.html</link><description>&lt;p&gt;&lt;center&gt;
    &lt;img src="/pictures/hackweek24.png" width="50%"/&gt;
&lt;/center&gt;&lt;/p&gt;
&lt;p&gt;It's the time for a new &lt;a href="https://hackweek.opensuse.org/"&gt;Hack Week&lt;/a&gt;. The Hack Week 24 was from
November 18th to November 22th, and I've decided to join the &lt;a href="https://hackweek.opensuse.org/projects/opensuse-welcome"&gt;New openSUSE-welcome&lt;/a&gt;
project this time.&lt;/p&gt;
&lt;p&gt;The idea of this project is to revisit the existing openSUSE welcome
app, and I've been trying to help here, specifically for the GNOME
desktop installation.&lt;/p&gt;
&lt;h2&gt;openSUSE-welcome&lt;/h2&gt;
&lt;p&gt;&lt;center&gt;
    &lt;img src="/pictures/opensuse-welcome.png" width="100%"/&gt;
&lt;/center&gt;&lt;/p&gt;
&lt;p&gt;Right now after installing any openSUSE distribution with a graphical
desktop, the user is welcomed on first login with a &lt;a href="https://github.com/openSUSE/openSUSE-welcome/"&gt;custom welcome app&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This custom application is a Qt/QML with some basic information and
useful links.&lt;/p&gt;
&lt;p&gt;The same generic application is used for all desktops, and for popular
desktops right now exists upstream applications for this purpose, so
we were talking on Monday morning about it and decided to use specific
apps for desktops.&lt;/p&gt;
&lt;p&gt;So for GNOME, we can use the &lt;a href="https://gitlab.gnome.org/GNOME/gnome-tour/"&gt;GNOME Tour&lt;/a&gt; application.&lt;/p&gt;
&lt;h2&gt;gnome-tour&lt;/h2&gt;
&lt;p&gt;&lt;center&gt;
    &lt;img src="/pictures/gnome-tour.png" width="100%"/&gt;
&lt;/center&gt;&lt;/p&gt;
&lt;p&gt;GNOME Tour is a simple rust/gtk4 application with some fancy images in
a slideshow.&lt;/p&gt;
&lt;p&gt;This application is generic and just shows information about GNOME
desktop, so I created a &lt;a href="https://github.com/openSUSE/gnome-tour"&gt;fork for openSUSE&lt;/a&gt; to do some openSUSE
specific customization and use this application as openSUSE welcome in
GNOME desktop for Tumbleweed and Leap.&lt;/p&gt;
&lt;p&gt;&lt;center&gt;
    &lt;img src="/pictures/gnome-tour-opensuse.png" width="100%"/&gt;
&lt;/center&gt;&lt;/p&gt;
&lt;h2&gt;Desktop patterns, the welcome workflow&lt;/h2&gt;
&lt;p&gt;After some testing and investigation about the current workflow for
the welcome app:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="https://code.opensuse.org/package/patterns-base/blob/master/f/patterns-base.spec#_861"&gt;x11_enhanced&lt;/a&gt; pattern recommends opensuse-welcome app.&lt;/li&gt;
&lt;li&gt;We can add a &lt;code&gt;Recommends: gnome-tour&lt;/code&gt; to the &lt;a href="https://code.opensuse.org/package/patterns-gnome/blob/master/f/patterns-gnome.spec#_240"&gt;gnome pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The application run using &lt;a href="https://specifications.freedesktop.org/autostart-spec/latest/"&gt;xdg autostart&lt;/a&gt;, so gnome-tour package
   should put the file in &lt;code&gt;/etc/xdg/autostart&lt;/code&gt; and set to hidden on
   close.&lt;/li&gt;
&lt;li&gt;In the case of having a system with multiple desktops, we can
   choose the specific welcome app using the &lt;code&gt;OnlyShowIn/NotShowIn&lt;/code&gt;
   &lt;a href="https://specifications.freedesktop.org/desktop-entry-spec/latest/recognized-keys.html"&gt;config in desktop file&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So I've created a &lt;a href="https://github.com/openSUSE/openSUSE-welcome/pull/43"&gt;draft PR&lt;/a&gt; to do not show the openSUSE-welcome
app in GNOME, and I've also the &lt;a href="https://build.opensuse.org/package/show/home:dgarcia:branches:GNOME:Next/gnome-tour"&gt;gnome-tour fork&lt;/a&gt; in my home OBS
project.&lt;/p&gt;
&lt;p&gt;I've been testing this configuration in Tumbleweed with GNOME, KDE and
XFCE installed and it works as expected. The openSUSE-welcome is shown
in KDE and XFCE and the gnome-tour app is only shown in GNOME.&lt;/p&gt;
&lt;p&gt;&lt;center&gt;
    &lt;img src="/pictures/gnome-tour-tumbleweed.png" width="100%"/&gt;
&lt;/center&gt;&lt;/p&gt;
&lt;h2&gt;Next steps&lt;/h2&gt;
&lt;p&gt;The next steps to have the GNOME Tour app as default welcome for
openSUSE GNOME installation are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Send forked &lt;code&gt;gnome-tour&lt;/code&gt; package to &lt;code&gt;GNOME:Next&lt;/code&gt; project in OBS.&lt;/li&gt;
&lt;li&gt;Add the &lt;code&gt;Recommends: gnome-tour&lt;/code&gt; to &lt;code&gt;patterns-gnome&lt;/code&gt; to &lt;code&gt;GNOME:Next&lt;/code&gt; project in OBS.&lt;/li&gt;
&lt;li&gt;Make sure that any other welcome application is &lt;a href="https://github.com/openSUSE/openSUSE-welcome/pull/43"&gt;not shown in GNOME&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Review openQA tests that expect opensuse-welcome and adapt for the
   new application.&lt;/li&gt;
&lt;/ol&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">danigm</dc:creator><pubDate>Fri, 22 Nov 2024 12:00:00 +0100</pubDate><guid isPermaLink="false">tag:danigm.net,2024-11-22:/hackweek24.html</guid><category>blog</category><category>gnome</category><category>work</category><category>suse</category><category>opensuse</category><category>hackweek</category></item><item><title>Hackweek 23</title><link>https://danigm.net/hackweek23.html</link><description>&lt;p&gt;&lt;center&gt;
    &lt;img src="/pictures/hackweek23.png" width="100%"/&gt;
&lt;/center&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://hackweek.opensuse.org/"&gt;Hack Week&lt;/a&gt; is the time SUSE employees experiment, innovate &amp;amp; learn
interruption-free for a whole week! Across teams or alone, but always without
limits.&lt;/p&gt;
&lt;p&gt;The Hack Week 23 was from November 6th to November 10th, and my project was to
gvie some &lt;a href="https://hackweek.opensuse.org/23/projects/gnome-love"&gt;love to the GNOME Project&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Before the start of the Hack week I asked in the GNOME devs Matrix channel,
what project needs some help and they gave me some ideas. At the end I decided
to work on the &lt;a href="https://gitlab.gnome.org/GNOME/gnome-calendar/"&gt;GNOME Calendar&lt;/a&gt;, more specifically, improving the test suite
and fixing &lt;a href="https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1093"&gt;issues related to timezones&lt;/a&gt;, DST, etc.&lt;/p&gt;
&lt;h2&gt;GNOME Calendar&lt;/h2&gt;
&lt;p&gt;&lt;center&gt;
    &lt;img src="/pictures/gnome-calendar.png" width="100%"/&gt;
&lt;/center&gt;&lt;/p&gt;
&lt;p&gt;GNOME Calendar is a &lt;a href="https://gtk.org/"&gt;Gtk4 application&lt;/a&gt;, written in C, that heavily uses the
&lt;a href="https://gitlab.gnome.org/GNOME/evolution-data-server"&gt;evolution-data-server&lt;/a&gt; library. It's a desktop calendar application with a
modern user interface that can connect handle local and remote calendars. It's
integrated in the GNOME desktop.&lt;/p&gt;
&lt;p&gt;The current gnome-calendar project has some unit tests, using the &lt;a href="https://docs.gtk.org/glib/testing.html"&gt;GLib testing
framework&lt;/a&gt;. But right now there are just a few tests, so the main goal right
now is to increase the number of tests as much as possible, to detect new
problems and regressions.&lt;/p&gt;
&lt;p&gt;Testing a desktop application is not something easy to do. The unit tests can
check basic operations, structures and methods, but the user interaction and
how it's represented is something hard to test. So the best approach is to try
replicate user interactions and check the outputs.&lt;/p&gt;
&lt;p&gt;A more sophisticated approach could be to start to use the accessibility stack
in tests, so it's possible to verify the UI widgets output without the need of
rendering the app.&lt;/p&gt;
&lt;p&gt;With gnome-calendar there's another point of complexity for tests because it
relies on the evolution-data-server to be running, the app communicates with it
using dbus, so to be able to do more complex tests we should mock the
evolution-data-server and we should create fake data for testing.&lt;/p&gt;
&lt;h2&gt;My contribution&lt;/h2&gt;
&lt;p&gt;By the end of the week I've created four &lt;a href="https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests?scope=all&amp;amp;state=all&amp;amp;author_username=danigm&amp;amp;label_name%5B%5D=Timezones"&gt;Merge requests&lt;/a&gt;, three of them
have been merged now, and I'll continue working on this project in the
following weeks/months.&lt;/p&gt;
&lt;p&gt;I'm happy with the work that I was able to do during this Hack Week. I've
learned a bit about testing with GLib in C, and a lot about the
evolution-data-server, timezones and calendar problems.&lt;/p&gt;
&lt;p&gt;It's just a desktop calendar application, how hard it could be? Have you ever
deal with dates, times and different regions and time zones? It's a nightmare.
There are a lot of edge cases working with dates that can cause problems,
operations with dates in different time zones, changes in dates for daylight
saving, if I've an event created for October 29th 2023 at 2:30 it will happens
two times?&lt;/p&gt;
&lt;p&gt;&lt;center&gt;
    &lt;img src="/pictures/gnome-calendar-issues.png" width="100%"/&gt;
&lt;/center&gt;&lt;/p&gt;
&lt;p&gt;A lot of problems could happen and there are a lot of bugs reported for
gnome-calendar related to this kind of issues, so working on this is not
something simple, it requires a lot of edge case testing and that's the plan,
to cover most of them with automated tests, because any small change could lead
to a bug related to time zones that won't be noticed until someone has an
appointment at a very specific time.&lt;/p&gt;
&lt;p&gt;And this week was very productive thanks to the people working on
gnome-calendar. Georges Stavracas reviews my MR very quickly and it was
possible to merge during the week, and Jeff Fortin does a great work with the
issues in gitlab and leading me to most relevant bugs.&lt;/p&gt;
&lt;p&gt;So after a week of going deep into the gnome-calendar source code it could be a
pity to just forget about it, so I'll try to keep the momentum and continue
working on this project, of course, I'll have just a few hours per week, but
any contribution is better than nothing. And maybe for the next summer I can
propose a Google Summer of Code project to get an intern working on this full
time.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">danigm</dc:creator><pubDate>Fri, 10 Nov 2023 00:00:00 +0100</pubDate><guid isPermaLink="false">tag:danigm.net,2023-11-10:/hackweek23.html</guid><category>blog</category><category>gnome</category><category>work</category><category>suse</category><category>opensuse</category><category>hackweek</category></item></channel></rss>