configurable entities in Recent item list#5259
configurable entities in Recent item list#5259GauravD2t wants to merge 9 commits intoDSpace:mainfrom
Conversation
|
Hi @GauravD2t, thanks for the contribution! I added the "needs documentation" label because this setting should probably be added to the User Interface Configuration guide later - though likely not until this has been approved by a reviewer/merged. |
|
@lgeggleston, the documentation reference is now included in PR. |
|
QA testing performed (no code review). Works as expected.
|
Yes, both cases are currently working as expected. When entityTypes is not defined, the component displays items of all entity types (default behavior). Similarly, when entityTypes: [] is provided, it is treated the same as not defining the property, so items of all entity types are displayed. |
EikLoe
left a comment
There was a problem hiding this comment.
Hi @GauravD2t ,
thanks for you PR. I took a look at the code and noticed, it wouldn't work with multiple entity types because adding a simple list of filters means, they'll be linked using the AND operator, where as an OR operator would be needed.
References
Add references/links to any related issues or PRs. These may include:
Description
This PR introduces a new configuration option to filter the Recent Submissions component on the homepage by a specific entity type.
A new configuration property homePage.recentSubmissions.entityType has been added.
This allows administrators to configure the Recent Submissions component to display items belonging to a specific entity type.
If the configuration is not defined, the component will display all entity types (default behavior).
Instructions for Reviewers
List of changes in this PR:
Added a new configuration option homePage.recentSubmissions.entityType
Allows administrators to specify one entity type to appear in the Recent Submissions component
If the configuration is not provided, the component will display all entity types (default behavior)
homePage:
recentSubmissions:
pageSize: 5
sortField: 'dc.date.accessioned'
entityType: 'Publication'
Behavior
When entityType is defined → only items with that entity type appear in Recent Submissions.
When entityType is not defined → all entity types are displayed (default behavior).
How to Test
Configure the homepage settings in config.yml:
homePage:
recentSubmissions:
entityType: 'Publication'
Start the Angular UI.
Navigate to the homepage.
Verify that the Recent Submissions section only shows items with the entity type Publication.
Reload the UI and verify that all entity types appear again.
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 do not need to complete this checklist prior creating your PR (draft PRs are always welcome).
However, reviewers may request that you complete any actions in this list if you have not done so. If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
mainbranch of code (unless it is a backport or is fixing an issue specific to an older branch).npm run lintnpm run check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.