android icon indicating copy to clipboard operation
android copied to clipboard

[FEATURE REQUEST] "Open in Web" for native clients

Open pmaier1 opened this issue 2 years ago • 5 comments

Story As a client user I want to open a file in the Web Office directly from the context menu so that I can easily start collaborating with others

Specifics

  • Infinite Scale only
  • Use App provider backend
  • Timeline ~ mid August

pmaier1 avatar May 24 '22 09:05 pmaier1

@pmaier1 Open file in Web Office means open out of the mobile client (web browser)? or open inline (internal web view)?

jesmrec avatar May 24 '22 10:05 jesmrec

@pmaier1 Open file in Web Office means open out of the mobile client (web browser)? or open inline (internal web view)?

Web browser

pmaier1 avatar May 24 '22 11:05 pmaier1

Referencing iOS ticket https://github.com/owncloud/ios-app/issues/1127

pmaier1 avatar May 24 '22 15:05 pmaier1

Will be this feature something for everyone? or only for customers?

jesmrec avatar May 24 '22 15:05 jesmrec

This feature is planned for everyone @jesmrec

tbsbdr avatar Jul 19 '22 08:07 tbsbdr

Backend update: https://github.com/owncloud/client/issues/9724#issuecomment-1213150615

michaelstingl avatar Aug 15 '22 08:08 michaelstingl

@michaelstingl

First steps, authentication is done in the browser. I already logged in some minutes ago, that's why the session is kept in the video.

https://user-images.githubusercontent.com/47524927/185926116-1e1479f1-1391-4c93-a675-e65d5cfef824.mp4

abelgardep avatar Aug 22 '22 12:08 abelgardep

@michaelstingl

Open in web feature needs clarification for this first iteration.

  1. When there is no app that can open a specific file in web, we receive a 500 when asking for the uri to open it. Not sure if this is intended or not. I couldn't find info about this case in https://owncloud.dev/services/app-registry/apps/#open-a-file-with-the-owncloud-web

  2. In Android, this option is only available in the details view. Does this work for you? We have refactored lots of files in the new architecture. That means that if we need to add it somewhere else, we would implement this feature in already deleted files in the new architecture branch...

  3. Open in web option is visible as soon as open_web_url is retrieved from capabilities. When the user clicks on the Open in web option, we trigger the request to the endpoint. If we receive the Uri, we open it. If we get an error(including 1. point error) we show an error message.

abelgardep avatar Aug 26 '22 08:08 abelgardep

  1. When there is no app that can open a specific file in web, we receive a 500 when asking for the uri to open it. Not sure if this is intended or not. I couldn't find info about this case in https://owncloud.dev/services/app-registry/apps/#open-a-file-with-the-owncloud-web

Looks like a bug / not considered case in the API implementation. But shouldn't be blocker since you can get all supported mimetypes from the /app/list endpoint.

  1. Open in web option is visible as soon as open_web_url is retrieved from capabilities. When the user clicks on the Open in web option, we trigger the request to the endpoint. If we receive the Uri, we open it. If we get an error(including 1. point error) we show an error message.

Should only be offered for mimetypes from the /app/list endpoint.

wkloucek avatar Aug 26 '22 10:08 wkloucek

First iteration includes:

  • Open in web menu option located in Details view.
  • Open in web option for every available file in oCIS account. apps_url capability is only used to check the feature availability (only oCIS).
  • If open-with-web endpoints returns 200 -> uri fetched and file opened in browser (it might need extra authentication)
  • If open-with-web endpoints returns error (no matter if 4xx or 5xx) -> error displayed in app
  • If device does not have connection -> error displayed in app

TODO:

  • Check in apps_url endpoint from capabilities the available mime types to filter dynamically which should include the Open in web option and which not
  • List in menu all available apps for every file/mime type
  • Open in web option in list of files instead of Details. Once sync engine is rewritten, it could be moved as another operation in list of files.
  • Associate thumbnails to mime types as apps_url capability retrieves (N2H)
  • Improve error handling, depending on backend errors.
  • Creation of new files, when available, in backend

issues will be created.

jesmrec avatar Aug 31 '22 10:08 jesmrec