Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expiring funding goals #136

Open
Telofy opened this issue Apr 21, 2024 · 5 comments · May be fixed by #138
Open

Expiring funding goals #136

Telofy opened this issue Apr 21, 2024 · 5 comments · May be fixed by #138
Assignees

Comments

@Telofy
Copy link
Contributor

Telofy commented Apr 21, 2024

Two observations:

  1. I want to introduce funding goals earlier or later, but I'm not sure yet how they should work. Donors will mostly not register their donations on the platform (unless they have regrantor ambitions), so we don't have any anywhere close to complete tally of donations that could count against a goal.
  2. Lots of projects are currently basically tied. Donors will then still not quite know where to donate.

What do you all think about expiring funding goals:

  1. The default sorting and filtering displays first projects that have an up-to-date funding goal and only afterwards all other projects (maybe flagged “not fundraising” and with an explanatory tooltip).
  2. A project enters a funding goal, some dollar amount they want to fundraise within the next quarter.
  3. For the next quarter, the funding goal is displayed along with the total of all donations registered within the quarter so far.
  4. After that period, the project gets a reminder email to update the funding goal and is not, by default, displayed anymore.

That should make it fairly likely that a project that is displayed by default is also fundraising at the time. It'll reduce the number of tied projects, removing such that just accept donations because it's easy for them and not because they need them enough to spend two minutes to update a number.

Update: It's probably easier to have all funding goals expire at the end of the quarter because then we don't have to implement the transactional emails but can just send a BCC email from Gmail.

Technically, I imagine something like:

  1. The project will have the fields updatedAt (already exists) and fundingGoal (new).
  2. At some low level it's determined that fundingGoal is consider null (regardless of its actual value) if updatedAt is in the last quarter.
  3. Quarters start Jan 1, Apr 1, Jul 1, Sep 1.
  4. The total of all donations in a quarter is calculated based on the date when the donation was made (not the date when it was registered).
  5. The sorting is probably a bit complicated with changes to the database views. Feel free to split that out into a new ticket and defer it as needed.
  6. No automated email reminders yet.
    In terms of the design, maybe we can add a thin Mantine progress bar at the bottom of each project card. No text at first sight, but current funding goal and progress toward it in a tooltip.

On the project page, it can go all the way at the top, right below the title, so that the “Accepting donations” button flows from it visually as it were. Same colors ideally. (The certificates already have this much more complex progress bar.)

On the edit page, the new field for the funding goal and an explanation can go to the right of the payment URL, both half width.

@goblinodds
Copy link
Contributor

re: fundingGoal value, how do you think we should handle potential different currency types?

@Telofy
Copy link
Contributor Author

Telofy commented May 10, 2024

@goblinodds Just USD for now. :-)

@goblinodds
Copy link
Contributor

i keep running into trickiness with Decimals; maybe there's something goofy i'm doing wrong? (maybe i should use Float but this seemed to come with its own issues)

typescript seems to handle prisma Decimals as strings but wants them to be 'string | undefined' and sort of forces this (will add “undefined” to the end in the background if you try to assign things to 'string | null')

mostly i've been able to work with this but:

at some low level it's determined that fundingGoal is considered null (regardless of its actual value) if updatedAt is in the last quarter

i'm not super sure how to handle that. i set things up to calculate a quarterDonationTotal, which can be zero.

@Telofy
Copy link
Contributor Author

Telofy commented May 20, 2024

@goblinodds Ow, how badly blocked are you on that? I imagine considering fundingGoal to be 0 instead of null could work too. 🤔 Might that help with the type errors?

@goblinodds
Copy link
Contributor

yeah i think that would help!! sorry, keep getting migraines this week for some reason, hoping to be able to try this out in like 2 days x_x

@goblinodds goblinodds linked a pull request May 25, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants