Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Homepage: Create RecentProjects component, refactor data fetching in RecentSubjects #6125
Homepage: Create RecentProjects component, refactor data fetching in RecentSubjects #6125
Changes from 4 commits
40d14bf
2fe456a
c3f3899
8370182
3bf726f
1fca965
b5a5ba4
ad29c4e
8b9c5ce
95cf3c2
684a196
b8ad896
8c7247a
4035c12
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mcbouslog @seanmiller26 as mentioned in the Slack thread, the response from this is a list of projects in descending order from greatest number of classifications to least number of classifications by the user.
Is this "Continue Classifying" section intended to be "projects you've most recently classified"? If so, I'll need to change this fetch to a user's project preferences like PFE's homepage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is a recently classified section, so we can match PFE here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good - I refactored to display projects a user has most recently classified on. The catch with relying on
project_preferences
is thatproject_preferences.updated_at
is changed when a user interacts with a project beyond just classifying. For instance, closing a tutorial.In this PR, I only fetched 1 page of
project_preferences
(20 items) and filtered for those whereactivity_count > 0
(which means a user has actually classified on a project). This means if I recently interacted with 20 projects, but only classified on 3, then only 3 projects will show in this "Continue Classifying" UI section.It would be much smoother if the eras request for
project_contributions
included a sort by most recently classified, but I'll have to follow-up with Michelle after internal team testing.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A clarification - PFE's homepage recursively gets ALL pages of a user's project preferences rather than just 1 page. This is why it takes a long time for all of your ribbon classifications to load. I'd prefer not to use recursion on the new homepage because it's so data intensive - hence the note about follow-up with Michelle and eras.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not know the specifics here re
project_preferences.updated_at
Great decisions!