Tuesday, September 6, 2022

Maps goes four

 Just in time for the GNOME 43 release (the hard code freeze started this past weekend) the porting of Maps to GTK 4, using our new libshumate map rendering library has arrived at a working status

Earlier in the summer it became apparent that maintaining Maps using the technologies (GTK 3 and libchamplain) would became troublesome in GNOME 43, since other dependencies (such as libgweather and geocode-glib) was being ported to use the libsoup version 3 API/ABI (libsoup is the HTTP library used in the GNOME software stack). And libchamplain is still on libsoup 2.x (Corentin Noël prepared a merge request porting libchamplain to libsoup 3, but especially if we would support parallel-installable version of it using either libsoup API would mean extra work on a library, using the deprecated Clutter technology, which we probably would best avoid).

 So I took the decision to try and take the chances at racing the clock finishing the GTK4 port before September…

I decided to make it as a two-step rocket. First finishing porting to GTK4 and libshumate while still depending on libsoup 2 (building all the dependencies bundled locally in the development Flatpak manifest using libsoup2 build flags).

And then at the second stage switch over to using libsoup 3 (this mean also start using a newer version of the librest library that we use when accessing the OpenStreetMap API for editing POIs).

We only overhot the deadline for making UI changes before the release by a few days, but did get an exception from the release team (and a “blanket” exception for making smaller follow-up fixes up until the last RC before the release).

At this point I also found out that the latest librest has dropped support for OAuth 1…

So as a last push I had to migrate the OSM authentication to use OAuth 2. Which is something I have been intending to get done anyway eventually, as the use of OAuth 1 is discouraged as it has flaws…

Christopher Davis has also stepped up and helped out “evening out” some sharp edges after the initial GTK4 port (including using the libadwaita about dialog as shown above).

The layers menu has also gotten a bit of refresh to fit in better with newer styles used by GNOME core apps.

And the search results popover follows the new style without the “beak” pointing to the entry, as other content-completing widgets use nowadays.

There are still some rough edges when it comes to the place “info bubbles”.

The margins are a bit excessive and the bubbles don't always resize vertically as much as would be desired to avoid scrolling to see the Wikipedia summary as in this case. Also the thumbnail isn't flush on the edge as it was with GTK3, there's something missing with that custom CSS, or something like that…

There's also some GTK warning printed out on the console (which you would see when running from GNOME Builder…).

On the positive note, now we get the drop shadow beneath the bubble. Previously when using Clutter we didn't get that due to reasons down to how Clutter stages where emedded into GTK widgets).

The ”Export to image“ dialog (maybe the term is a bit weird, but renaming it to something better like “Save as image” would have to wait as the string freeze is affect now…) did (at least for the time being) loose the ability to “filter out” markers. Also the sizing of the preview thumbnail could use some tweaking. In fact this whole dialog would probably benefit from a rehaul, but that would have to be for some other day…

On the other hand on a positive note we now finally get the license information down in the corner “etched into“ the image when saving, something that never worked before and is probably a breach of OpenStreetMap's license if you put things to its edge.

Some other points worth noting is that the pinch gesture for zooming on touch screens and using touch pads now finally works in a decent way (it kinda worked with libchamplain, but without any intermediate feedback while the gesture is being performed, so it was always a bit of hit-and-miss in the blind. This is in part thanks to the support of fractional zoom levels in libshumate.

Speaking of which the fractional zoom level support will even more come to its right one day when we start using vector tiles with local rendering. As then labels will be able to stay sharp at all levels. Right now with raster tiles the non-integer levels gets a bit blurry. But zoom with the keyboard shortcuts, or using the zoom buttons goes in integer steps (but still with animation).

And one last thing, the map background context menu can finally be opened with long-press on touch.

And I would also like to once again shout out to, in particular James Westman and Corentin Noël for their amazing work on libshumate. Without which, nothing of this would have been possible.

Anyways, now I will try to take some rest for a while 😎

Until next time, stay safe!

No comments:

Post a Comment