Special:Badtitle/NS90:User talk:Shortstheory/GSoC 2016 Project Idea: File Trays for file selections in Dolphin
The Idea
Introduction
Selecting multiple files in any file manager for copying and pasting has never been a pleasant experience, especially if the files are in a non-continuous order. Often, when selecting files using Ctrl+A or the selection tool, we find that we need to select only a subset of the required files we have selected. This leads to the unwieldy operation of removing files from our selection. Of course, the common workaround is to create a new folder and to put all the items in this folder prior to copying, but this is a very inefficient and very slow process if large files need to be copied. Moreover, the use of Ctrl+Click to select files is not a user-friendly operation - it requires fine motor control to not accidentally release the Ctrl key which will cause one to lose the entire selection of files.
My solution to this problem is to add a Places option in Dolphin where the links to files and folders can be temporarily saved for a session. The files and folders are "staged" on this panel. Files can be added to this tray by using a right-click context menu option, using the mouse scroll click, or drag and drop. As an additional option, the session for the File Tray Panel can be saved for later use. Hence, complex file operations such as moving files across many devices can be made easy by staging the operation before performing it.
Hence, the user can add folders and files from several different directories to this panel and can then collectively perform actions on all the items in the tray such as copy, paste, cut, delete, send via Bluetooth, create a list of symbolic links, etc. I also plan to integrate the KDE Purpose Framework API in Dolphin to improve the sharing options of the application as a whole.
This File Tray will be accessible through the existing Split view function in Dolphin as well as a directory available under the Places panel section. This would make it neatly integrated with Dolphin's existing toolset while remaining as unimposing as possible.
Use Cases
- Jerry has a large music collection on his computer and he has many devices such as a tablet, a smartphone, an HTPC, and a USB drive for his car audio. He needs only a subset of his music files from his extensive collection which he wants to keep on all his devices. Hence, to avoid making the same selection over and over again for each device, it's much more efficient for him to just create his list on the File Tray and then to copy the same list to each device.
- George is a student at university and he has a lot of unorganised files on his computer from lots of different directories. By selecting these files and staging them on the File Tray in a split view mode, he can easily discern where each file should go. He can then easily move files by simply dragging and dropping them in the directory they belong in. This makes the File Tray a helpful tool for file organisation.
- Cosmo keeps forgetting where he keeps his important files as they are often hidden deep within directories and sub-directories. The File Trays feature can come to the rescue here by letting him stash the files in the File Tray and hence it will save him time from drilling deep into directories for a file. Hence, the File Tray can also be used for making quick shortcuts for files. For this I plan to add a feature and user preference to allow the user to restore the Tray from the previous session and to have the option of making the Tray retain the files stored in it across sessions. To extend on this, the list of files on the File Tray can be exported as a list of symbolic links.
Features
File Tray Specific Features
The File Tray's most important and useful feature is that it is a volatile collection of directory URLs. It will be able to interact seamlessly with the existing Dolphin view for file manipulations. It's strong points will be its accessibility, discreteness, and emphasis on keyboard shortcuts. It will also be supplemented with useful context menus. As explained under the Interaction Model, using the mouse scroll click on a file in the active directory will immediately add it to the File Tray.
The File Tray will also support an option to save sessions. This means the list of files added to the File Tray can be saved to a file for later use. This is helpful if one has a large number of files which need to copied to several different devices and the same selection has to be made repeatedly. It will also have the option to "Restore the Last Used Session".
Another useful feature which can be implemented through context menu options is to add the results of a search result from the active directory to the File Tray.
General Features
Also, there are a few more features I want to add to make the File Tray more powerful. However, these features are probably a better fit for Dolphin in general, and then the File Tray can use these functions from Dolphin:
- The ability to create symbolic links of a selection of files. Nautilus has been doing this for a while.
- Automatically create a media playlist file by selecting media files. This can be expanded to other kinds of media types for more collective actions.
- Adding support for the KDE Purpose Framework in Dolphin to make sharing files easier.
User Interaction Model
Keeping in line with Dolphin's philosophy, this feature is designed to be as unobtrusive as possible.
The File Tray will behave exactly like any other directory in Dolphin. However, the interaction model is not entirely obvious at first glance.
For example, using Copy on a selection of files and Pasting in the File Tray will populate a list of the folders in the Tray. Now, copying these files from the File Tray and pasting them to another directory will retain the files on the Tray while creating a copy of these files at the chosen directory.
Using a Cut on a selection of files on the File Tray will remove the files on the File Tray while copying them to the chosen directory.
However, one interaction which I feel will create a lot of confusion would be moving the files to the File Tray. This will be confusing as moving files to a virtual directory is not possible as the files simply exist as URLs on the Tray. Hence, the context menu will have a minor modification to disable/remove the Move option to the Tray. If items are pasted from the Clipboard, the files will still remain in their source directory, regardless of whether they have been Cut or Copied from the source directory.
On the other hand, there will be two options for Removing files from the File Tray. One option will simply purge the chosen files from the list in the File Tray and the other option will move the selection from the source directory to the Trash.
Furthermore, by default, the File Tray will not retain the files added in it across Dolphin sessions though there will be options to load a session from a file and to restore a previous session.
The File Tray will have its own shortcut such as Ctrl+W (of course the keyboard shortcut is subject to change). Invoking this shortcut on a selected number of files in the Active Directory should immediately open the File Tray and add all the Files in the selection there. Moreover, the Split view will be disabled whenever the File Tray is active. If the split view is open when the File Tray keyboard shortcut is activated, the Split view of the inactive directory will close and will be replaced with the File Tray.
Additionally, the mouse scroll click can be used for one-click additions of items in the active directory to the File Tray. This will make the experience to using similar a touchscreen to select multiple files on a smartphone's photo manager.
Also, the File Open dialog will undergo some minor modification to include a places option for the File Tray, so users can select items directly off the Tray for other programs.
Implementation
The File Trays implementation is not completely resolved yet, but currently I want to create a new KIO Slave dedicated to the File Tray. Implementing a KIO Slave will make this project extremely versatile as it will allow several other KDE programs (such as Konqueror) to also benefit from such a feature. Creating a Plasmoid (see Future Roadmap) for the same will also be much easier as it will be no more difficult than simply using the existing Folder view Plasmoid by setting the directory to filetray:/ and creating some more context menu specific actions (I will probably need a better name than filetray:/ for it though).
This will be followed up with minor changes to the Dolphin GUI. For instance, File Tray will appear as another option under the Places panel and the view in Dolphin for displaying the File Tray will undergo minor changes in the context menu to incorporate some File Tray specific options.
Files added to the File Tray will have a small "badge" icon on their file icon to show that the File has been marked on the File Tray.
Future Roadmap
Early discussion about this project on the KDE mailing lists yielded the interesting idea of having a Plasmoid which displays the contents of the File Tray on the Desktop. This Plasmoid will increase the scope of this project much beyond Dolphin as multiple applications can then interact with this Plasmoid to add items to the File Tray. However, this Plasmoid is at best a stretch goal for this GSoC project as it may not be completed during the coding period. As such, it is not part of the minimum deliverable feature list of this project.