BinaryStudioAcademy / bsa-2024-gitfit

Application for collecting and analyzing developers activity on git based projects.
https://git-fit.net/
2 stars 0 forks source link

feat: Add project last activity label to project list #274

Closed liza-veis closed 1 month ago

liza-veis commented 1 month ago

What feature?

Screenshots

Image

AnnaRomaniuta commented 1 month ago

User Story: As a user, I want to see the relative date of the last commit for each project in the project list. So that I can quickly understand how recently a project was updated. The color indicators help quickly identify how actively the project is being updated.

Acceptance Criteria:

  1. A "Last Activity" label is added to each project in the project list.
  2. The label displays the relative date of the last activity with more than zero commits, in a format such as "Updated today."
  3. The label changes color based on the time since the last activity:
    • Green: last activity was less than 2 days ago.
    • Yellow: last activity was between 2 and 5 days ago.
    • Red: last activity was 5 or more days ago.
  4. If there is no activity, no label is shown for the project.
kolibri753 commented 1 month ago
  1. Should I create a new type ProjectGetAllWithActivityResponseDto or model ProjectActivityModel for this "last activity" label? Or should I just modify ProjectGetAllItemResponseDto by adding lastActivityDate
  2. This is a helper - projects/libs/helpers/get-relative-date-label.tsx

Green: last activity was less than 2 days ago. Yellow: last activity was between 2 and 5 days ago. Red: last activity was 5 or more days ago.

liza-veis commented 1 month ago

Should I create a new type ProjectGetAllWithActivityResponseDto or model ProjectActivityModel for this "last activity" >label? Or should I just modify ProjectGetAllItemResponseDto by adding lastActivityDate This is a helper - projects/libs/helpers/get-relative-date-label.tsx

Let's add last_activity_date column to the projects table, null by default. And we need to update it when we successfully create activity logs for this project

VeronikaHordus commented 1 month ago

Seems to be good! Thank you