text icon indicating copy to clipboard operation
text copied to clipboard

When opened in edit session, sidebar and file picker don't work

Open jospoortvliet opened this issue 5 years ago • 5 comments

Describe the bug When opening Text from the desktop file manager, a special session is open which lacks support for the sidebar (clicking the button does nothing) and file picker. The close button also acts a bit odd - well, doesn't really do much at all ;-)

To Reproduce Steps to reproduce the behavior:

  1. Go to your file manager, go in a Nc synced folder and right-click a markdown file
  2. From the menu, pick Nextcloud -> edit

Expected behavior Browser shows up. In the browser, editing works, but inserting a image, or linking to a file on Nc, using the sidebar or closing using the close button all don't work.

Nc 20/beta3 on cloud.nc.c

jospoortvliet avatar Sep 15 '20 14:09 jospoortvliet

Yep, as discussed already, the sidebar/filepicker will be something very hard to achieve due to the anonymous session that is used for direct editing but I'll look into the close behavior

juliusknorr avatar Sep 15 '20 19:09 juliusknorr

Yep, as discussed already, the sidebar/filepicker will be something very hard to achieve due to the anonymous session that is used for direct editing but I'll look into the close behavior

At SOME point we'll have to detect the user is logged in and just open the file directly, but the close behavior and hiding the sidebar open button which doesn't work will solve 90% of the problem... Plus, this isn't the highest priority problem. You can edit files, that's what matters.

jospoortvliet avatar Sep 24 '20 11:09 jospoortvliet

It's still reproduceable.

luka-nextcloud avatar Nov 07 '22 16:11 luka-nextcloud

At SOME point we'll have to detect the user is logged in and just open the file directly, but the close behavior and hiding the sidebar open button which doesn't work will solve 90% of the problem... Plus, this isn't the highest priority problem. You can edit files, that's what matters.

Yes, if the user is logged in we should definitely just redirect for the desktop case and hide the button otherwise :+1:

Code wise this should be straight forward in https://github.com/nextcloud/text/blob/8cdb2d22fc42c60e03f480b1ddecfe328dbaaf42/lib/DirectEditing/TextDirectEditor.php#L162 to detect if the user is logged in and then just redirect.

juliusknorr avatar Nov 07 '22 16:11 juliusknorr

For hiding the button we should check if android/iOS is used in the apps web view and if not hide it accordingly:

https://github.com/nextcloud/text/blob/master/src/views/DirectEditing.vue#L32

Might be related to some further standardisation of the direct editing interfaces so partly related to https://github.com/nextcloud/text/issues/1170

juliusknorr avatar Nov 07 '22 16:11 juliusknorr