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

Bug: list calculations not accurate when filtering in Activity tab #2042

Closed
2 tasks done
BekahHW opened this issue Nov 2, 2023 · 5 comments · Fixed by #2080
Closed
2 tasks done

Bug: list calculations not accurate when filtering in Activity tab #2042

BekahHW opened this issue Nov 2, 2023 · 5 comments · Fixed by #2080

Comments

@BekahHW
Copy link
Member

BekahHW commented Nov 2, 2023

Describe the bug

When you look at the activity tab in lists, and then filter by new contributors, the grey description update isn't accurate.

Steps to reproduce

  1. go to lists
  2. change all contributors to new contributors
  3. See changes to greyed out line

If you look at the recording below, there are two things to notice:

  1. The percentage isn't possible
  2. CBID2 isn't on the list of new contributors, and I would expect that line to reflect the filtered list.
Screen.Recording.2023-11-02.at.11.14.33.AM.mov

There's one other thing I noticed, when I filter for the first time, the line is there but reads 0%. It might be worth leaving that empty until loading has completed.

shows CBID2 with 0% while loading

Browsers

No response

Additional context (Is this in dev or production?)

production

Code of Conduct

  • I agree to follow this project's Code of Conduct

Contributing Docs

  • I agree to follow this project's Contribution Docs
@BekahHW BekahHW added 🐛 bug Something isn't working 👀 needs triage labels Nov 2, 2023
Copy link
Contributor

github-actions bot commented Nov 2, 2023

Thanks for the issue, our team will look into it as soon as possible! If you would like to work on this issue, please wait for us to decide if it's ready. The issue will be ready to work on once we remove the "needs triage" label.

To claim an issue that does not have the "needs triage" label, please leave a comment that says ".take". If you have any questions, please reach out to us on Discord or follow up on the issue itself.

For full info on how to contribute, please check out our contributors guide.

@5hraddha
Copy link
Contributor

5hraddha commented Nov 3, 2023

Just going over the issue, realized that in pages/lists/[listId]/activity.tsx, the code always assigns the first element of the most active contributors data as the top contributor. It never changes with the change of filter:

            <MostActiveContributorsCard
              data={contributorStats?.data ?? []}
              totalContributions={contributorStats?.meta.allContributionsCount ?? 0}
              topContributor={activityData.topContributor} // i.e. always equal to mostActiveData.data[0]
              setContributorType={setContributorType}
              contributorType={contributorType}
              isLoading={isLoading}
            />

I believe, using the contributorStats data from the useMostActiveContributors() custom hook instead (that gets updated as and when the contributor type filter changes ), should do the trick.

opensauced-contributors-list-fix.mov

@nickytonline
Copy link
Member

The top person for contributions seemed to make sense for all contributors but not sure if it makes sense when you filter. 🤔 And the calculation is definitely off @BekahHW 😅 I think that's because It's the person from all contributors but then the % gets skewed as the filter changes.

Copy link
Contributor

open-sauced bot commented Nov 9, 2023

🎉 This issue has been resolved in version 1.74.1-beta.7 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Copy link
Contributor

open-sauced bot commented Nov 9, 2023

🎉 This issue has been resolved in version 1.75.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@open-sauced open-sauced bot added the released label Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants