-
Notifications
You must be signed in to change notification settings - Fork 29
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
Refactor homepage recent projects to use ERAS #6397
Conversation
@@ -45,7 +45,7 @@ function ContentLink({ | |||
|
|||
ContentLink.propTypes = { | |||
link: shape({ | |||
as: string, | |||
as: oneOfType([object, string]), |
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.
Fixes a prop-types
warning following #6379
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.
LGTM! Confirmed locally works as expected 👍 .
The projects listed were a little a different because I think project preferences updates per visiting a project's Talk or for reasons other than classifications, compared to these changes which reflect recent ERAS classifications exclusively. I think that's ok, but just noting.
}) | ||
.filter(preference => preference?.project?.slug) | ||
.slice(0, 10) | ||
.filter(project => project?.id) // exclude private or deleted projects |
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 don't think it's an issue, but noting if I have 20 projects per line 19, but then private/deleted projects are filtered out here, then there might be less than 20 or an inconsistent number of projects for some users.
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.
Agreed. I think this is fine for the homepage, but we'll need to discuss handling private and/or deleted projects when creating an All Projects page with 20-per-page pagination.
Package
lib-user
Linked Issue and/or Talk Post
Follows: zooniverse/eras#76
Might fix: #6332
Describe your changes
/project_preferences
to fetch contribution count per project on the homepage and sort the Recent Projects section.How to Review
/project_preferences
.Checklist
PR Creator - Please cater the checklist to fit the review needed for your code changes.
PR Reviewer - Use the checklist during your review. Each point should be checkmarked or discussed before PR approval.
General
yarn panic && yarn bootstrap
ordocker-compose up --build
and FEM works as expectedGeneral UX
Example Staging Project: i-fancy-cats