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

Add filter button for recent contributors' list #202

Closed
Rishabh570 opened this issue May 27, 2019 · 5 comments · Fixed by #238
Closed

Add filter button for recent contributors' list #202

Rishabh570 opened this issue May 27, 2019 · 5 comments · Fixed by #238

Comments

@Rishabh570
Copy link
Collaborator

Currently, there is no filter option on the recent contributors' list. There can be some options allowing the user to arrange the list according to his needs.

The filter should be based on,

  • alphabetical,
  • most recent contributors first.

There can be other filters also which can be implemented later...suggestions are welcome :)

@jywarren
Copy link
Member

This is awesome and perhaps we could modify fetchAllRecentMonthCommits() to be generically fetchAllCommitsForPeriod(org, repos, queryTime, start, end)?

// Fetches recent month commits for top 10 repositories
function fetchAllRecentMonthCommits(org, repos, queryTime) {
let results = [];
let commitersSet = new Set([]);
let timeToday = (new Date).getTime();

@gauravano was interested in being able to select the past 2 months of recent contributors in our check-ins (publiclab/plots2#5627). This might be a relatively easy way to expand this functions use for arbitrary time periods.

Thanks @Rishabh570 -- Community Toolbox continuing to be super useful!!!

@Rishabh570
Copy link
Collaborator Author

Yes, it can be expanded to include past X months' commits and this goes very well with the topic of this issue...I'll include it.

@Rishabh570
Copy link
Collaborator Author

So, I'm planning to do a followup refactor work after my already open PRs get merged. This will make it convenient for writing tests & making the logic of recent contributors flexible and for reading the code generally...Currently, I'm looking at the utils/ folder as a place which needs to be refactored the most as it contains most of the logic...Here's how I think the structure would look like,

Screenshot from 2019-06-20 21-05-01

I guess we should get done with this refactoring work before we work on making the logic of recent contributors flexible (& most probably providing a filter for past 1, 2 and maybe 3 months).

What do you think?

@jywarren
Copy link
Member

jywarren commented Jun 20, 2019 via email

@Rishabh570
Copy link
Collaborator Author

I've been working on the recent contributors' section's logic for the past couple days and most of the logic part is almost done. Here's a quick GIF showing the changes,

filter

The main things that are remaining on this are,

  • Enhancing the UI a bit of the dropdowns list present,
  • Showing the status of the Show option alongside so that people can easily notice the time period for which the data is shown

@publiclab/reviewers @jywarren Please take a look, is there anything more which needs to be there in this filter options bar?

@gauravano Will this resolve the problem of looking for contributors' data for previous X months, the one you were discussing in the check-in?

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.

2 participants