Displaying Recent Submissions on the homepage#1801
Conversation
|
@GauravD2t : Thanks for recreating this! I'll add it to the 7.4 review board. @artlowel and @MarieVerdonck : Adding you as potential reviews since you both helped review #1632, and this is an updated replacement for that PR. |
MarieVerdonck
left a comment
There was a problem hiding this comment.
Looks good to me :)
Also tested can override default config in config.(dev/prod).yml; e.g.
homePage:
recentSubmissionsRpp: 20
recentSubmissionsSortField: 'dc.date.issued'
There was a problem hiding this comment.
@GauravD2t : Overall, this works and the code looks good. However, I found a bug & I have a minor request.
- First, I discovered there's no way to turn this feature off (e.g. if you don't want to display recent submissions on the homepage). I was expecting that if I set
recentSubmissionsRpp: 0in myconfig.*.ymlthen no recent submissions should be displayed. However, that doesn't work, instead I see the first 20 recent submissions (which is likely the default page size). - Second, I have some minor recommendations for changing the configuration structure slightly to align with PR #1803 (which adds a different
homePageconfiguration)
| # The number of item showing in recent submission components | ||
| recentSubmissionsRpp: 5 | ||
| # Sort record of recent submission | ||
| recentSubmissionsSortField: 'dc.date.accessioned' |
There was a problem hiding this comment.
We have another pull request #1803 which is adding the same sort of "homePage" configuration, and ideally we'd like these two PRs to have configurations that look similar.
Could we restructure this configuration to look like this?
homePage:
recentSubmissions:
pageSize: 5
sortField: 'dc.date.accessioned'
This would allow both this PRs to use the same "homePage" section of the configuration and work similarly. I also think this will be easier for users to understand, as the "Rpp" meaning is not clear.
…ng the configuration structure
tdonohue
left a comment
There was a problem hiding this comment.
👍 Thanks @GauravD2t ! This looks great to me now, and I can hide the section by setting pageSize: 0. As this is now at +2, it's ready to merge for 7.4
References
#667
Description
Displaying Recent Submissions on the Repository's homepage with option of configuring number of items required to be displayed.
Instructions for Reviewers
Update the "rpp" variable in the config.example.yml with the item count that needs to be displayed in the Recent Submission section.
If you do not want to display any item under the Recent Submission section, keep the "rpp" count = 0.
Restart the server for the change to take effect, and no need to re-build the application.
Home page will show the Recent Submission section below the community list with the latest items submitted.
Upon clicking the Load more button, users will be redirected to the search results page, and items will list in descending order based on the submission date.
If there is no item submitted in the repository or rpp = 0, then Recent Submission should not appear.
Include guidance for how to test or review your PR. This may include: steps to reproduce a bug, screenshots or description of a new feature, or reasons behind specific changes.
Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
yarn run lintpackage.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.