muety / wakapi

📊 A minimalist, self-hosted WakaTime-compatible backend for coding statistics
https://wakapi.dev
MIT License
2.62k stars 161 forks source link

Calendar view #338

Open alexanderadam opened 2 years ago

alexanderadam commented 2 years ago

Sometimes it would be very helpful to see directly which branches of which features were worked on certain days. A calendar overview would be nice. Ideally a 'day' could look like this:

Percentage Project Branch
30% wakapi calendar_overview
10% wakapi LDAP-integration
60% proj2 implement_bananas

And it would be great if this view would be able to show at least a week at once. Maybe even coloured by project and with a nice bar or another graph.

This way it would be much easier to see what I was working on (i.e. for standups/retros/time tracking).

Thank you so much for wakapi! :raised_hands:

muety commented 2 years ago

Thanks a lot, I'm glad you like Wakapi! :raised_hands: Also, thanks for your thoughts.

I agree that some sort of calendar view would be cool to have. But I'd rather limit it to aggregations on one "level" of entities, i.e. per day percentage across projects, across languages, etc. What you suggested is - if I got it correctly - an aggregation on the combination of two entity types (project and branches, in this case). That is a bit two "specific" for my taste.

Calendar view in general would definitely be nice though. If someone has a good idea on how such might look like or could even come up with a UI design sketch, I'd highly appreciate it!

alexanderadam commented 2 years ago

I'd rather limit it to aggregations on one "level" of entities, i.e. per day percentage across projects, across languages, etc. What you suggested is - if I got it correctly - an aggregation on the combination of two entity types (project and branches, in this case)

Well, the idea for this feature was born because it would be easier for devs to see what they were working on (i.e. for standups/retros/time tracking). And the project name alone is pretty unspecific. If you'd exclusively work on wakapi you wouldn't immediately know what you were working on. Only branch names in combination with project names will give that information. Or do you have a better idea for that?

If someone has a good idea on how such might look like or could even come up with a UI design sketch, I'd highly appreciate it!

It's probably not a good design but at least it's a start. :wink:

Wakapi day view

I obviously kept it simple therefore there's much room for improvement (i.e. maybe having a bar in the background or left of percentage column? Maybe having some visual representations/icons besides or instead of the header columns?).

<div class="flex flex-col space-y-2 mt-4 rounded-md border-2 border-green-700 text-gray-300 text-l bg-gray-850">
  <table>
    <thead>
      <tr>
        <th class="font-semibold" colspan="4">Tuesday, 22. Mar 2022</th>
      </tr>
      <tr>
        <th class="font-semibold ">Percentage</th>
        <th class="font-semibold">Time</th>
        <th class="font-semibold">Project</th>
        <th class="font-semibold">Branch</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>30%</td>
        <td>3h</td>
        <td>wakapi</td>
        <td>
          <tt>calendar_overview</tt>
        </td>
      </tr>
      <tr>
        <td>10%</td>
        <td>1h</td>
        <td>wakapi</td>
        <td>
          <tt>LDAP-integration</tt>
        </td>
      </tr>
      <tr>
        <td>40%</td>
        <td>4h</td>
        <td>wakapi</td>
        <td>
          <tt>implement_bananas</tt>
        </td>
      </tr>
      <tr>
        <td>20%</td>
        <td>2h</td>
        <td>wakapi</td>
        <td>
          <tt>have_a_splendid_day</tt>
        </td>
      </tr>
    </tbody>
  </table>
</div>
muety commented 2 years ago

Coding Crystal with VS Code on DOS seems like a wild setup to me 🤔 Just kidding...

Thanks a lot for your elaborate thoughts. Now that I understand your use case better this feature also makes much more sense to me. And I actually like your UI sketches! I would move this to a whole separate view, though. A separate page that looks much like an actual calendar. Could also well go together with or act as a replacement for #76.

This will be quite some effort to implement, though. Hope that I'll get to it soon!

alexanderadam commented 2 years ago

I just thought about it again because it's relevant again for me. :smile: And an addition came into my mind: sometimes it would be useful if there'd also be a filter by project for the calendar view. But this would only be a luxury feature. :wink: A general calendar view would already be fantastic enough.

alexanderadam commented 2 years ago

I'm not sure but maybe it would also be nice to have such bars above or below the details like the insights view on Wakatime.

image

alexanderadam commented 1 year ago

I just thought about it again and in my case it would already be helpful just to have a list per month. Maybe with a filter per projects that I worked on per month and then see when I worked how much on a certain project.

Something like a work sheet list.

I'm not sure whether this would make the implementation easier than the view that is proposed here?

Because the more I thought about it, the more a project filtered list per month would make more sense to book times.

alexanderadam commented 1 year ago

I just realized that the shown info is similar to #493. So maybe some of that logic can be reused for this feature here.

alexanderadam commented 9 months ago

I think that I might've been one of the main causing asker for this issue here.

However, it turns out that I might have an alternative to Wakapi that allows to use the calendar view (which was — apart from selfhosting — the main reason I looked into Wakapi in the first place), hence I'll probably not needing this any more.

So if nobody else asks for this, this can be likely just be closed.

muety commented 9 months ago

I liked the idea of a calendar view, so will keep this as a feature request. Downgrading its prio, though, since not a lot of people seem to be wanting this.