Add configurable option to show/hide metadatafield names in external import preview#5152
Open
MMilosz wants to merge 1 commit intoDSpace:mainfrom
Open
Conversation
b83b948 to
b8f4dca
Compare
b8f4dca to
faa3d2e
Compare
faa3d2e to
897b127
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.xmlbackend files).Instructions for Reviewers
Key Changes
This PR introduces four new view modes that can be configured via
config.ymlundersubmission.importExtenral.viewMode:disable: (current behavior) Shows only display labelstooltip: (new default) Show an info icon with the field name as a tooltiplabeled: show the field name in parentheses next to the labelfull: combinestooltipandlabeled, showing both the parenthetical label and an info icon with tooltipExamples
Mode = Disable (original behavior)
Only display labels shown. No metadata field information.
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 featureMode = Labeled
Metadata field name shown in parentheses directly after the display label.
💭 Needs Discussion: Is the mode's name clear?
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
.hintsuffix could provide more descriptive help text for each metadata field?) Happy to hear thoughts on this approach or alternative suggestions!How to Test
config.yml: Test each mode (disable,tooltip,labeled,full) by changing thesubmission.importExternal.viewModevalue. Observe no regressiontooltipandfullmodes (should already be covered in unit tests)Checklist
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.