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

Official drag and drop support #581

Merged
merged 5 commits into from
Mar 11, 2016
Merged

Conversation

oparoz
Copy link
Contributor

@oparoz oparoz commented Mar 10, 2016

Solution for #405, replaces #519

  • You can drag images and albums to any album or the breadcrumb
  • If successful, the photowall is redrawn
  • If you're not allowed to make the change, elements go back to their initial position

Possible improvements

  • Drop targets could be nicer Done
  • Dragged albums maybe need a border? After extensive use, I don't think so

Screencasts

http://screencast-o-matic.com/watch/cDnl0rhWt7

Screenshot
dropzones

Test plan

Name at least one file and one folder with numbers only

As a logged-in user:

  • Drag a file to a folder and drop it
  • Drag a file to a breadcrumb and drop it
  • Drag a folder to another folder and drop it
  • Drag a folder to a breadcrumb and drop it
  • Make sure sometimes the number folder is the target and sometimes the dragged object
  • Test on as many browsers as you can. Some browsers don't handle authorization the same way

Do the same on the public side, but make sure you've added the "editing" permission to the link.

Caveats

Read the FAQ in #405

TODO

  • Create our own instance of Files.Client so that we can pick the URL to use

@jancborchardt @jospoortvliet @setnes @deMattin @arkascha @elpraga @sualko @Bugsbane @mmattel
@karlitschek @LukasReschke @tahaalibra @viraj96 @imjalpreet @mbtamuli @rahulgoyal030

@oparoz oparoz self-assigned this Mar 10, 2016
@oparoz oparoz added this to the 9.1-current milestone Mar 10, 2016
@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @raghunayyar, @jancborchardt and @imjalpreet to be potential reviewers

@oparoz
Copy link
Contributor Author

oparoz commented Mar 10, 2016

It's ready to review again. Test plan has been updated.
@jancborchardt - Would be good to get your go ahead regarding the dropzones

@mbtamuli
Copy link

@oparoz All the tests successfully passed! 👍
Just one problem on the Gallery side.

Logged In

  • The Dropzones are properly marked.
  • Numbered files and Folders can be dragged and dropped.
  • Drag and Drop to breadcrumbs are working.

Public

  • From the Gallery side, there was no option to add the "editing" permission to the link. So, no drag and drop. @tahaalibra @imjalpreet @viraj96 Can you confirm?

Tested on -

  • Chrome v49/Ubuntu15.04
  • Firefox v44/Ubuntu15.04

Two other warnings came up, though maybe not due to this PR.

  • Deprecation warning: tipsy is deprecated. Use tooltip instead.
  • When I click the share link, the first time after loading the page, only on the Gallery side this warning is logged.
    Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience.

@imjalpreet
Copy link
Member

@mbtamuli Yeah, you are right. Right now, there is no option to give editing permission to the link from the gallery side. I am working on that Issue ( #565 ).

@oparoz
Copy link
Contributor Author

oparoz commented Mar 11, 2016

Thanks @mbtamuli . The deprecation warning comes from core and the synchronous XMLHttpRequest warning is generated by the imported share class. It waits on getting the shares before building the UI. That could be fixed by using a spinner and dynamic resizing like in the infobox.

@tahaalibra
Copy link
Contributor

tested on various conditions...working fine...only thing is that no option editing permission and also i can drag and drop files/folder in public view....it fails but i think it would be better to remove the option of drag and drop in public view( when editing permission is not given )

@oparoz
Copy link
Contributor Author

oparoz commented Mar 11, 2016

@tahaalibra - Permission checking on the public side shouldn't be too hard to implement for anybody once this is merged :)

You need to tap and hold to be able to move elements
HTML5 data properties can be anything and if a folder only contains numbers as its name it will be considered a number and String operations will fail
@oparoz oparoz force-pushed the official-drag-and-drop-support branch from 7b52960 to fe25174 Compare March 11, 2016 18:45
oparoz added a commit that referenced this pull request Mar 11, 2016
@oparoz oparoz merged commit e60e79b into master Mar 11, 2016
@oparoz oparoz deleted the official-drag-and-drop-support branch March 11, 2016 18:54
@oparoz oparoz mentioned this pull request Mar 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants