Allow directly opening files/folders instead of containing folder in tray search
How to use GitHub
- Please use the 👍 reaction to show that you are interested into the same feature.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Feature request
Which Nextcloud Version are you currently using: (see administration page) 3.15.3 Windows version.
Describe the solution you'd like I have a folder containing a lot of folders with similar names that I need to manually sort and look through so I would like to search them. I disabled Windows search indexing on my Nextcloud directory because windows kept on downloading files I wanted to only keep online every time I searched for something in the parent folder.
The search function in the Nextcloud tray menu is able to find the desired sub folder, but clicking the folder only opens the containing folder and not the folder itself. This is useless to me because, as said, there are a lot of different folders and the folder names are too similar.
It looks like Nextcloud just opens the containing folder for folders or files. It would be nice if there was at least a context open to allow opening folder or files.
Describe alternatives you've considered Open folder or file by default and have open containing folder the context menu option, but that risks messing with other people's workflow since open containing folder is the current behavior.
Thanks for the feedback, we will look into improving this.
Currently this feature works as @mijioij wants it to work (as far as I am aware of).
My folders are structured as follows
And when I search I get
Upon clicking I am redirected into the folder I clicked on
Is this how you (@mijioij) wanted it to be? Or did I misunderstand?
@mike0609king That isn't the location in the tray I am talking about. It's the search results after searching an item with the tray menu's search function, not the folder listing under the standard file sync in the tray menu settings.
Side note: When I click a folder under the standard file sync tab, it opens in windows explorer and doesn't open a browser like your example suggests.
@mijioij I am not sure what you mean in that case. Could you show me a screenshot?
@mike0609king Here is where I am talking about:
If directory structure is \root\subdir\foo and foo is in the above search result, clicking the foo search result won't open explorer at foo, but at subdir.
@mijioij Thanks for the quick response. I am sure, that I use the same search tray above. Maybe it has been fixed on the current version. Which version are you using?
EDIT: I will also try it out again and take a look at the code for this.
@mike0609king The pictures you showed are only when you right click tray icon -> settings. I got to the screenshot I showed when I right click the tray icon -> Open main dialog -> enter search term in the search box and search.
I am using version 3.16.6 stable.
The difference was the Nextcloud version. It seems that the file explorer only opens in Nextcloud 20, because of the different file format for the resourceUrl. As far as I am aware we only have that file format
https://<url>/index.php/apps/files/?dir=<dir>&scrollto=<dirname>
in Nextcloud 20. The other ones send the file path in a separate attribute.
I would then implement the context menu and resolve the bug with the links in this issue.
@mike0609king It wasn't clear from your comment, is this issue due to behavior from the nextcloud server and you will only fix the bug to work with the newer server or will you fix the bug for compatibility with the older server?
@mijioij It will be fixed for both.
@allexzander (original author) or @camilasan, is the currently implemented behavior under nextcloud server version 20 the standard/intended one?
By that I mean the behavior the OP described. We want to open ".../folder/subfolder" directly in our file explorer, but when searching for it in the traymenu search bar and clicking on "subfolder" the containing folder ".../folder" opens.
From the implementation it seems to me as if this was indeed intended by the deliberate use of QFileInfo(relativePath).path() instead of simply relativePath as an argument to findFileInLocalFolders when initializing localFiles in src/gui/tray/unifiedsearchresultlistmodel.cpp line 340.
However in the web browser the clicked folder or file is directly opened, rather than the containing folder (currently the case for server versions above 20)
I ask because I am currently working on a fix for this alongside mike and in case the behavior where the containing folder is opened is the desired standard behavior then we would try to implement the behavior requested by OP as a selectable option. Otherwise we would simply make it the default behavior and fix the web browser bug for versions above 20.
I have a folder containing a lot of folders with similar names that I need to manually sort and look through so I would like to search them. I disabled Windows search indexing on my Nextcloud directory because windows kept on downloading files I wanted to only keep online every time I searched for something in the parent folder.
@mijioij checkout "Everything Search" by voidtools, instead of waiting for any changes in nextcloud. It is an epic search tool that finds results in an instant, and does not download anything from nextcloud.
@Mario-Hofstaetter I would prefer to avoid proprietary non-Microsoft third-party tools.
Together with @mike0609king we have implemented the fix for this issue. It should hopefully soon be reviewed and updated to fix your problem. If interested, the corresponding PR is #8575