When `Show card count` is enabled, the lists with the card counts have
two lines of text while the lists without have only one.
This results in the box around the list headers are not of the same size
and this is visible when setting a color to the list.
If we keep the `0` value, the card might be inserted in the middle of the
list, making it hard to find it later on.
Always append the card at the end of the list by setting a sort value
based on the number of cards in the list.
When moving around the swimlanes or the lists, if one element has a sort
with a null value, the computation of the new sort value is aborted,
meaning that there are glitches in the UI.
This happens on the first swimlane created with the new board, or when
a swimlane or a list gets added through the API.
To unset the color through the IFTTT, we need a white entry.
However, we do not want to show the white enry in the hamburger
`Set Color` entry.
We can also give the `white` capability to the API, it won't hurt
and be more straightforward.
This allows to retrieve the full export of the board from the API.
When the board is big, retrieving individual cards is heavy for both
the server and the number of requests.
Allowing the API to directly call on export and then treat the data
makes the whole process smoother.
When pulling the docker container snapcore/snapcraft
to build the snap, those 2 packages are not present
by default leading to a failure in the snap creation.
Note: it is good to call `apt-get update` before
`snapcraft` or the build will fail.
It is common to use Ubuntu 16.04 to build snaps. For example,
the official docker container to build snaps is using this old
distribution.
However, Ubuntu 16.04 ships Python 3.5.X which is not compatible
with the f-strings in generate_openapi.py. This is sad, because
we need to use the `.format()` syntax to make it compatible.
When we build the docker container, we need to generate the openapi
description in it so the geenrated API actually matches the code
the container is running.
The API is generated by a custom script that parses the models directory.
Once the API is generated, tools like https://editor.swagger.io/ or
Python bravado can parse the file and generate a language friendly API.
Note that the tool generate an OpenAPI 2.0 version because bravado
doesn't handle OpenAPI 3.0.
The script also parses the JSDoc with a custom parser to allow
customization of the description of the fields.