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

Automatic donate buttons on chapter pages #378

Open
domdomegg opened this issue Feb 3, 2024 · 0 comments · May be fixed by #394
Open

Automatic donate buttons on chapter pages #378

domdomegg opened this issue Feb 3, 2024 · 0 comments · May be fixed by #394
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@domdomegg
Copy link
Member

Problem

It's a bit of a pain for chapters to add donate buttons to their pages. It'd be good to make this process easier.

Proposed solution: option A

Add a property in the _config.ts with 'showDonateButtons' as a boolean, given that should be fairly easy for chapters to edit.

Have this trigger the donate buttons (e.g. in the header navigation, and a few other places on the page - see https://github.com/raisenational/raise/pull/108/files).

Proposed solution: option B

Get the public fundraiser info (e.g. similar to how we do on the DonationPage from the config). If it's:

  • within time (activeFrom to activeTo)
  • not archived
  • not paused

The page should show donate buttons (e.g. in the header navigation, and a few other places on the page - see https://github.com/raisenational/raise/pull/108/files).

Difficulties with option B

One difficulty might be that this causes a 'jump' when the request loads and it adds the buttons. This might be an acceptable trade-off though.

I think the site is low traffic enough anyways that the increased requests probably won't do much to the cost of running the service. If this does become a problem we can fix this later.

A route to fixing both the above problems is doing this at build time, and somehow triggering a build when fundraisers start / on some daily schedule. But I think that would be overengineering it at this time.

@domdomegg domdomegg added enhancement New feature or request good first issue Good for newcomers labels Feb 3, 2024
@DeevanP DeevanP self-assigned this Jul 8, 2024
@DeevanP DeevanP linked a pull request Jul 8, 2024 that will close this issue
@DeevanP DeevanP linked a pull request Jul 8, 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
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants