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

Fix: ensure campaign goal progress percentage is an integer and does not exceed 100 #7740

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

jonwaldstein
Copy link
Contributor

@jonwaldstein jonwaldstein commented Feb 14, 2025

Resolves GIVE-2174

Description

This updates the goal progress percentage calculation so we can goal progress is an integer and does not exceed 100.

Affects

The goal progress widget

Visuals

Screenshot 2025-02-14 at 4 57 22 PM

Testing Instructions

Zip: https://github.com/impress-org/givewp/actions/runs/13374370469

  • Create a campaign with a small goal of amount
  • Make several donations with varying float amounts
  • Make sure the goal progress percentage is a whole number and does not exceed 100

Pre-review Checklist

  • Acceptance criteria satisfied and marked in related issue
  • Relevant @unreleased tags included in DocBlocks
  • Includes unit tests
  • Reviewed by the designer (if follows a design)
  • Self Review of code and UX completed

@jonwaldstein jonwaldstein marked this pull request as ready for review February 14, 2025 22:07
@jonwaldstein jonwaldstein changed the title Fix: ensure goal progress is an integer and does not exceed 100 Fix: ensure campaign goal progress percentage is an integer and does not exceed 100 Feb 14, 2025
@pauloiankoski
Copy link
Contributor

Honest question: Why can’t the progress percentage exceed 100%? IMHO, it would be nice to see that my campaign was a success and reached 200% of my original goal.

@jonwaldstein jonwaldstein removed the request for review from kjohnson February 17, 2025 15:50
@jonwaldstein
Copy link
Contributor Author

jonwaldstein commented Feb 17, 2025

@pauloiankoski that's a great question and something I contemplated myself.

My thought process was that this is a high level goal progress widget that visually shows the percentage of your goal progress in relative terms to the UI (circle progress bar). Since that UI for the progress goes up to 100% (a single circle) I feel that we should only be presenting that max percentage amount. In other terms, the percentage we display is a label for the visual progress bar. This is consistent with our other goal progress bars in GiveWP.

However, if the UI had a way to show progress past 100% (like extra circle rings or something), then I would agree it would be valuable to display that extra progress.

There is also going to be a more full fledged reporting tab in the future that should be able to display more in-depth details about the fundraising stats.

cc: @jdghinson

pauloiankoski

This comment was marked as duplicate.

Copy link
Contributor

@pauloiankoski pauloiankoski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@jdghinson
Copy link
Contributor

@jonwaldstein Actually I did a design for this scenario, we just didn't surface it in our scope conversations.

Cc: @pauloiankoski

image

@jonwaldstein
Copy link
Contributor Author

@jdghinson ah good to know! that's pretty consistent with my reasoning to have some kind of way to show progress past 100. However, I would still raise the question if a circle bar is even appropriate for showing values over 100 as the UI is always going to show a max of a 100 due to the nature of a circle.

@jdghinson
Copy link
Contributor

@jonwaldstein There's no UI that will well represent over 100% unless the max is infinite, which doesn't match our use case because there will always be a target goal. That's why in the design, you have the actual goal progress being represented with the percentage and number, and also a supporting text, that makes it clear that you've exceeded your target goal.

@jonwaldstein
Copy link
Contributor Author

@jdghinson Thanks for your insight. I do believe there are other forms of UI that could show progress past 100%, for example: a bar graph. However, I understand the nuance and think this is a great UX discussion to have offline from here 😄.

Copy link
Member

@rickalday rickalday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passed manual QA tests.

@jonwaldstein jonwaldstein merged commit 4427426 into epic/campaigns Feb 17, 2025
20 checks passed
@jonwaldstein jonwaldstein deleted the fix/goal-progress-chart branch February 17, 2025 21:03
@jonwaldstein jonwaldstein mentioned this pull request Feb 17, 2025
5 tasks
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 this pull request may close these issues.

4 participants