Commit graph

79 commits

Author SHA1 Message Date
André Jaenisch
99a8ebea95
fix: ensure screen is full size
I noticed that I do not cover the whole height.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-07 13:56:03 +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
a8097d3363
fix: don't break the layout
I was so focused on the welcome screen that I accidentally broke the
profile.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-06 17:26:26 +02:00
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
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
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
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
André Jaenisch
662dc71ede
feat: turn Vervis information into markup
This comes close to the design specification already. But I lack some
information in the Vervis responses.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-06-15 12:45:46 +02:00
André Jaenisch
311e5123e7
feat: query Vervis for information on a person
I discovered that Vervis understands Content Negotiation.
That is, once I figure out my peopleId I can navigate to the respective
paths and resceive JSON that is equal to the prettyjson'ed HTML views I
can see in the web browser.

I don't find everything I would like to have. Therefore I'm writing the
results to a file for now and read it in the profile so I can talk to
our designer how to move on with what we have right now.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-06-15 12:45:46 +02:00
André Jaenisch
bafd831696
refactor: break up ap/index.js
Now it is more obvious that I only handle the homepage from the library
and have the login as an implementation detail.

Once I figure out how to talk to Vervis' API I can drop Cheerio and use
ReST instead.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-06-15 12:45:45 +02:00
André Jaenisch
eca61c975e
refactor: turn ap.js into a directory
The file has grown and I want to break it apart into smaller files.
Therefore I rename the file in the first step and adjust the import
paths.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-06-15 12:45:45 +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
3e4e725347
feat: add bg and pl to language switcher
This should help translators see their efforts come to fruition.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-06-14 18:04:16 +02:00
André Jaenisch
519c6a045a
chore: add .license fails for REUSE
These locales were created using Weblate. Therefore the PR introducing
them was unaware of REUSE. I created the files manually.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-06-14 17:54:54 +02:00
Eryk Michalak
38e21b1456
Translated using Weblate (Polish)
Currently translated at 93.4% (43 of 46 strings)

Translation: Anvil/Anvil
Translate-URL: https://translate.codeberg.org/projects/anvil/anvil/pl/
2024-06-10 01:18:23 +00:00
Eryk Michalak
59a9d5e49c
Added translation using Weblate (Polish) 2024-06-09 00:37:10 +00:00
krlsk
c3307b5433
Translated using Weblate (Bulgarian)
Currently translated at 6.5% (3 of 46 strings)

Translation: Anvil/Anvil
Translate-URL: https://translate.codeberg.org/projects/anvil/anvil/bg/
2024-05-25 17:18:24 +00:00
krlsk
6ff7316748
Added translation using Weblate (Bulgarian) 2024-05-24 17:16:48 +00: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
Dirk
e6c46448c9
Translated using Weblate (English)
Currently translated at 100.0% (46 of 46 strings)

Translation: Anvil/Anvil
Translate-URL: https://translate.codeberg.org/projects/anvil/anvil/en/
2024-05-04 11:18:24 +00:00
Dirk
9d96eb7a00
Translated using Weblate (German)
Currently translated at 100.0% (46 of 46 strings)

Translation: Anvil/Anvil
Translate-URL: https://translate.codeberg.org/projects/anvil/anvil/de/
2024-04-26 10:18:26 +00: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
08e739440e
feat: new projects page
This is the page that will be reached after a new project was added or
imported unless there have been projects before already.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-03-15 11:19:14 +01:00
André Jaenisch
edfbcce5a2
refactor: drop lang="ts" from script elements
I noticed that tooling isn't capable of handling it.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-03-15 10:49:30 +01:00
André Jaenisch
e00e274873
fix: populate possible f2 servers
I figured out how to handle Objects in Svelte each blocks and can
therefore now pass the data through.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-03-14 10:33:48 +01: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
69e7a2a1ee
feat: parse HTML responses of Vervis
I can successfully log in with credentials I'm using on Vervis.
The response is then parsed into an object that could be consumed in the
rest of Anvil.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-03-05 13:46:32 +01:00
André Jaenisch
0783a080e8
feat: allow for linking between stories
In order to link between stories in Storybook I need to add some
attribute to elements, so that the events are prevented and navigation
can be handled by Storybook.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-03-03 15:24:24 +01:00
André Jaenisch
cfb58fa9c7
feat: use Inter font for heading and body
I hope I read the PenPot design correctly here.
Right now, I hotlink as documented by the font forge. We might want to
self-host down the road.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-03-01 12:40:09 +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