By moving the fallback text into its own component I was able to move
the list element into the History molecule. Its API has changed
accordingly. I have written tests to prevent regressions.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
This way the History molecule is only concerned with mapping the list of
commits to the appropriate structure and iterating over it. The markup
is deferred to separate components now.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
This allows for easier testing. The component is still complex, so it
requires more refactoring into smaller parts. But I can now safely do
that since I have specified the expected behaviour with a test.
I already discovered a bug while writing the tests: I want to group by
date irrespective of the timestamp. Therefore I need to parse the date
from the ISO timestamp of a commit.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>