Mepo - March update: 0.4 Released

Message ID
DKIM signature
Download raw message
Hi all,

Welcome to the March monthly update for Mepo; covering the 0.4 release.
You can follow Mepo's development at http://sr.ht/~mil/mepo and do note
that release notes are also mirrored in the git annotated tags for each
release. Also note, the 0.4 release also has an associated demo video
of Mepo running on a postmarketOS/Phosh phone which can be seen at:


0.4 Release Notes:
- GPU-based rendering & HiDPI support
- Sxmo & Phosh support and UI improvements
- Gesture support improved: bind_gesture command & better defaults
- UI Buttons: bind_button command
- Misc UI improvements

Packaging status:
- Mepo is now built against Zig 0.9.1
- 0.4.1 MR for Alpine merged & package splitting
- Note on minor versioning

Supported Platforms & Note on other UIs/Platforms

Plans for 0.5:
- Save and restore state
- GPSD / Geoclue2 pin tracking / repositioning
- STDIN debugging & nonblocking / async shellpipe
- Bookmarking script


# 0.4 Release Notes

This release was focused on building out mobile support (for Phosh
and Sxmo primarily), which included switching to GPU-based rendering,
supporting HiDPI scaling, improving gesture support, handling UI-specific
quirks, and implementing clickable UI buttons support to complete the
4th Milestone (Wayland & Mobile Support). This release is built against
Zig 0.9.1. Major changes below:

1. GPU-based rendering & HiDPI support
In order to support mobile environments such as Sxmo (Sway/Wayland) and
Phosh, which both default to HiDPI scaling enabled at 2x, Mepo's default
SDL renderer has been switched to use GPU-based rendering (as opposed
to CPU/software-based rendering in 0.3 and earlier versions). GPU-based
rendering has better support for high DPI displays. No longer in the
underlying logic do we use the scaled window resolution but the true
pixel-based resolution based on getting the GL drawable size and scaling
coordinates similarly to the logical size.

The primary net effect users will notice is that resultingly,
on Phosh & Sxmo (Sway/Wayland), the UI now looks less blurry &
is high-quality/crisper.  With GPU-based rendering now the default,
end users may also notice a slight speed improvement depending on
system specifications. Software-based rendering, while no longer the
default, is still supported via the new `-sw` commandline flag. This
can be helpful for debugging or for use on systems with low amounts of
GPU memory. In addition to the change to support GPU-based rendering,
we also now default to using the Wayland SDL videodriver rather then
the X videodriver (e.g. mepo no longer uses XWayland by default). Note,
this can be overriden via using the SDL_VIDEODRIVER env variable.

2. Sxmo & Phosh support and UI improvements
Sxmo (both X & Wayland) & Phosh support has been implemented.

In regards to Sxmo, prior versions had broken functionality in regards
to scaling, hotkeys/context menu, and overall polish; in this release
each of these points has been addressed. The default included scripts
have each been flagged with a new $HOTKEY variable (correlating to the
default bind_key config setting). Also an associated change in Sxmo's
codebase for the mepo contextmenu hook has been added based on these
$HOTKEY variables.  As such Sxmo now generates its context menu (on
swipe down / volume up) identical to the menu presented by central menu
hold-click functionality (& in 0.4 the new UI menu button). Additionally,
quirks have been worked out to support SDL's text input system (which
is necessary for compatibility with wtype on Sway). There is one pending
change for Sxmo/dwm which has been merged into the sxmo-dwm codebase to
have mepo launch as tiled by default; this change will be included with
the next tagged version of sxmo-dwm which will be released in about a
weeks time from publishing these notes.

As for Phosh, this is the first release in which Mepo is now generally
usable in this environment; support involved several changes. Firstly,
the default backing menuing script now uses busctl on Phosh to launch
Squeekboard (the OSK) for text input. As such you no longer have to
manually open/close the keyboard when looking for POIs and similar.
Secondly, a desktop file and an exciting new icon (!) has been added.
As such, installing Mepo by default, you'll now see a nice new icon appear
on the launcher. Finally, Phosh UI-specific quirks have been resolved. A
performance issue has been examined which caused Mepo to operate very
slowly in Phoc while panning the map; this bug had to do with overhead
for updating the window title, which is now updated on a periodic
interval. Additionally the application's defaults have been setup so
that the OSK automatically hides on boot & during window management etc.

3. Gesture support improved: bind_gesture command & better defaults
Gesture support has been vastly improved and is now customizable based
on a new bind_gesture mepolang command. Using bind_gesture you can bind
1-n fingers for pinch & rotate gestures. By default 2-finger pinching
will zoom the map in & out; and 3-finger rotate will adjust the UI's
fontsize. Additionally gestures are now able to be disabled if desired
by the user - as gesture support is no longer hardcoded since all logic
goes through the new bind_gesture mepolang command.

With 2-finger pinch to zoom, delta tracking has been implemented
and as such you can only zoom at max 2 zoom levels in one continuous
gesture. This is to prevent behavior in prior releases where-in zooming
in and out was unbounded and thus it was easy to zoom to the max/min zoom
level.  Defaults for gestures have been tested and are known to work well
on the Pinephone and the Motorola G4 Play (motorola-harpia). Additional
devices may require minor tweaking; however delta tracking should provide
a good baseline overall for cross-device support.

The last point to mention on gestures, is that while in previous versions
gestures often conflicted with panning.. causing the user to inadvertently
zoom in out while panning; this bug has been resolved. While using
two/three finger gestures, and double/triple tapping, the map is now fixed
in place and won't pan around; which feels more reliable in practice.

4. UI Buttons: bind_button command
Clickable graphical UI buttons have been implemented aligned to the
bottom right corner to provide easy to hit targets on mobile devices,
where keybindings are not available. Buttons can be arbitrarily added
via the new bind_button mepolang command and can execute arbitrary
mepolang code. As such if you want to create your own custom script
(say to reposition the map to a particular coordinate, search the map,
resolve bookmarks, or anything else you can think up); this is as simple
as placing the associated mepolang code in the bind_button command's
eval argument.

UI buttons have been added to default config to allow you to: launch
the central menu, relocate the map via Nominatim, search for POIs via
Nominatim or Overpass, and download all tiles in all zoom levels in
the current viewport. These buttons use the same scripts accessible via
keybindings and in the central menu. If you want a bare UI
or want to remove these buttons, this is feasible by using a custom
configuration since this functionality is completely built out through
the mepolang configuration system.

5. Misc UI improvements
A few additional miscellaneous polishing UI improvements not covered
above have been implemented which I'll mention here (note this is a
nonexhaustive list): 1) In the central menu, scripts labels have had
icons added. 2) The UI bottom bar now changes color while download tiles
(e.g. green for foreground downloading tiles or blue for background/queued
downloading tiles); the bar turns red while offline as was previously
implemented. 3) The Nominatim POI search script no longer provides
suggestions (which required an additional network call); this speed things
up substantially while launching this script. 4) A script has been added
to the central menu to drop a custom user pin arbitrarily on the map. And
5) STDERR debugging has been disabled by default to improve performance;
this debugging functionality is still available now through a new `-e`
commandline flag.


# Packaging status

As for packaging, Alpine has finally bumped LLVM and upgraded zig to 0.9.1
in aports. As such, as of Mepo 0.4, I've upgraded Mepo to build against 0.9.1.
The bulk of this work was completed by Nguyễn Gia Phong (~cnx) as mentioned
in the last update; which I essentially just applied in this cycle with a
few minor updates to resolve conflicts.

While writing this update, the MR for Mepo 0.4.1 was accepted into Alpine
aports as such is now available in alpine's testing repository. As
of 0.4, note Mepo on Alpine has been package split into a 3 different
subpackages to support menuing without pulling in extra packages. You
can now install either mepo-wayland, mepo-xorg, or mepo-framebuffer. The
only difference between these packages is that they use bemenu, dmenu,
or vis-menu respectively. If you are upgrading from mepo 0.3, you should
install one of these to ensure the menuing package stays on your system,
e.g. for Swmo or Phosh run: `apk add mepo-wayland`

Also a small note, I am going to start minor versioning Mepo going forward
to take the burden off getting the 0.x releases fully correct in one
pass. 0.4 had a minor bug related to font rendering which was resolved
with 0.4.1. Similarly for followup minor bugs I will version 0.4.x etc.


# Supported Platforms & Note on other UIs/Platforms

With 0.4 the following platforms were tested and are now officially
supported for usage:

- Mobile X (Sxmo/dwm)
- Mobile Wayland (Phosh and Swmo/sway)
- Desktop X (i3, etc.)
- Desktop Wayland (sway, wlroots-compat etc.)

A minor note on 0.4 cross platform compatibility - while Phosh,
Sxmo, desktop Wayland, and desktop X support were targeted with this
release.. I do realize there are other lesser used UIs/platforms that
would be nice to add support for as well such as PlaMo, Ubuntu Touch,
and Mameo.  Mepo, being an SDL app, will likely launch on most if not
all of these platforms. However, the main integration work for untested
platforms will involve determining how menuing scripts can work in these
environments (e.g. through bemenu, dmenu, etc.). I elaborated a bit on
this on the postmarketOS podcast recently in regards to PlaMo.

While these other unsupported platforms are not on the roadmap, if you
wish to add support and contribute, this would be more then welcomed. I
also encourage current and potential users to contribute or interact on
the mailing list or bugtracker if you desire support on an alternative
platform as this is the main way I am able to gauge users interest.


# Plans for 0.5

The next planned major tagged release, 0.5, will largely focus on some
polishing items to improve Mepo's overall usability & the application's
UX to reach Milestone 5 (UI Nicties). One of the most exciting of these
changes for end-users will likely be the addition of save/restore state
and repositioning the map based on GPSd or geoclue2. These changes will
resolve the long-standing issue that Mepo starts the map in NYC regardless
of the user's location, allow dropping of a pin based on the user's
current position based on geolocation, and also allow users to restore
the map & pin data where left off between restarts of the application.

Another exciting change is that I plan to add good defaults and extend
the bookmarking script so that users can truly use Mepo in a more
personalized way without digging too deep into mepolang etc. And finally,
one more technical change I am quite excited about is the addition of
STDIN processing & continuous shellpipe scripts which will facilitate a
more interactive style of debugging with mepolang and thus empower users
more to understand and customize Mepo's behavior. Paired with robust
documentation (the major goal of Milestone 6), this will make a powerful
combination for end-users to fit Mepo into whatever usecase they desire.


Hope everyone is doing well and I hope that Mepo is proving useful! If you
have ideas about functionality or ideas on how we can make this project
even better, please reach out on IRC, the mailing list, or file tickets.
Enjoy 0.4 and using Mepo on your mobile device!

Reply to thread Export thread (mbox)