Commit graph

23 commits

Author SHA1 Message Date
André Jaenisch
0ca5d963f3
feat: extract MainMenuSummary into component
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>
2024-07-09 20:49:58 +02:00
André Jaenisch
179db76b5a
refactor: extract OverlayAvatar into component
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>
2024-07-08 20:34:06 +02:00
André Jaenisch
7484bfeb1a
refactor: extract Welcome page into component
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>
2024-07-06 18:29:39 +02:00
André Jaenisch
be36d6af3b
fix: prevent dangling list item
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>
2024-07-02 11:02:38 +02:00
André Jaenisch
548c05cfda
refactor: extract CommitDate into component
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>
2024-06-23 15:39:51 +02:00
André Jaenisch
35addf5a77
refactor: extract commit body to an atom
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>
2024-06-23 15:16:48 +02:00
André Jaenisch
67b09e1233
test: correctly pass the property to component
The tests showed warning on an unknown property. Turns out I was holding
it wrong.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-06-23 15:00:27 +02:00
André Jaenisch
664bf09ba5
refactor: extract History into a molecule
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>
2024-06-23 13:33:41 +02:00
André Jaenisch
0d7e02afdd
test: write tests for Project molecule
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>
2024-06-15 19:08:37 +02:00
André Jaenisch
908064639a
chore: prettier formatting
I thought I had done this in the past but apparently the commit got
lost.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-06-14 18:04:45 +02:00
André Jaenisch
1bb72c8eca
docs: explain the folder structure of src & tests
These will help onboarding new contributors, I hope.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-05-13 18:02:45 +02:00
André Jaenisch
2252cf42fd
feat: prepare for deployment
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>
2024-04-12 15:53:14 +02:00
André Jaenisch
1e52798e6a
chore: introduce REUSE
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>
2024-03-06 16:03:12 +01:00
André Jaenisch
dd50af1764
refactor: extract form into organism
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>
2024-02-28 20:13:33 +01:00
André Jaenisch
c5e75a034a
refactor: use a Component for the route
This way I can expose the implementation to Storybook and add tests to
it.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-02-23 13:44:34 +01:00
André Jaenisch
20a44974d5
refactor: turn Profile page into a component
This way it is easier to inspect the design implementation.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-02-20 13:29:52 +01:00
André Jaenisch
34be485a49
feat: import projects form
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-02-16 15:48:48 +01:00
André Jaenisch
fecd15f862
refactor: extract display name into component
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>
2024-02-15 16:18:06 +01:00
André Jaenisch
fd2ab00cb9
refactor: extract block or report buttons to atom
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>
2024-02-11 18:29:53 +01:00
André Jaenisch
f6c8343751
feat: extract Created partial from route
This is displaying the created time of the user's profile.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-02-11 14:58:01 +01:00
André Jaenisch
406b38698c
chore: apply formatting
We want to be a good citizen, don't we?

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-02-09 11:29:03 +01:00
André Jaenisch
9c4c8f04f4
refactor: break out routes into components
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>
2024-02-09 11:19:08 +01:00
Pere Lev
e21c2309d6
Initial commit, using the "Skeleton Welcome" template 2023-05-03 12:28:02 +03:00