Skip to content

fix: fixed avg contribution calc + NaN state display on Manager#2331

Merged
bard merged 5 commits into
gitcoinco:mainfrom
ArslanYM:bug/#1541
Sep 19, 2023
Merged

fix: fixed avg contribution calc + NaN state display on Manager#2331
bard merged 5 commits into
gitcoinco:mainfrom
ArslanYM:bug/#1541

Conversation

@ArslanYM

Copy link
Copy Markdown
Contributor
Description

The Avg. Contribution text will display N/A insted of NaN when round && round.uniqueContributors is not > 0 otherwise the same functionality as before.

Refers/Fixes

This PR fixes #1541

Testing

Tested this on my local server.

@ArslanYM
ArslanYM requested review from a team as code owners September 12, 2023 15:37
@vercel

vercel Bot commented Sep 12, 2023

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
builder ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 19, 2023 11:21am
explorer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 19, 2023 11:21am
manager ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 19, 2023 11:21am

@vercel

vercel Bot commented Sep 12, 2023

Copy link
Copy Markdown

@ArslanYM is attempting to deploy a commit to the Grants Stack Team on Vercel.

A member of the Team first needs to authorize it.

@gitstream-cm

gitstream-cm Bot commented Sep 12, 2023

Copy link
Copy Markdown

🥷 Code experts: vacekj, boudra

vacekj, boudra have most 👩‍💻 activity in the files.
vacekj, boudra have most 🧠 knowledge in the files.

See details

packages/round-manager/src/features/round/ViewRoundStats.tsx

Activity based on git-commit:

vacekj boudra
SEP
AUG 5 additions & 2 deletions
JUL
JUN
MAY 1 additions & 1 deletions 18 additions & 11 deletions
APR 11 additions & 47 deletions 112 additions & 174 deletions

Knowledge based on git-blame:
vacekj: 58%
boudra: 36%

To learn more about /:\ gitStream - Visit our Docs

@gitstream-cm

gitstream-cm Bot commented Sep 12, 2023

Copy link
Copy Markdown

This PR is 47.368421052631575% new code.

@bard

bard commented Sep 13, 2023

Copy link
Copy Markdown
Contributor

Hey @ArslanYM, there is some diff noise in the patch, i.e. changes in formatting only (line 53 and line 156-157).

It's no big deal in a change this small, but on a bigger one, it would obscure the real changes and put the reviewer at risk of missing something important.

This is probably due to the fact that our project doesn't have a .prettierrc.json, so your IDE is using its local settings.

Could you try copying .prettierrc.json from https://github.com/gitcoinco/allo-indexer/ into your local grants-stack worktree root, save packages/round-manager/src/features/round/ViewRoundStats.tsx again, and see if it respects the formatting of the original?

@ArslanYM

Copy link
Copy Markdown
Contributor Author

Hey @ArslanYM, there is some diff noise in the patch, i.e. changes in formatting only (line 53 and line 156-157).

It's no big deal in a change this small, but on a bigger one, it would obscure the real changes and put the reviewer at risk of missing something important.

This is probably due to the fact that our project doesn't have a .prettierrc.json, so your IDE is using its local settings.

Could you try copying .prettierrc.json from https://github.com/gitcoinco/allo-indexer/ into your local grants-stack worktree root, save packages/round-manager/src/features/round/ViewRoundStats.tsx again, and see if it respects the formatting of the original?

Sure thing. On it.

@ArslanYM

Copy link
Copy Markdown
Contributor Author

Hey @ArslanYM, there is some diff noise in the patch, i.e. changes in formatting only (line 53 and line 156-157).

It's no big deal in a change this small, but on a bigger one, it would obscure the real changes and put the reviewer at risk of missing something important.

This is probably due to the fact that our project doesn't have a .prettierrc.json, so your IDE is using its local settings.

Could you try copying .prettierrc.json from https://github.com/gitcoinco/allo-indexer/ into your local grants-stack worktree root, save packages/round-manager/src/features/round/ViewRoundStats.tsx again, and see if it respects the formatting of the original?

The solution you asked to try doesn't seem to work.

@bard

bard commented Sep 14, 2023

Copy link
Copy Markdown
Contributor

Hey @ArslanYM, there is some diff noise in the patch, i.e. changes in formatting only (line 53 and line 156-157).
It's no big deal in a change this small, but on a bigger one, it would obscure the real changes and put the reviewer at risk of missing something important.
This is probably due to the fact that our project doesn't have a .prettierrc.json, so your IDE is using its local settings.
Could you try copying .prettierrc.json from https://github.com/gitcoinco/allo-indexer/ into your local grants-stack worktree root, save packages/round-manager/src/features/round/ViewRoundStats.tsx again, and see if it respects the formatting of the original?

The solution you asked to try doesn't seem to work.

Could you give it another try, place .prettierrc.json in packages/round-manager instead of the project root, and see if that gets picked out?

If that also doesn't work, we'll merge the PR as-is.

@ArslanYM

Copy link
Copy Markdown
Contributor Author

Hey @ArslanYM, there is some diff noise in the patch, i.e. changes in formatting only (line 53 and line 156-157).
It's no big deal in a change this small, but on a bigger one, it would obscure the real changes and put the reviewer at risk of missing something important.
This is probably due to the fact that our project doesn't have a .prettierrc.json, so your IDE is using its local settings.
Could you try copying .prettierrc.json from https://github.com/gitcoinco/allo-indexer/ into your local grants-stack worktree root, save packages/round-manager/src/features/round/ViewRoundStats.tsx again, and see if it respects the formatting of the original?

The solution you asked to try doesn't seem to work.

Could you give it another try, place .prettierrc.json in packages/round-manager instead of the project root, and see if that gets picked out?

If that also doesn't work, we'll merge the PR as-is.

Tried that as well. Doesn't seem to work.

@ArslanYM

Copy link
Copy Markdown
Contributor Author

Hey @ArslanYM, there is some diff noise in the patch, i.e. changes in formatting only (line 53 and line 156-157).
It's no big deal in a change this small, but on a bigger one, it would obscure the real changes and put the reviewer at risk of missing something important.
This is probably due to the fact that our project doesn't have a .prettierrc.json, so your IDE is using its local settings.
Could you try copying .prettierrc.json from https://github.com/gitcoinco/allo-indexer/ into your local grants-stack worktree root, save packages/round-manager/src/features/round/ViewRoundStats.tsx again, and see if it respects the formatting of the original?

The solution you asked to try doesn't seem to work.

Could you give it another try, place .prettierrc.json in packages/round-manager instead of the project root, and see if that gets picked out?
If that also doesn't work, we'll merge the PR as-is.

Tried that as well. Doesn't seem to work.

I'll be careful about this next time. Apologies.

@bard

bard commented Sep 14, 2023

Copy link
Copy Markdown
Contributor

I'll be careful about this next time. Apologies.

Sorry, I wasn't clear in my explanation, this is none of your fault, rather a bug in our project setup, as it should already include a prettierrc already and ideally autoformat every commit through git hooks (in fact, we have an in-progress PR for this at #2314).

We're currently sorting some build issues and we'll merge this and your other PRs after that. Thanks again for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: fix avg contribution calc + "NaN state" display on Manager

3 participants