ElektraInitiative / PermaplanT

https://www.permaplant.net
BSD 3-Clause "New" or "Revised" License
16 stars 13 forks source link

Feature/967 timeline backend #1171

Closed horenso closed 8 months ago

horenso commented 10 months ago

Basics

Checklist

First Time Checklist

Review

horenso commented 9 months ago

@danielsteinkogler in this implementation we only get the years, months and dates that actually contained additions and removals. For instance even if start is 2021-MM-DD and end is 2024-MM-DD but the only activity was in 2022, you get

years: { "2022": {"addtions": 12, "removals": 34 } }
...

otherwise it's so much unnecessary data returned.

IMO we could also return an array with two indices like this:


years: { "2022": [12, 34] }
...

But let's do what ever is easier to work with in the frontend :)
markus2330 commented 9 months ago

addtions

I hope it is additions (typo) :wink:

otherwise it's so much unnecessary data returned.

I fully agree.

IMO we could also return an array with two indices like this:

This is probably already over-optimization. The JSON file gets compressed for transmission, doesn't it?

horenso commented 9 months ago

Earlier today @danielsteinkogler and I made phantastic progress, we could combine his super cool frontend with this timeline backend. I hope we can fix the tests fast and merge it into master. :rocket:

horenso commented 8 months ago

I added more tests and cleaned up this PR. I believe it can be merged. :)

danielsteinkogler commented 8 months ago

jenkins build please

markus2330 commented 8 months ago

Thank you, great job! :heart: