đ 22 Jun 2021
- Current state of the app
- Continuous Integration and tests
- Translations
- Crash reports through TraceDroid
- NLnet grant
- Conclusion
As you probably know if you are reading this blogpost, PixelDroid is now available on F-Droid. To get to the point where I felt the app was usable enough to be released there, it had to change quite a bit.
Current state of the app
What is implemented?
Basic functionality for most of what you would expect from a Pixelfed client is implemented.
- Hashtags
- profiles
- feeds
- notification tab (but no system notifications yet)
- âDiscoverâ tab, showing some random posts from your instance
- take photos, make posts, add image descriptions, edit photos with filters and cropping/rotating/etc
- interact with posts, including likes, shares (âboostsâ in Mastodon lingo) report posts, comment on a post
- share images, share posts
- change langugage of the client, change theme setting
What is broken?
-
Reports are currently broken. It is not implemented on the server API side, so not much to do about it on our side.
-
You cannot use PixelDroid with an account that has 2FA enabled. This is because Pixelfedâs OAuth implementation doesnât support it, and apparently it would require quite some work to add support (requiring quite a rewrite in the authentication logic).
-
Authentication renewal (renewing the token that is used to be able to talk with the server) is currently broken, meaning users get a âUnauthenticatedâ message after a while. âa whileâ has changed meaning recently, since Pixelfed now has a token validity of a year instead of two weeks. So, at least now we have about a year to fix the issue đ.
-
Sometimes on initial load, the feed shows the end (or somewhere in the middle) of the feed, instead of showing the start of the feed. This is very annoying, and was even more annoying before I implemented the âscroll to topâ functionality (where you can click the current tab to scroll to the top of the feed).
-
Comments are half broken: if I recall correctly, the API doesnât return how many comments there are, so it always says âno comments on this postâ. You can still see comments on a post by pushing the âcreate commentâ button, and then pressing the âno comments on this postâ text will load the comments.
-
Various other things are missing or broken, see issue tracker
What is coming?
-
support for videos. Currently not supported, in multiple ways (see issue on issue tracker).
-
âPushâ notifications. Probably only via polling every x minutes, possibly I will try to add UnifiedPush support once polling works? Not sure I understand what that does completely yet đ
Continuous Integration and tests
CI
We use GitLab at https://gitlab.shinice.net/pixeldroid/PixelDroid/
As you might notice, this is not gitlab.com or GitHub. Decentralization is good, and as developers in this space we should practice what we preach, whenever possible. Thanks to @ShinIce@social.tchncs.de for this GitLab instance :)
GitLab CI is used to:
- check the linter passes without errors
- check the app compiles, and provide an APK as a build artifact. This means you can go try out the latest version of the
master
branch (or any feature branch youâre hyped about :P) - on tagged commits, test that the F-Droid build process works by running
fdroid build
. If this fails I have time to untag the commit, fix whateverâs wrong and tag a new commit for the F-Droid release. It hasnât failed yet since I added this stage, letâs hope it stays that way đ¤ - run unit tests (mainly some API sanity checks for now)
- run integration and UI tests on an emulator
GitLab CI uses ârunnersâ which are computers that basically spin up docker containers to run the CI jobs on. Two runners are currently in use, one run on my server, and another donated by wisemonkey, whoâs been running one for almost a year now on his PC. Thanks â¤ď¸
Tests
To ensure correctness of an application, itâs useful to have automated tests to check it behaves as expected. This is especially useful to prevent regressions, meaning breaking something that was previously working.
Mainly the tests written for PixelDroid are UI tests, using a testing Pixelfed server. This has some advantages and also significant drawbacks.
Advantages:
- often easy to write, just have to click some buttons as if one was using the app
- independent of implementation details (tests may stay the same while the code changes dramatically)
- Tests the whole application as it is presented to the user (if anything in the path of a test breaks, tests will not pass anymore: this includes server side changes)
Disadvantages:
- Tests the whole application as it is presented to the user (it might not be obvious right away why a test is not passing anymore)
- Can be flaky, sometimes a test doesnât pass because of race conditions in the tests that make it seem to work fine when writing the test, but fail 1 time out of 3 on the CI for example.
Currently tests are less flaky than they used to be: most tests now pass reliably, and the remaining issues are getting better over time as work is put into rewriting the tests to be more reliable. Help in this department (and any other department, to be honest) is more than welcome.
Testing has helped catch issues, crashes, other bugs to prevent them getting merged into master
a bunch of times, so I think itâs worth it. Of course the current approach has a lot to be desired, I would like to see more unit tests instead of almost exclusively UI tests.
Translations
Having translations enables more people to use the app. Since the main goal here is to free the world from proprietary dis-services, making sure people can actually understand what is going on seems very important (and also, languages are cool :D).
It was surprisingly easy to get translations to work. The main challenge was to set up the weblate server (I wanted to self-host this as well), but that took maybe a couple of hours to set up all in all.
https://weblate.pixeldroid.org
This allows people to contribute translations with an easy UI, with warnings and suggestions to ensure quality translations. Weblate then pushes these contributions to a translations
branch on our git repo, and from time to time I will merge this into master
.
At the moment, our weblate contains 22 languages, two of them were added recently. Translating is a way to contribute that doesnât require any coding skill, and help on that front is always welcome :)
Thanks a lot to all our translators â¤ď¸
Crash reports through TraceDroid
Lots of apps contain âcrashalyticsâ or other types of analytics, I feel like - in addition to often being proprietary software and thus unacceptable - this is an injustice towards users. Any feedback from users should be on a voluntary basis, with explicit consent to share the data.
However, it is useful to get information on what kinds of crashes users are getting. Sometimes a crash is caused by peculiarities of the setup of a particular user, sometimes a crash is pretty rare because of an obscure race condition, maybe sometimes it is caused by a particular post or profile containing some unexpected data.
For these reasons, I chose to add TraceDroid to PixelDroid (wow, adding -Droid to get a name for an Android thing is so original). Project repo for more information: https://github.com/ligi/tracedroid/
This has helped point out some issues multiple times, users donât need an account to report anything (TraceDroid just uses their email client to send an email) and itâs pretty easy to get back to people for more info since I can just reply to the email the user sent when prompted by TraceDroid.
If you get a crash and you get the prompt about it, the easiest way to get it fixed is to send the report generated by TraceDroid! Thank you so much all those who sent me the reports.
NLnet grant
About the grant
As some of you might know, we got a grant through the NGI0 Discovery Fund, a fund established by NLnet with financial support from the European Commissionâs Next Generation Internet programme. Thank you NLnet and the EU NGI programme for the financial and other support, it has been most helpful.
Searching for a digital artist to make some drawings of red pandas
You might have noticed the red panda used for error messages. Heâs pretty cute, but we would like to have a somewhat more expressive panda, in color, with various expressions and accompanied by various items to indicate whatâs happening to the user (network issue, empty feed, âŚ). In addition it would be nice to have a mascotte for the about page and splash screens of the app (a red panda holding a phone, for example, but in the same style as the previously mentioned pandas).
This is part of one of the milestones in our agreement with NLnet, so this would be paid work. Please contact us at contact at pixeldroid.org or on Mastodon or Matrix, if you think you are the right person for this or know anyone that might be and is looking for work.
Conclusion
PixelDroid is - slowly but surely - getting to a usable state. I feel like the app has already come a long way, but I have big plans including making a FOSS library for image editing so that other apps can also use it.
If you want to contribute, hop in on our Matrix chat room #pixeldroid:gnugen.ch, or send a message on Mastodon.
If you are unable to contribute but still want to help, after popular demand we have set up a Liberapay. Thank you so much to the two generous people that saw fit to send us some donations in the previous months :)
Thanks a lot for your interest and the consistent nice feedback I have gotten along the way. Have a nice day, everyone :)