web icon indicating copy to clipboard operation
web copied to clipboard

Make open file or folder in new tab a user choice

Open kulmann opened this issue 1 year ago • 10 comments

Description

We currently have a config option openAppsInTab which the admin can use to specify for the whole oCIS instance if a file gets opened in a new tab or in the current tab.

Web is built in a way that you can always return to the current context when opening a viewer/editor, so our default for that config option is opening files in the current tab. I'd like to get rid of the config option and always stick to the current tab. Opening the file/folder should really be a user choice (like it is for links on websites, where you can always enforce opening them in a new tab).

User Stories

  • As a user, I want to open a folder in my file list in a new tab so that can work in two different contexts.

  • As a user, I want to open a file in a viewer/editor a new tab so that I can open two files from the current folder and quickly jump between them via browser tabs.

Value

Tabbing usability like you'd expect it from a normal website.

Acceptance Criteria

  • remove config option openAppsInTab. We want to enforce the current tab as default and only deviate from it if the user wants it (see below)
  • file list / tiles view:
    • middle click on a file opens the clicked file in the default editor in a new tab
    • ctrl/cmd + left click on a file opens the clicked file in the default editor in a new tab
    • middle click on a folder opens the clicked folder in a new tab
    • ctrl/cmd + left click on a folder opens the clicked folder in a new tab
    • todo: how do we handle this on touch devices? long press?
  • context menu:
    • ctrl/cmd + left click on editor entry opens the clicked file in the chosen editor in a new tab
    • ctrl/cmd + left click on Open entry opens the clicked folder in a new tab
    • todo: how do we handle this on touch devices? long press?
    • show hint "Hold ctrl/cmd to open in new tab" (proposal 5C)
    • mobile: long-press shows native menu with option to open in new tab

technical detail: buttons should be links (so that they can be opened in new tab on mobile)

Definition of ready

  • [ ] Everybody needs to understand the value written in the user story
  • [ ] Acceptance criteria have to be defined
  • [ ] All dependencies of the user story need to be identified
  • [ ] Feature should be seen from an end user perspective
  • [ ] Story has to be estimated
  • [ ] Story points need to be less than 20

Definition of done

  • Functional requirements
    • [ ] Functionality described in the user story works
    • [ ] Acceptance criteria are fulfilled
  • Quality
    • [ ] Code review happened
    • [ ] CI is green (that includes new and existing automated tests)
    • [ ] Critical code received unit tests by the developer
  • Non-functional requirements
    • [ ] No sonar cloud issues

kulmann avatar Jul 18 '24 11:07 kulmann

open in new tab is usually a new context menu item and a shortcut hint to educate users about the shortcut. screenshot_002927

tbsbdr avatar Jul 18 '24 16:07 tbsbdr

open in new tab is usually a new context menu item and a shortcut hint to educate users about the shortcut. !

I know. ;-) That doesn't work for us, though. There are multiple options that can be opened in a new tab, so we would need to duplicate each and every one of them to let the user choose if current or new tab.

kulmann avatar Jul 19 '24 03:07 kulmann

thinking aloud, other possibilities to tell the user how to open something in a new tab:

  1. add a new settings like "prefer new tab" in the account settings 🫤
  2. add second option per context menu item (=kind of a split button) 😡
  3. add general "shortcuts" help page, see also https://github.com/owncloud/web/issues/10036 🫤
  4. add new-feature-callout or onboarding wizard like elizaveta did some time ago for cernbox https://github.com/owncloud/web/issues/6695
  5. add general hint text like "Hold ALT to open in new tab" to the context menu (my current favorite) 5a Group 17 5b Group 16 5c Group 15 5d Group 14 5C Group 20 5E Group 21

tbsbdr avatar Jul 21 '24 19:07 tbsbdr

No 5 is what I had in mind, too. Thanks for the mockup! Something like that. :-) Not sure about the alignment / placement, though.

kulmann avatar Jul 23 '24 04:07 kulmann

added variants

tbsbdr avatar Jul 23 '24 07:07 tbsbdr

Could you make/add two where the hint is just below the Open in collabora? one variation left-aligned with the icon, one with the text?

kulmann avatar Jul 23 '24 08:07 kulmann

jep, added 5C and 5E 5C is my favorite

tbsbdr avatar Jul 23 '24 09:07 tbsbdr

jep, added 5C and 5E 5C is my favorite

Yes, nice, 5C is good! thank you!

kulmann avatar Jul 23 '24 11:07 kulmann

@kulmann

ctrl/cmd + left click on Open entry opens the clicked folder in a new tab

Does this mean, we will have an new file action ?

AlexAndBear avatar Aug 05 '24 16:08 AlexAndBear

@kulmann

ctrl/cmd + left click on Open entry opens the clicked folder in a new tab

Does this mean, we will have an new file action ?

No, there already is an Open action for folders. And since that generates an <a> tag ctrl/cmd + left click triggers the default browser behaviour.

kulmann avatar Aug 06 '24 02:08 kulmann