nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.55k stars 3.99k forks source link

Folders not live syncing in browser #2742

Open metroidchild opened 7 years ago

metroidchild commented 7 years ago
### Steps to reproduce 1. Open up desktop synced folder 2. Open up nextcloud server in browser 3. Upload/change name/delete a file on the synced folder on pc ### Expected behaviour The web interface should live update in an interval like the synced desktop folder ### Actual behaviour The webpage doesn't update until being refreshed, and browsing to a changed filename/foldername then given an expected error because the name is not the same after syncing ### Server configuration **Operating system**: Ubuntu 16.04.1 server, running in virtualbox for testing purposes **Web server:** Apache 2.4 **Database:** MySQL 5.7 **PHP version:** PHP 7 **Nextcloud version:** 10.0.2 stable **Updated from an older Nextcloud/ownCloud or fresh install:** fresh install **Where did you install Nextcloud from:** Through the snap manager in Ubuntu like so: `sudo snap install nextcloud` **Signing status:**
Signing status ``` No errors have been found. ```
**List of activated apps:**
App list ``` do not know where to find location in snap install ```
**The content of config/config.php:**
Config report ``` do not know where to find location in snap install ```
**Are you using external storage, if yes which one:** local/smb/sftp/... no **Are you using encryption:** yes/no no **Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/... not sure ### Client configuration **Browser:** Firefox 50.1.0 Microsoft Edge 38.14393.0.0 Google Chrome 55.0.2883.87 **Operating system:** Windows 10 ### Logs #### Browser log
Browser log ``` security log: Content Security Policy: Directive 'frame-src' has been deprecated. Please use directive 'child-src' instead. logging: JQMIGRATE: Migrate is installed, version 1.4.0 jquery-migrate.min.js:2:542 javascript log: window.controllers is deprecated. Do not use it for UA detection. ace.js:1716 ```
schiessle commented 7 years ago

I like the idea... Maybe something to consider for Nextcloud 12? cc @icewind1991

nickvergessen commented 7 years ago

Renaming we should be able to take care of with the file id, this should also help on moves.

sergiomb2 commented 6 years ago

'version' => '13.0.2.1' and add files with other application does not show in web browser , How I force a refresh or sync files ?

After navigate to them ( because I know the name) the files appears .

solution: sudo -u www-data php occ files:scan

vasyugan commented 4 years ago

With all the amazing progress Nextcloud has made, it is hard to believe that the web interface still needs manual reloading to reflect changes in the background. Needless to say Google Drive, Dropbox, One Drive all don't. So maybe this could be put on the to-do-list.

PVince81 commented 2 years ago

live refreshing is likely to produce wrong clicks: imagine that you were about to click on a folder "test" but the view suddenly refreshes and now your mouse is hovering on "anothertest" due to the view shifting and then you find yourself clicking on the wrong entry

a better approach would be to show a notification like Github does "the contents has changed, please click to refresh"

jancborchardt commented 2 years ago

@PVince81 on e.g. Twitter and chat programs, when you are scrolled and there’s new content, the view does not scroll but you get the "New messages" indicator like we do on Talk. Granted, this is a long list where things can only be added at the start. (However, the issue you mention with automatic scrolling also happens in chat apps when you are scrolled to the end, but it doesn’t really result in misclick issues.)

What I’ve seen in several apps before (don’t remember where) is that it is always made sure that the entry which is vertically in the center of the screen stays there, so if you are at M somewhere and a file with A is added, actually nothing changes visually and the view is not scrolled. And if an entry is added directly above or below the vertically center entry, worst case is that only less than half of the screen moves. (It would be worth trying that out because from a UX perspective, live refresh is quite expected these days, and manually hitting refresh is tedious.)

PVince81 commented 2 years ago

There's another challenge with live refresh: the fact that we have pagination in place. So if you were on page 10 we'll need to rerender the first 10 pages to be able to maintain the scrolling position. Now, if we do the "click on refresh" there's also the question whether we scroll down again that deep or whether we put people back at the top, which isn't that nice.

Regarding the detection itself, at first I thought we could use the folder's etag and poll the server with a cheap PROPFIND only on the etag. This will be problematic because the etag also changes whenever there's a change deep in the tree, a change that isn't necessarily visible in the current view, so showing a "pull to refresh" or reloading the list would have no benefit.

I'm not sure yet how we could accurately detect changes specifically inside the current list, it might need inventing another kind of property that only changes when the listing of the current folder changed, excluding children.

jancborchardt commented 2 years ago

Now, if we do the "click on refresh" there's also the question whether we scroll down again that deep or whether we put people back at the top, which isn't that nice.

Refreshing should indeed keep you at the scroll position you were last at. Ideally same if you navigate back out of a folder into the parent, you should be at the position that the folder you were just in is at / your previous scroll position there.

Oriann commented 4 months ago

Looking forward to this enhancement, it will greatly improve user experience over all nextcloud navigation and usage.

EDIT: If somebody is more conservative and wanna reload manually it could be good to develop also switch in admin settings or new config parameter for users that dont want live update