-
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
Added support for change list sizes on bundle edit #3266
Conversation
@oscar-escire : Thanks for the PR. Just a note that this PR is failing existing specs ( |
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 @oscar-escire!
As I commented on the ticket, there is already a way to move a bitstream to a different page, though at the moment it seems it's a bit buggy, and clearly people don't know about it, so it needs to be made more apparent
However, that doesn't mean it's a bad idea to add the ability to set a page-size to this page. Your PR works, so I don't see why we couldn't include this as well
A few comments though:
- The tests are currently failing, it seems likely these changes have broken some pre-existing tests
- It would be a good idea to refactor the gear and all the logic involved into a separate, dedicated component
I don't oppose changing the list size, but in yesterday's meeting I thought of an alternate approach which should work (if it is workable!) for lists of any size: cut/paste. Many tools do this by simply remembering that the user requested to cut a list element and then moving the element to the target position when "paste" is done. |
Thanks @tdonohue, @artlowel, @mwoodiupui! I have updated the PR attending your comments.
By now I prefer no to move the logic of the page size to a separated component because the PaginationComponent include the necessary to change the page size in the lists, but it doesn't fit very wheel in the bundle's drag and drop list' case so, that configuration options its hidden |
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 @oscar-escire!
The latest changes make it more clear how moving an item to a different page works.
The issue where the loading component for the next page sometimes doesn't disappear until something else moves isn't solved yet. But we're already working on #3154, so we'll fix that in the context of that PR
@oscar-escire and @artlowel : I noticed this was already at +1, so I was trying it out myself. While the Page Size option works well, I cannot seem to get the drag & drop to a different page to work. Is it supposed to work? I've tried this:
In the backend logs, I see this error:
It looks like it's trying to add the moved bitstream to position 10 (the last position on page two?), when it should be likely moving it to the first position on page two? I've also tried moving the one Bitstream on page 2 onto page 1. But, that also fails with a similar error:
Maybe it doesn't work as soon as you change the page size from the default of 10? |
Closing, as this doesn't fully work & now appears to have been fixed in #3464 (and the port PRs). I've just verified that PR fixes the same issue, along with several accessibility fixes. At that PR is nearly completed / approved, I'm closing this one as a duplicate. Nonetheless, thanks @oscar-escire for your work on this. It's a shame we were not able to get this merged prior to another PR fixing the same problem. |
References
Add references/links to any related issues or PRs. These may include:
Description
Added a button for change element list size
Instructions for Reviewers
List of changes in this PR:
Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You do not need to complete this checklist prior creating your PR (draft PRs are always welcome).
However, reviewers may request that you complete any actions in this list if you have not done so. If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
main
branch of code (unless it is a backport or is fixing an issue specific to an older branch).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.