Skip to content
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

Image order override does not work consistently on the admin site #1077

Closed
2 tasks
kseniaryzhova opened this issue Sep 13, 2022 · 4 comments
Closed
2 tasks
Labels
🐛 bug Something isn't working 🚫 wontfix This will not be worked on

Comments

@kseniaryzhova
Copy link

kseniaryzhova commented Sep 13, 2022

Describe the bug
Performing the same action doesn't always yield the same results - MR (Mac, Vivaldi) tried to reorder an image with one that was not adjacent - it worked the first time but the other times it did not. For me (KR, PC, Chrome), the field for dragging images to rearrange is very small and it is hard to preview whether I'm doing the right thing (no yellow border appears to indicate which image I am switching when I drag another image to rearrange; a red circle appears if I've exceeded the confines of the dragging field).

To reproduce
Steps to reproduce the behavior:

  1. Go to the admin site and search for any document with joins and an image (Cannot filter by joins yet)
  2. Click on any one of these join documents with images.
  3. Scroll down to image order override.
  4. Try to rearrange thumbnails, especially those that are not adjacent.

Expected behavior
I expect identical actions to yield identical results - if I drag an image and move it to a non-adjacent position, I expect that to work each time. I also expect a clearer preview of what I am about to do (i.e. yellow border around the other image to indicate new placement of image).

Screenshots
KR (PC, Chrome): https://princetongeniza.slack.com/files/U026R91M8BE/F041SM2M7TR/change_document___princeton_geniza_project_site_admin_-_google_chrome_2022-09-13_12-01-24.mp4
MR (Mac, Vivaldi): https://capture.dropbox.com/fkdo5pk43JTFjm5A


dev notes

  • drag and drop stimulus component
  • the js should be a separate file, referenced explicitly in the media for the form or model admin
@kseniaryzhova kseniaryzhova added the 🐛 bug Something isn't working label Sep 13, 2022
@kseniaryzhova kseniaryzhova changed the title Image order override does not work smoothly on the admin site Image order override does not work consistently on the admin site Sep 13, 2022
@blms blms self-assigned this Sep 13, 2022
@rlskoeser
Copy link
Contributor

There's a stimulus sortable component with support for drag and drop; I would like to see if we can use this instead of the custom drag & drop code we have now.

https://www.stimulus-components.com/docs/stimulus-sortable

@kseniaryzhova
Copy link
Author

@blms do you have any ideas for an easy fix? If not, we can live with it and close.

@blms
Copy link
Contributor

blms commented Nov 23, 2022

@kseniaryzhova I think the component that Rebecca posted would help. If the demo for that component seems to work better for you, it may be worth doing. Would likely be a handful hours to swap them out.

@kseniaryzhova
Copy link
Author

@blms I haven't heard anyone else complain about this, and I haven't had any issue with in regularly. Let me close this, and if this issues pops up again we can reopen and invest the hours. Thanks so much!

@rlskoeser rlskoeser added the 🚫 wontfix This will not be worked on label Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 🚫 wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants