Add 'Add URL bitstream' feature to workspace items#110
Open
amadulhaxxani wants to merge 1 commit intoclarin-v7from
Open
Add 'Add URL bitstream' feature to workspace items#110amadulhaxxani wants to merge 1 commit intoclarin-v7from
amadulhaxxani wants to merge 1 commit intoclarin-v7from
Conversation
Introduce an "Add bitstream from URL" action for workspace items: add a conditional button and modal UI to input a file URL and optional name. Implement component support using ScriptDataService to call the 'file-downloader' script, manage processing state, show success/error notifications, and navigate to the created process detail on success. Add related unit tests (scriptDataService stub, UI visibility, invocation params, success/failure flows) and update English and Czech i18n strings.
There was a problem hiding this comment.
Pull request overview
Adds a contextual “Add bitstream from URL” action to workspace-item actions, leveraging existing Processes/Script infrastructure (file-downloader) to make the feature discoverable during submission editing.
Changes:
- Adds a conditional workspace-item action button and modal to input a URL + optional bitstream name.
- Invokes the
file-downloaderscript viaScriptDataService, shows success/error notifications, and navigates to the created process on success. - Adds unit tests for visibility, invocation parameters, and success/failure flows; updates EN/CS i18n strings.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/assets/i18n/en.json5 | Adds English UI strings for the new workspace-item action + modal. |
| src/assets/i18n/cs.json5 | Adds Czech UI strings for the new workspace-item action + modal. |
| src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.ts | Implements modal state + file-downloader script invocation and post-success navigation. |
| src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.html | Adds the conditional action button and modal UI (URL + optional name, processing spinner). |
| src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.spec.ts | Adds unit coverage for button visibility and invocation/success/failure behavior. |
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.
Introduce an "Add bitstream from URL" action for workspace items: add a conditional button and modal UI to input a file URL and optional name. Implement component support using
ScriptDataServiceto call thefile-downloaderscript, manage processing state, show success/error notifications, and navigate to the created process detail on success. Add related unit tests (scriptDataServicestub, UI visibility, invocation params, success/failure flows) and update English and Czech i18n strings.Problem description
Users could technically run the
file-downloaderscript via the generic processes UI, but that flow is not contextual to workspace-item editing and is less discoverable for submitters.Issue #28 requires an indirect, workspace-item-local UX similar to existing contextual script-trigger patterns in the app.
Analysis
e.g. image.png) to communicate extension expectationscriptWithNameExistsAndCanExecuteScriptDataService.invoke('file-downloader', ...)-u,-w, optional-n)Validation
yarn run test:headless --include='**workspaceitem-actions.component.spec.ts'✅ PASS (13/13)yarn run lint --quiet✅ PASSyarn run build:prod✅ PASS (with pre-existing custom-theme unused-file warnings only)Copilot review