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

Open folder/main action in new tab with ctrl+click #16067

Closed
KnownNexus opened this issue Jun 25, 2019 · 23 comments
Closed

Open folder/main action in new tab with ctrl+click #16067

KnownNexus opened this issue Jun 25, 2019 · 23 comments
Labels
1. to develop Accepted and waiting to be taken care of enhancement

Comments

@KnownNexus
Copy link

KnownNexus commented Jun 25, 2019

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

@KnownNexus KnownNexus added 0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement labels Jun 25, 2019
@violoncelloCH
Copy link
Member

cc @nextcloud/designers

@jancborchardt
Copy link
Member

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.

@KnownNexus
Copy link
Author

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

@skjnldsv
Copy link
Member

skjnldsv commented Jul 22, 2019

@KnownNexus I'm not sure I understand, are you talking about browser tabs? Or asking for a new feature like internal nextcloud tabs?

@KnownNexus
Copy link
Author

@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

@skjnldsv
Copy link
Member

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 :/

@MorrisJobke
Copy link
Member

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.

@skjnldsv
Copy link
Member

For files sure, but opening a file in a new tab doesnt make sense anyway :)
Folder works

@MorrisJobke
Copy link
Member

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, ...)?

@jancborchardt
Copy link
Member

Yeah, agree with @MorrisJobke – Ctrl-Click should do the primary action in a new tab, that is, open the file or folder.

@skjnldsv
Copy link
Member

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. :)

@juliusknorr
Copy link
Member

juliusknorr commented Jul 22, 2019

This is exactly what this issue proposes 😁 Nevermind I confused the original issue

Folder

  • click opens folder
  • ctrl+click opens folder in a new tab

File

  • click opens primary file action e.g. collabora
  • ctrl+click should open a new tab with the primary action launching

@KnownNexus
Copy link
Author

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

@skjnldsv skjnldsv reopened this Jul 23, 2019
@skjnldsv skjnldsv added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap needs info labels Jul 23, 2019
@skjnldsv skjnldsv changed the title Open in new tab by default Open folder/main action in new tab with ctrl+click Jul 23, 2019
@MorrisJobke
Copy link
Member

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 ;)

@skjnldsv
Copy link
Member

As of now the Ctrl click downloads the file instead of opening it ;)

for me it starts the selection 🤔 🙈

@juliusknorr
Copy link
Member

Ah, i as always using the middle mouse button (which opens the new tab with the download of the file then) 🙈

@KnownNexus
Copy link
Author

KnownNexus commented Jul 24, 2019

I've created a pull request for my changes
/pull/16530

@godfuture
Copy link

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.

@azul
Copy link
Contributor

azul commented Mar 27, 2020

@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.

@azul
Copy link
Contributor

azul commented Mar 27, 2020

@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.

@juliusknorr
Copy link
Member

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 🙈

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.

  • Opening the file (with middle mouse button click) will open it in a new tab) this is what the existing pr already does
  • Opening the file in the same tab, should update the current url with &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
  • When closing an editor (ending the file action) the url changes back to the file list, e.g. 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.

@jancborchardt
Copy link
Member

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.)

@juliusknorr
Copy link
Member

Closing as #20185 is merged for the remaining points see #12470

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of enhancement
Projects
None yet
Development

No branches or pull requests

8 participants