I spotted an experimental vitest addon and configured most parts of it.
However due to given peer dependency in that addon I cannot install it.
Therefore everything was commented for now.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
This is currently a mock as we have no notification mechanism in place.
Also, I need to figure out how to talk to Vervis' API first.
That being said, this step allows for translations at least.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
REUSE had a breaking change that changed the way they configure the
tool:
https://github.com/fsfe/reuse-tool/releases/tag/v4.0.0
This PR adjusts our code to get compliant again.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
This features two knobs: theming and indent.
I was curious whether I could actually hand the theme switching to the
parent, so I created an event dispatcher for it.
It works! But I had to hack the Svelte component a little.
I also need to sync it two the theme switcher in the popup and go over
every component that is focused on light mode only at the moment. To
limit the work I will constraint myself to the Profile page here. If the
theme is meant to apply to other pages as well, we will need to persist
the setting. That means a database in Anvil, I guess. I'm not willing to
take that step right now. It must come at some point (e.g. when talking
to Vervis to actually inform about changes made in Anvil).
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
Currently the SSH and GPG keys are hardcoded. In a refactoring those
will be passed down as prop to the component. But I would need to query
Vervis to receive the real keys. Likewise I am not talking to Vervis
when updating (remove, add) a key.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
This is not interacting with Vervis at this point in time.
I clarified that changes should be persisted on moving away from a view.
I'm going to implement that once I have all views in place.
On top of that, persisting changes to Vervis requires me to study the
now documented Vervis API in more detail. I'm going to postpone this for
now but will revisit it in a few weeks.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
This is now showing the MainMenu on the profile page which in turn
pulls in the Settings modal.
I wasn't able to register the modal on Storybook yet, which means
that there won't be any on the Profile template or page story.
The implementation in Skeleton is causing some accessibility
warnings. However, since there next version is taking a radical
different approach I'm inclined to let it be for now. We should
document it somewhere, I guess.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
This is in need of at least one refactoring. Skeleton is redesigning
the AppRail we are using here. The layout is hard to style.
This implementation interacts with a drawer, but it will likely be
dropped in the final version.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
This is the top part of the main menu which includes the Avatar overlay.
I'm not quite sure how to label each part.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
I'm going to break up my MainMenu into smaller components, starting with
the OverlayAvatar. Testing it taught me how to handle stores in Vitest.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
This allows for proper testing and documentation in Storybook.
I also moved the image into its own component. This required me to
adjust the vitest.config.ts slightly because it wasn't finding the image
during tests.
Since components are fully translatable, this means we have new keys
now.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
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>
In order to reduce the complexity of a component I broke out the body
part of a commit into its own component.
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>
During testing I realised that the buttons are not accessible.
While I was adding text I also ensured that it can be translated.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
When trying to deploy the application to my own domain I noticed that
the adapter is wrong. Since I'm not hosting anything in „the Cloud” I
went with a plain Node.js server. Therefore I have to use a specific
adapter and also fix the type of the server response. This in turn
uncovered a bug in the Created component which I also fixed.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
This required adding annotation to the whole project.
I need to double-check whether I have the license banner of AGPL in
place everywhere.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
I want to explore how I could potentially reuse components. Therefore I
extract the form into a component. Given its complexity it could either
be a molecule or an organism. I went with the latter here.
I have to explore how I pass around Objects and Arrays in Svelte so that
I can move server logic up in the component tree.
When I reuse components, I potentially want to define the labels and
placeholders. Therefore the hard-coded strings have to become variables.
Eventually I will define the key on the template level and use the real
values on page level and pass it down. That would break tests currently
so I'm not doing it in this refactoring.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
I could imagine that we will refactor this into even smaller components
in the future but for now, I bundle the pronoun with the display name
like this.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
These have no handlers bound to them yet. At that point the atom might
be refactored to a molecule. Let's see.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
For now I'm following the Atomic Design philosophy with respect to
organising the components. I started with Avatar which wraps the
SvelteKit library with some defaults. I test it using vitest which is
now configured accordingly. All dependencies were updated to their
latest version.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>