-
Notifications
You must be signed in to change notification settings - Fork 437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CST-12044 visualize the primary bitstream & CST-12043 primary bitstream flag #2631
CST-12044 visualize the primary bitstream & CST-12043 primary bitstream flag #2631
Conversation
…3-primary-bitstream-flag
…ize-the-primary-bitstream
…eam-flag' into CST-12043-primary-bitstream-flag
…ize-the-primary-bitstream
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vNovski : Thanks! Tested and reviewed this today. It looks good overall & works! That said, I found a small bug, and I think we may want to look at the layout of the page a bit.
Here's what I see on the submission form with this PR (and the backend PR):
A few points about that layout:
- The "Primary Bitstream" header is aligned right, while the buttons are aligned center. It makes it look a bit odd.
- I think we need a header over the file section that says something like "File Details" or "File Information". That would make it clear this is a table of information.
- (Not Required) I'm starting to wonder if we should rename the "Primary Bitstream" header on the submission form to say "Primary File" or "Primary?". I noticed that submission form doesn't use the term "bitstsream". So, we may want to consider just calling everything a "file" on this page.
One small bug that I noticed: If you click on a primary bitstream, then accept/reject the license, then change the primary bitstream the changes are not saved. Here's how to reproduce:
- Upload at least to bitstreams on the submission form
- Select one as primary (should succeed)
- Now either check or uncheck the license checkbox
- Immediately select the other bitstream as the primary bitstream.
- No error will occur, but the primary bitstream is unchanged. It appears the PATCH request sent was only to update the license checkbox and NOT for the new primary bitstream.
I have a few other minor comments inline. Overall though this all looks good.
src/app/submission/sections/upload/file/section-upload-file.component.html
Outdated
Show resolved
Hide resolved
src/app/submission/sections/upload/file/section-upload-file.component.html
Outdated
Show resolved
Hide resolved
For the pull request, I made the following changes:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @vNovski ! This looks good except for a very minor issue. I have retested & verified that all prior bugs are fixed and everything else looks good.
So, once this issue is fixed (and the backend PR is ready), then this will be ready to merge.
[checked]="isPrimary" | ||
(change)="togglePrimaryBitstream($event)"> | ||
<label class="custom-control-label" for="primaryBitstream{{fileIndex}}"> | ||
<span class="sr-only" aria-hidden="true" *ngIf="!isPrimary">{{'submission.sections.upload.primary.make' | translate:{ fileName: fileName } }}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aria-hidden=true
should be removed from this <span>
along with the one below it.
I think I mistakenly asked you to add this.. My apologies as I was wrong. The class="sr-only"
is all that is needed to pass accessibility checks. Currently, the accessibility checks in "axe DevTools" fail on this line because the aria-hidden=true
hides the text in the span from the accessibility scanner.
(change)="togglePrimaryBitstream($event)"> | ||
<label class="custom-control-label" for="primaryBitstream{{fileIndex}}"> | ||
<span class="sr-only" aria-hidden="true" *ngIf="!isPrimary">{{'submission.sections.upload.primary.make' | translate:{ fileName: fileName } }}</span> | ||
<span class="sr-only" aria-hidden="true" *ngIf="isPrimary">{{'submission.sections.upload.primary.remove' | translate:{ fileName: fileName } }}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, please remove aria-hidden=true
attribute
For the pull request, I made the following changes:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Thanks @vNovski !
While this has been merged, I'm flagging as |
Hi @tdonohue here's the documentation page: https://wiki.lyrasis.org/display/DSDOC8x/Set+a+bitstream+as+primary |
Please note that this development has been funded by the University of California - California Digital Library.
References
DSpace PR: DSpace/DSpace#9195
Description
INTERNAL DOCUMENTATION:
Instructions for Reviewers
Review for primary bitstream switch has been done with the following cases:
Edit Submission form
Upload files:
Scroll down to file list
activate the switch for one of the files - automaticaly saves and updates
activate the switch for another file → previous primary bitstream turns off automatically and new primary bitstream turns on then automaticaly saves and updates
deactivate the switch of current primary bitstream → primary bitstream turns off then automaticaly saves and updates
activate the switch for one of the files - automaticaly saves and updates
delete file witch is primary - file is deleted and primary bitstream is reseted then automaticaly saves and updates
open file edit modal for one of the files
open file edit modal for file witch is not primary
open file edit modal for file witch is primary
SCREENSHOTS:
Modal:
Upload Files form:
Review for badge which indicates primary bitstream has been done with the following cases:
Checklist
yarn lint
yarn check-circ-deps
)package.json
), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.