Submission Form Allows Deletion of All Repeating Item Entries
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- angular, typescript
- Domain
- frontend
Research direction
The delete button is wired to removeItem() in src/app/shared/form/form.component.ts, which the report links at version 8.4 and 10.1 for comparison. Start there, then reproduce in a submission form repeatable field: add an entry, delete the first, and check the remaining one. Done means a lone remaining entry has no delete button and the last entry cannot be removed, with the add-more button still visible.
Written by the indexing model from the issue text.
Description
Describe the bug
When clicking the "Add More" button in a submission form, and then deleting the first item in the array of two, the trash / deletion button remains next to the single item, allowing deletion of all items in the array, and removing the add more button, forcing the user to reload the page if they want to add values to that submission form input. Running DSpace 8.4, appears on both Chrome and Safari.
After investigation, this bug does not appear in the newest stable release of DSpace (10.1), and I believe this is because the removeItem() function that the delete button calls was changed in version 10.x – see the difference between version 8.4 and version 10.1 here, where in the latter, the function checks the form array length and only removes the input if it is greater than 1.
I haven't tested it, but I therefore believe this issue affects all DSpace versions 8.x and 9.x, since this code only exists in 10.x.
To Reproduce
- Begin the submission process
- Type something into a repeatable form element
- Click 'Add More'
- Delete the first element where a value exists
- The empty element should have a delete button that allows removal of all inputs
Expected behavior
Single elements in repeatable input arrays should not have the delete button appear.
Related work
TBD
- Dominant language
- TypeScript
- Stars
- 180
- Forks
- 577
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 115
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DSpace/dspace-angular
-
Visual issues with qualdrop fieldsPossibly taken @DanGastardelli claimed this 5 days ago. Openaffects: 10.x affects: 9.x bug claimed: Acervos Digitais component: submission Difficulty: Low ux
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
DSpace/dspace-angular#6412 · 3 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Facet headings have incorrect clickable area to expand/collapsePossibly taken @jesielviana claimed this 2 days ago. Openaccessibility affects: 10.x affects: 8.x affects: 9.x bug ux
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
DSpace/dspace-angular#6364 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Author browse links on item page open in a new tab, unlike other browse linksPossibly taken @jesielviana claimed this 26 days ago. Openaffects: main bug component: Item low priority
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DSpace/dspace-angular#6268 · 4 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Mathjax single dollar sign delimiter configuration causes unintentional math rendering in abstractsOpenbug needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
DSpace/dspace-angular#6263 ·
Maintainers usually reply within 1 day
-
UI spacing regression on ds-generic-item-page-field (extra spaces around metadata values) in v10.xOpenaffects: 10.x affects: main bug component: Item ux
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DSpace/dspace-angular#6254 · 1 comment ·
Maintainers usually reply within 1 day
All issues in DSpace/dspace-angular
Similar issues
-
needs-area-label
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
liberation-data/drivine#615 ·
Maintainers usually reply within 1 day
-
backend bug ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
geolens-io/geolens#3639 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
radius-project/ai-extensions#1196 ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 88/100