okTurtles / group-income

A decentralized and private (end-to-end encrypted) financial safety net for you and your friends.
https://groupincome.org
GNU Affero General Public License v3.0
329 stars 43 forks source link

Fix misc issues with Activity Tab #1482

Closed taoeffect closed 1 year ago

taoeffect commented 1 year ago

Problem

Screen Shot 2023-01-17 at 4 23 59 PM

There are several issues related to pluralization in English, and also missing information about the length of members steaks.

Solution

  1. UI needs to show how long a person's streak is. Above it only says their name, but we need to show, for each member with a streak, how many months long their streak is:

    Screen Shot 2023-01-17 at 4 26 53 PM

  2. English needs improvements related to plurals:

    • For singular, instead of "1 member haven't entered income details", it should say, "1 member hasn't entered income details"
    • Zero (0) is treated the same way as plural, so instead of "0 member haven't voted in the last 2 proposals", it should read: "0 members haven't voted in the last 2 proposals"
  3. We should add a group streak for 100% TODO payments too.

SebinSong commented 1 year ago

Hi @taoeffect , I've got a question regarding a requirement here.

  1. We should add a group streak for 100% TODO payments too.

What does 100% TODO payments mean here?

If it means the case where all pledging members in a group makes full pledges in the distribution period, That's what below item counts (streaks.fullMonthlyPledges in group.js contract).

Thanks,

taoeffect commented 1 year ago

If it means the case where all pledging members in a group makes full pledges in the distribution period, That's what below item counts (streaks.fullMonthlyPledges in group.js contract).

These should correspond to the Support % and TODO % tabs.

So 100% Support corresponds to Support % streaks, and 100% TODO corresponds to TODO % streaks.

SebinSong commented 1 year ago

Thanks @taoeffect But it seems to me like 100% support also means 100 % Todo payments, if I am not misunderstood.

Looking at the figma below and the way I implemented Todo history tabs in this PR,

Support history = amount pledged / total amount to pledge Todo history = number of payment items completed / total number of payment items to make

which means, 100% of support history also means 100 % of todo history and the other way around holds true too. So streaks.fullMonthlyPledges value counts streaks for both. Is it correct?

Thanks

taoeffect commented 1 year ago

which means, 100% of support history also means 100 % of todo history and the other way around holds true too.

No, that's not true. Look at our group, if everyone does their TODOs we do not get 100% support.

If we get 100% support, then usually yes it does mean 100% todos too (depending on the algorithm we're using. for the current one that is true).

SebinSong commented 1 year ago

@taoeffect I got it. looking at the logic I created for streaks.fullMonthlyPledges in a previous task again, it actually checks the 'number' of payment items completed in a period not the 'total amount' pledged, which means it's actually a streak value for 100% TODO history. But currently we are using this value as 100% support history in the UI.

Then can I update this sentence in the UI to 'Group has a streak of 100% TODO payments of N months' and work on implementing streaks of 100% support history in group.js contract? (I think this is going to be the last question before making additional change)

Thanks,

taoeffect commented 1 year ago

@SebinSong Yes that sounds right 👍

SebinSong commented 1 year ago

Hi @taoeffect, can I work on this issue as part of this Active PR of mine? (rather than pushing it as a standalone change and merging it to that later on?) Cheers.

taoeffect commented 1 year ago

@SebinSong Yes, I know usually we encourage 1PR per issue, but in this case it's OK to make an exception 👍