Commit graph

112 commits

Author SHA1 Message Date
André Jaenisch
0d1b0454ef
refactor: extract first page into a component
It is a component now which allows for inspection in Storybook.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-06 17:25:21 +02:00
André Jaenisch
c89f9d6f1b
feat: replace skull with Anvil logo
When I refactor the homepage I can also get closer to the design
specification.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-06 17:22:59 +02:00
André Jaenisch
b95702ad7d
chore: remove dead code
This markup was commented. In case we ever need it, git will have it
stored in the repo history.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-06 17:17:46 +02:00
André Jaenisch
7b4703b044
fix: remove doubled entry
I'm also annoyed that we mix CommonJS with ESM here but one step at a
time.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-06 17:17:09 +02:00
André Jaenisch
fe39bab2f0
chore: update dependencies
Always a good idea to start with the latest versions.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-06 17:13:17 +02:00
André Jaenisch
a1f5b69704
chore: add new locales to Storybook
In order for others to inspect their translations I have added new
locales to Storybook.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-04 08:21:35 +02:00
André Jaenisch
5297ea175f
docs: create stories for new components
I have added atoms, molecules and icons.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-04 08:21:35 +02:00
André Jaenisch
019c6cf90e
docs: create stories for new components
I also introduce Person24 as fallback avatar and grant it a new icon in
Storybook as consequence.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-04 08:21:35 +02:00
André Jaenisch
f807bf69b3
chore: update dependencies
I cannot upgrade ESLint to latest due to TypeScript parser dependency.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-04 08:21:35 +02:00
André Jaenisch
91f6e24280
fix: add stories for Projects
I noticed that I missed stories for one or two projects in Storybook.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-04 08:21:35 +02:00
André Jaenisch
769e3bcab3
feat: add new components to Storybook
I included stories for the new components introduced by the Projects
page.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-04 08:21:35 +02:00
André Jaenisch
07007b0016
chore: add license banner to stories
I dropped the examples while at it.
Since Svelte-Octicons are used as-is I have to declare the license as
MIT.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-04 08:21:35 +02:00
André Jaenisch
30edc92522
feat: link between stories
Right now this works with Template stories but not with Page stories to
collect feedback.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-04 08:21:35 +02:00
André Jaenisch
87af757874
feat: load Inter as Webfont
I received confirmation that Inter is meant to be used for the whole
application. Therefore I'm loading it from a remote server.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-04 08:21:35 +02:00
André Jaenisch
6e03027b4c
feat: apply locale and writing direction
FINALLY! I can look into translated UIs in Storybook with Svelte!

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-04 08:21:35 +02:00
André Jaenisch
dc707869b4
docs: write Story for LoginForm
As it is visible here, part of the layout is deferred to the parent
component. See Login template.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-04 08:21:35 +02:00
André Jaenisch
98f9f724ce
chore: update storybook dependencies
There is a v8 in the beta, so I update the dependencies to check whether
I need to adjust something.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-04 08:21:35 +02:00
André Jaenisch
390c54a2bf
docs: create stories for Login page
This is the second form I have touched. Here, I even have a light
validation implemented on the server.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-04 08:21:35 +02:00
André Jaenisch
b0366f26ed
feat: create stories for Profile
I also updated the icons to reflect all in use.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-04 08:21:35 +02:00
André Jaenisch
21a7fc1b54
docs: create Stories for new pages and templates
I also extracted the Icons we use into a story and looked into how I
could potentially allow for changing the locale.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-04 08:21:35 +02:00
André Jaenisch
a5897dc63c
docs: document color palettes
Right now it is using the default Skeleton.dev palette.
I feel like we need to adjust it to our needs.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-04 08:21:34 +02:00
André Jaenisch
49cbd6178e
fix: reenable scrolling
Otherwise information is lost.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-04 08:21:34 +02:00
André Jaenisch
f5e64cdd7d
docs: add Typography
I had to work around Storybook here thanks to Tailwind.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-04 08:21:34 +02:00
André Jaenisch
b4527b7fc0
docs: write stories for DisplayName
I'm curious whether the layout should be part of atoms…

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-04 08:21:34 +02:00
André Jaenisch
18f7c0da76
docs: write story for BlockOrReport.svelte
This component does not take any arguments at the moment.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-04 08:21:34 +02:00
André Jaenisch
10cab60d63
docs: create story for Created.svelte
This will need a refactor at some point by computing the formatted value
as reactive variable depending on the created_at and locale.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-04 08:21:34 +02:00
André Jaenisch
41d82656b3
docs: add story for profile picture case
I also check for accessibility now.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-04 08:21:34 +02:00
André Jaenisch
8ed9837fea
docs: write Storybook for Avatar
For some reason, the JSDoc annotation is not picked up yet. Need to
investigate more.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-04 08:21:34 +02:00
André Jaenisch
a350e43362
chore: build storybook and deploy to Codeberg Page
We can now deploy Storybook to Codeberg Pages!

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-04 08:21:34 +02:00
André Jaenisch
e248e0073d
chore: setup and configure default Storybook
I had to downgrade Vite because the Storybook builder does not support
v5 yet. Therefore this will be on a separate branch and updated as we
move along with the codebase.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-04 08:21:34 +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
Dirk
8ca9125fba
Translated using Weblate (German)
Currently translated at 100.0% (49 of 49 strings)

Translation: Anvil/Anvil
Translate-URL: https://translate.codeberg.org/projects/anvil/anvil/de/
2024-06-30 14:34:07 +02:00
André Jaenisch
d16fa9e1e2
style: space between history events
I checked PenPot again and noticed that there is spacing between each
entry. I could have changed the lists to a different element but that
would be another refactoring just to use Flexbox for styling. Instead I
went with some margin.

If I want to use Flexbox I should first move the fallback from Profile
into this component and turn it into another Atom.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-06-24 09:01:53 +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
8e92e49e19
refactor: use objects for properties
I was reading warnings during the execution of tests and fixed them for
ImportProject templates and pages.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-06-23 14:53:46 +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
5753e14721
refactor: group commits by date and project
Yes, this means nested looping. But it also allows me to separate the
commits into a shape I need. I feel like this should not happen in
Vervis as it is something I as a consument of the data need.

I could have done this inside of the template but it feels ugly.

The main drawback I have with the current approach is that Svelte is not
capable of looping over objects so I have to turn that into a list of
nested Arrays. I might have done that in the function already but it is
easier to look up keys on an Object that to sift through Arrays.

The current implementation works. The next step is to extract it into a
component, test it and then I can refactor further.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-06-23 12:31:02 +02:00
André Jaenisch
e9c76418eb
feat: display commits as activity
I also learned how to pluralise. I'm curious whether Weblate can handle
that. It follows ICU standard at least.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-06-21 15:08:29 +02:00
André Jaenisch
d3fc06a239
feat: fetch commits from Vervis
I had to hardcode the path to the commits because it is not a property
on the repository object. There are empty repositories, which I handle
as well.

Next step is displaying them in the Activities.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-06-21 12:24:47 +02:00
André Jaenisch
288ad752ad
chore: update dependencies
I'm going to start a new feature and want to make sure I'm running on
the latest compatible versions.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-06-21 09:00:14 +02:00
André Jaenisch
04e2287f08
fix: restore new keys
For some reasons, the new keys got lost during a rebase.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-06-19 17:01:02 +02:00
André Jaenisch
7553cda85b
feat: display Repositories on Profile
When looking at the Memorandum of Understanding I realised that I should
display repositories instead of projects. So I reused the new component
to do just that.

I could not use a list here, because I need spacing between the
elements. If I were to apply Flexbox to lists it would change their
semantics. But plain divs lack all kinds of semantics. I went with the
next best thing and picked a section as container.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-06-19 16:59:46 +02:00
Eryk Michalak
c98a2f6117
Translated using Weblate (Polish)
Currently translated at 100.0% (46 of 46 strings)

Translation: Anvil/Anvil
Translate-URL: https://translate.codeberg.org/projects/anvil/anvil/pl/
2024-06-19 16:56:53 +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
acc76294f3
refactor: break Project into its own component
I feel like Fork-Star-Watch is a pattern that we will reuse.
Therefore the new component is a molecule.

I also look up the person as collaborator which works for the small test
set I used during development but will likely break in production for
others. That's good. It will show me more information I need to design
the component better. I lack that at the moment.

Ideally I would use a database here, but before I can set up one I
better understand the data model.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-06-15 18:19:11 +02:00
André Jaenisch
dda12368b3
chore: drop Profile.d.ts
Since I learned that I can't use TypeScript in conjunction with
Storybook, I have no more use for this file.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-06-15 17:58:00 +02:00
André Jaenisch
54d2300467
feat: include collaborators in project overview
This shows the avatar fallback because I have no way to know the avatar
in Vervis at the moment.

Also no username associated, that is, I would need to look it up. Should
work for getting the idea at the moment.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-06-15 12:45:46 +02:00
André Jaenisch
0581a55c92
feat: extend homepage.js with collaborators fetch
These are not implemented everywhere so I have to handle errors here.
But for what we want to build right now (projects overview) they are.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-06-15 12:45:46 +02:00