Skip to content

Comments

Add configurable option to show/hide metadatafield names in external import preview#5152

Open
MMilosz wants to merge 1 commit intoDSpace:mainfrom
MMilosz:feat/submission-external-import-metadatafield-name-visibility
Open

Add configurable option to show/hide metadatafield names in external import preview#5152
MMilosz wants to merge 1 commit intoDSpace:mainfrom
MMilosz:feat/submission-external-import-metadatafield-name-visibility

Conversation

@MMilosz
Copy link
Contributor

@MMilosz MMilosz commented Feb 24, 2026

References

Description

This PR adds configurable metadata field name visibility to the external import preview modal. It allows users to see which metadata field corresponds to each label.

Previously, users could only see the display labels (e.g., 'Container end page') without knowing the underlying metadata field name, making it difficult to understand source mappings or debug import configurations (without access to *-integration.xml backend files).

Instructions for Reviewers

Key Changes

This PR introduces four new view modes that can be configured via config.yml under submission.importExtenral.viewMode:

  • disable: (current behavior) Shows only display labels
  • tooltip: (new default) Show an info icon with the field name as a tooltip
  • labeled: show the field name in parentheses next to the label
  • full: combines tooltip and labeled, showing both the parenthetical label and an info icon with tooltip

Examples

Mode = Disable (original behavior)

Only display labels shown. No metadata field information.

screenshot_20260224001823

Mode = Tooltip (new default)

Info icon appears next to labels. Hovering reveals the metadata field name.

💭 Needs Discussion: Maybe tooltip could, instead of {{metadata.key}}, show {{ 'item.preview.' + metadata.key + '.hint' | translate}}? This could potentially extend this feature

screenshot_20260224002939

Mode = Labeled

Metadata field name shown in parentheses directly after the display label.

💭 Needs Discussion: Is the mode's name clear?

screenshot_20260224003749

Mode = Full

Both parenthetical label and info icon with tooltip are shown.

💭 Needs Discussion: I have mixed feelings about this mode's usability, as it seems redundant. Opening this up for discussion. (Perhaps, changing the tooltip to show i18n key with a .hint suffix could provide more descriptive help text for each metadata field?) Happy to hear thoughts on this approach or alternative suggestions!

screenshot_20260224004630

How to Test

  1. Configuration:
  • config.yml: Test each mode (disable, tooltip, labeled, full) by changing the submission.importExternal.viewMode value. Observe no regression
  1. Functional:
  • Navigate to any external import source in MyDSpace (e.g., PubMed, arXiv, ORCID, DOI)
  • Search for and select an item to import. Click to open the preview modal
  • Verify that metadata field names appear according to the selected mode
  • Also, confirm that tooltips work correctly in tooltip and full modes (should already be covered in unit tests)
  • Also, ensure all metadata fields in the preview respect the configured mode
  • Confirm no regressions when importing item from external source

Checklist

  • 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.

@MMilosz MMilosz force-pushed the feat/submission-external-import-metadatafield-name-visibility branch from b83b948 to b8f4dca Compare February 24, 2026 14:22
@lgeggleston lgeggleston added improvement usability tools:import-sources Related to "Live Import" Sources feature, allowing import of content via external APIs. 1 APPROVAL pull request only requires a single approval to merge labels Feb 24, 2026
@lgeggleston lgeggleston moved this to 🙋 Needs Reviewers Assigned in DSpace 10.0 Release Feb 24, 2026
@MMilosz MMilosz force-pushed the feat/submission-external-import-metadatafield-name-visibility branch from b8f4dca to faa3d2e Compare February 24, 2026 17:54
@MMilosz MMilosz marked this pull request as ready for review February 24, 2026 18:50
@MMilosz MMilosz force-pushed the feat/submission-external-import-metadatafield-name-visibility branch from faa3d2e to 897b127 Compare February 24, 2026 18:54
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 tools:import-sources Related to "Live Import" Sources feature, allowing import of content via external APIs. usability

Projects

Status: 🙋 Needs Reviewers Assigned

Development

Successfully merging this pull request may close these issues.

Add configurable option to show/hide metadatafield names in external import preview

2 participants