Skip to content

configurable entities in Recent item list#5259

Open
GauravD2t wants to merge 7 commits intoDSpace:mainfrom
GauravD2t:type-items-filter-in-Recent-submissions
Open

configurable entities in Recent item list#5259
GauravD2t wants to merge 7 commits intoDSpace:mainfrom
GauravD2t:type-items-filter-in-Recent-submissions

Conversation

@GauravD2t
Copy link
Contributor

@GauravD2t GauravD2t commented Mar 6, 2026

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!

  • My PR is created against the main branch of code (unless it is a backport or is fixing an issue specific to an older branch).
  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR passes ESLint validation using npm run lint
  • My PR doesn't introduce circular dependencies (verified via npm run check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • My PR aligns with Accessibility guidelines if it makes changes to the user interface.
  • My PR uses i18n (internationalization) keys instead of hardcoded English text, to allow for translations.
  • My PR includes details on how to test it. I've provided clear instructions to reviewers on how to successfully test this fix or feature.
  • If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

@lgeggleston lgeggleston added improvement ux User Experience related works 1 APPROVAL pull request only requires a single approval to merge labels Mar 6, 2026
@lgeggleston lgeggleston moved this to 🙋 Needs Reviewers Assigned in DSpace 10.0 Release Mar 6, 2026
@lgeggleston lgeggleston added the needs documentation PR is missing documentation. All new features and config changes require documentation. label Mar 6, 2026
@lgeggleston
Copy link

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.

@GauravD2t
Copy link
Contributor Author

@lgeggleston, the documentation reference is now included in PR.

@alegontarz
Copy link

QA testing performed (no code review).

Works as expected.

  1. Recent Submissions shows only Publication items when entityTypes: ['Publication'] is configured.
  2. When entityTypes is not defined, the component displays items of all entity types (default behavior).

@alegontarz alegontarz moved this from 🙋 Needs Reviewers Assigned to 👀 Under Review in DSpace 10.0 Release Mar 12, 2026
@GauravD2t
Copy link
Contributor Author

GauravD2t commented Mar 12, 2026

QA testing performed (no code review).

Works as expected.

  1. Recent Submissions shows only Publication items when entityTypes: ['Publication'] is configured.
  2. When entityTypes is not defined, the component displays items of all entity types (default behavior).

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 EikLoe self-requested a review March 12, 2026 15:50
Copy link
Member

@EikLoe EikLoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1 APPROVAL pull request only requires a single approval to merge improvement needs documentation PR is missing documentation. All new features and config changes require documentation. ux User Experience related works

Projects

Status: 👀 Under Review

Development

Successfully merging this pull request may close these issues.

Ability to control the type items to be displayed in the Recent submissions section of DSpace homepage

4 participants