? ? Pending

User tests: Successful: Unsuccessful:

avatar asika32764
asika32764
26 Mar 2017

Summary of Changes

Add drag & drop file to install extension package.

The drag zone is whole page of the Extensions -> Manage -> Install view and it works for 4 tabs now only works for Upload package file tab.

Testing Instructions

Go to Extensions -> Manage -> Install and drag file from desktop to browser. Joomla will auto upload it to install.

Images

drag-upload

avatar asika32764 asika32764 - open - 26 Mar 2017
avatar asika32764 asika32764 - change - 26 Mar 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 26 Mar 2017
Category Administration com_installer Language & Strings
avatar asika32764 asika32764 - change - 26 Mar 2017
Labels Added: ? ?
36baf3e 26 Mar 2017 avatar asika32764 Typo
avatar dgt41
dgt41 - comment - 26 Mar 2017

Formdata is not supported in IE8 http://caniuse.com/#search=formdata
so we need some sort of fallback (in tinymce we have a message)

avatar brianteeman
brianteeman - comment - 26 Mar 2017

First of all thank you very much for doing this. I drag and drop all the time to upload extensions and its a pain to hit the very small target so this will make a great difference

We have drag and drop in one other place in Joomla which is for images within tinmyce and it would be good if you could make the language string here match.

So can you change the string to "Drag and Drop ...." not just Drag

Secondly I can see in the tinymce plugin for dragndrop (media\editors\tinymce\plugins\jdragdrop\plugin.js) that we have a check and an error if the users browser doesnt support drag drop. So I presume we need a similar to check here?

80ad896 26 Mar 2017 avatar asika32764 CS
avatar brianteeman
brianteeman - comment - 26 Mar 2017

I see that @dgt41 was writing the same thing at the same time as me ;)

avatar asika32764
asika32764 - comment - 26 Mar 2017

Thanks for the feedback, I'll try fix the IE8 issues later.

avatar asika32764
asika32764 - comment - 26 Mar 2017

Added a hint to notice IE8 users which is not support drag&drop upload. I don't have Windows now, could anyone help me to test?

The language key wrote by @dg41 is only for Tinymce plugin and hard coded the image words in language string, so I added 2 new language keys for this feature in com_installer.

avatar infograf768
infograf768 - comment - 26 Mar 2017

It works, but one has no idea that Drag and Drop is possible at looking at the UI.
I suggest adding this information on the page.

avatar brianteeman
brianteeman - comment - 26 Mar 2017

@infograf768 the same could be said of the drag and drop of images in
tinmyce ;) I dont deel it is necessary as it is a standard web pattern now

http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
Virus-free.
www.avg.com
http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On 26 March 2017 at 11:25, infograf768 notifications@github.com wrote:

It works, but one has no idea that Drag and Drop is possible at looking at
the UI.
I suggest adding this information on the page.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#14905 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8RwfLpGmVHvD8Kii8vaRHNWhLaClks5rpj0HgaJpZM4MpX-_
.

--
Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
https://brian.teeman.net/ http://brian.teeman.net/

avatar asika32764
asika32764 - comment - 26 Mar 2017

It works, but one has no idea that Drag and Drop is possible at looking at the UI.
I suggest adding this information on the page.

I have considered about this but I didn't implement this message yet, I'm open to let people decide what to do.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 26 Mar 2017

@infograf768 i guess most Users are surprised that its not working (like this PR allow). So you have experienced Users and they should got Info by Release-Data.

avatar infograf768
infograf768 - comment - 26 Mar 2017

When we edit TinyMCE plugin, it is indicated.
screen shot 2017-03-26 at 12 29 09

It is indeed not indicated when using tinyMCE as an editor to drop images into the textarea.

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 26 Mar 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 26 Mar 2017

I have tested this item successfully on 9641792


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14905.

avatar brianteeman
brianteeman - comment - 26 Mar 2017

@infograf768 that is for the drag and drop of moving the tinymce buttons. NOT for the drag and drop image uploading ;)

avatar brianteeman
brianteeman - comment - 26 Mar 2017

@franz-wohlkoenig it has always worked (a bit) - just that you had to drop it on the button and then click on the upload button. This PR makes it work as it should

avatar brianteeman
brianteeman - comment - 26 Mar 2017

would something like this be acceptable to you

screenshotr11-39-30

avatar jeckodevelopment
jeckodevelopment - comment - 26 Mar 2017

In many applications, when there's the opportunity to drag and drop, there's a kind of dashed border to highlight the area in which you can drag and drop the file/whatever

avatar Bakual
Bakual - comment - 26 Mar 2017

The drag zone is whole page of the Extensions -> Manage -> Install view and it works for 4 tabs.

Imho it should only work on the "Upload Package File" tab. To me it doesn't make much sense and could beconfusing to be able to drop a file into the "Install by URL", "Install from Folder" or "Install from Web" tab.
Also, the code should be added by the plugin responsible for that tab (https://github.com/joomla/joomla-cms/blob/staging/plugins/installer/packageinstaller/tmpl/default.php) and not by com_installer.

avatar dgt41
dgt41 - comment - 26 Mar 2017

@asika32764 can you move the code to the file form field (maybe with an option allowdnd) ?
This way we make it available everywhere, not only in this page

avatar brianteeman
brianteeman - comment - 26 Mar 2017

oh i didnt spot it worked in all tabs - that is indeed confusing

http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
Virus-free.
www.avg.com
http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On 26 March 2017 at 12:08, Thomas Hunziker notifications@github.com wrote:

The drag zone is whole page of the Extensions -> Manage -> Install view
and it works for 4 tabs.

Imho it should only work on the "Upload Package File" tab. To me it
doesn't make much sense and could beconfusing to be able to drop a file
into the "Install by URL", "Install from Folder" or "Install from Web" tab.
Also, the code should be added by the plugin responsible for that tab (
https://github.com/joomla/joomla-cms/blob/staging/plugins/installer/
packageinstaller/tmpl/default.php) and not by com_installer.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#14905 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8dNQ1k9NDzJvmnKJibv3a1XXhSSkks5rpkcbgaJpZM4MpX-_
.

--
Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
https://brian.teeman.net/ http://brian.teeman.net/

avatar brianteeman
brianteeman - comment - 26 Mar 2017

@jeckodevelopment look at how its done in the tinymce plugin we already have for image uploads. You only get the box when you are dragging and dropping - not before

avatar Bakual
Bakual - comment - 26 Mar 2017

an you move the code to the file form field (maybe with an option allowdnd) ?
This way we make it available everywhere, not only in this page

It's an idea, but it would have to work also when multiple file fields are present in a form. You can't have the whole form be the trigger area in this case. You probably need an attribute which specifies the area identifier.

avatar dgt41
dgt41 - comment - 26 Mar 2017

@Bakual I guess we can append (programmatically) some unique classes to the drop area and have the script loop through the classes and do it's magic

avatar asika32764
asika32764 - comment - 26 Mar 2017

Imho it should only work on the "Upload Package File" tab.

I didn't put code in plugin because I set whole page as the drag zone. And the upload from file function is hard coded in com_installer InstallerModelInstall, then the ajax upload must add a new task to controller, it is deep coupled to core installer component, so I decided to make the feature works for all tabs. This concept also inspired by phpMyAdmin, it can drag file in any pages to import SQL file. (If someone always click the select file button, they won't notice this function, but if someone try to drag file to the small button, they will notice that there is a new feature...)

I can move code to plugin and make the drop zone only in install from upload tab content, but we need a box with dashed styling, I'm not sure how should I do this layout (what size? color? and etc...).

can you move the code to the file form field (maybe with an option allowdnd) ?
This way we make it available everywhere, not only in this page

@dgt41 It is a good idea for a drag & drop file field, but it is too big to me to implement this feature since I just got one night free to do this. Let's make this PR work first and leave the new field for future PRs.

avatar asika32764
asika32764 - comment - 26 Mar 2017

@dgt41

About the drag & drop field, since Javascript is not able to inject file path to HTML file input, we have only two way that use ajax to send POST uploading or convert file to base64 and store in text field.

I have implemented this feature in my RAD framework, see:
default

But we must consider about this is not a standard way for JForm process, developer must manually handle the ajax or base64 string for every fields.

avatar joomla-cms-bot joomla-cms-bot - change - 27 Mar 2017
Category Administration com_installer Language & Strings Administration com_installer Language & Strings Front End Plugins
avatar asika32764
asika32764 - comment - 27 Mar 2017

UPDATE

Based on discussion, moved code to plg_installer_packageinstaller and limited this function only work for Upload Install tab, also added the message to notice user.

I still set whole page as drag zone, whether we should create a dashed box depends on future discussion.

avatar asika32764 asika32764 - change - 27 Mar 2017
The description was changed
avatar asika32764 asika32764 - edited - 27 Mar 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 27 Mar 2017

@asika32764 lets chose the Way People expect: i guess its a dashed box, if this is best Practice.

avatar asika32764
asika32764 - comment - 27 Mar 2017

Create a new PR in #14924 that we can discuss for the new box layout.

avatar infograf768 infograf768 - change - 27 Mar 2017
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2017-03-27 15:03:38
Closed_By infograf768
avatar joomla-cms-bot
joomla-cms-bot - comment - 27 Mar 2017
avatar joomla-cms-bot joomla-cms-bot - change - 27 Mar 2017
Closed_Date 2017-03-27 15:03:38 2017-03-27 15:03:39
Closed_By infograf768 joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 27 Mar 2017
avatar infograf768
infograf768 - comment - 27 Mar 2017

Closed as we have new PR #14924


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14905.

Add a Comment

Login with GitHub to post a comment