Currently the default behaviour for opening a file is to either embed it in the current page or, in a new tab, is to download the file,
I think it would be good to have the file attempt to open file in a new tab by default. This would allow for the current page to be kept open, meaning you can just close the tab with the file in it, and continue with your session.
An example could be collabora online, which will open in the current window, but will only download if you open a new tab.
My suggested change would have a single click open it in a new tab, keeping the current window just containing the file system, the same would happen for ctrl-click or right click- open new tab
I have currently written a simple change which achieves this, but i wanted to get an idea of the communities views on this change
cc @nextcloud/designers
An example could be collabora online, which will open in the current window, but will only download if you open a new tab.
What do you mean by this? The download button is in the actions menu always. :)
We generally open things in the same tab unless it’s external links. Because you can also just close the file viewer or e.g. Collabora, and then you are back at the same point in files. Otherwise it leads to a whole bunch of open tabs.
Because you can also just close the file viewer or e.g. Collabora, and then you are back at the same point in files. Otherwise it leads to a whole bunch of open tabs.
However if i wanted to open several things at the same time, or to compare multiple documents, i would currently have to open several instances of nextcloud, only to close them again later.
I think it would be a better user experience to be able to have that ability by default
@KnownNexus I'm not sure I understand, are you talking about browser tabs? Or asking for a new feature like internal nextcloud tabs?
@KnownNexus I'm not sure I understand, are you talking about browser tabs? Or asking for a new feature like internal nextcloud tabs?
Browser tabs
Then I disagree :)
You can still click while pressing ctrl if you want to open in new tabs, but default should be a normal browsing.
We encountered such behaviour only once on others products and it was microsoft and was crazy confusing :/
You can still click while pressing ctrl if you want to open in new tabs, but default should be a normal browsing.
Ctrl + click will download files, because the link points to the webdav endpoint and not the web UI.
For files sure, but opening a file in a new tab doesnt make sense anyway :)
Folder works
For files sure, but opening a file in a new tab doesnt make sense anyway :)
Why not? COuldn't it simply open the details view (viewer, text app, collabora, ...)?
Yeah, agree with @MorrisJobke – Ctrl-Click should do the primary action in a new tab, that is, open the file or folder.
that sounds like a very odd behaviour to me?
imho, people are used to ctrl+click being the same action as a click but in a new tab. If we start to change this, people will get confused.
ctrl+click should still be the default same as a simple click. :)
~This is exactly what this issue proposes 😁~ Nevermind I confused the original issue
Folder
File
~This is exactly what this issue proposes grin~ Nevermind I confused the original issue
I'm perfectly happy with that compromise, it's already part of the patch i wrote originally
imho, people are used to ctrl+click being the same action as a click but in a new tab. If we start to change this, people will get confused.
Exactly - and this is not the case now.
As of now the Ctrl click downloads the file instead of opening it ;)
As of now the Ctrl click downloads the file instead of opening it ;)
for me it starts the selection :thinking: :see_no_evil:
Ah, i as always using the middle mouse button (which opens the new tab with the download of the file then) :see_no_evil:
I've created a pull request for my changes
/pull/16530
As of now the Ctrl click downloads the file instead of opening it ;)
for me it starts the selection thinking see_no_evil
for me as well (nc 16.0.4). But I think that is okay, because files in win explorer and most "linux explorer" are handled the same. ctrl mostly initiates multi select.
I think what really needs to be fixed is the fact that ctrl clicking the app icons does open the new tab, but it also redirects me to the files page in the current tab. Not really helpful.
@godfuture I just tried what you described and it seems to be fixed:
In NC 18 i ctrl-clicked on the files app icon after opening a folder. It opened the toplevel files in a new tab and the current tab stayed where i was.
@jancborchardt, @juliushaertl I was looking into the merge request above as a bit of an exercise.
Turns out i don't agree with the goal:
I also always use the middle mouse button to open things in tabs. I did not have strong expectations what would happen with a ctrl-click but i really liked that it selected a file. That also hinted to me that shift-click would also work for selections.
I think this behavior is consistent with the 'overwritten' right-click behavior. The file list behaves like a file explorer - not like a browser.
I'm happy to fix the issues in the pull request even though i don't agree with the intention. Just want to make sure this actually is what you want.
I also always use the middle mouse button to open things in tabs. I did not have strong expectations what would happen with a ctrl-click but i really liked that it selected a file. That also hinted to me that shift-click would also work for selections.
I actually just encountered that for the first time as well :see_no_evil:
I think this behavior is consistent with the 'overwritten' right-click behavior. The file list behaves like a file explorer - not like a browser.
I'm happy to fix the issues in the pull request even though i don't agree with the intention. Just want to make sure this actually is what you want.
@jancborchardt I wasn't aware that we overwrite a default browser behavior for ctrl+click do to selection instead of a new tab, is that intended?
As a general comment on the approach in #16067, I think it is only half way to how it should actually behave. The ideal solution would look like the following.
&editfile=fileId
, so that after a reload of the page you also end up with the editor open. e.g. index.php/apps/files/?dir=/Documents&fileid=3&editfile=11
index.php/apps/files/?dir=/Documents&fileid=3
In theory there is already a fileid parameter, but I cannot really tell if that is something we could also reuse for that approach.
Of course the whole editfile parameter is not really ideal at all but I think there is no real easy way around that with the current state of the files app. In an ideal world we would have self-speaking urls like /index.php/apps/files/Documents/Readme.md
which would just open the text app then above the file list when opening, but that is something for the future.
I did not have strong expectations what would happen with a ctrl-click but i really liked that it selected a file. That also hinted to me that shift-click would also work for selections.
To clarify: Yes, the intention is that Ctrl-Click opens in a new tab, as we already do e.g. for Talk conversations, the app list in the header, and lots of other places. Having it do something different just in Files would be unexpected. (Selecting is also very present already with the visible checkboxes.)
Closing as #20185 is merged for the remaining points see https://github.com/nextcloud/server/issues/12470
Most helpful comment
~This is exactly what this issue proposes 😁~ Nevermind I confused the original issue
Folder
File