joose Ok. First of all, I thought we were speaking of updating Files Gallery menu when folders are updated OUTSIDE of Files Gallery, from an external application (typically ftp or another file browser). In this case, Files Gallery has no idea about if or what has been updated of course, and therefore this could only be resolved be some menu poll every X minutes. Optionally, it could be triggered by user navigation, but it still has no idea if/where the menu updated. We can't try to load the menu only from where the user navigated to, because what if a parent dir was created somewhere else? It would still need to load and display. Therefore, the only solution for something like this, would be to poll the entire menu, either after X min or on user navigation.
joose after unzipping a zip in the app (may contain folders)
dragging a folder to the browser tab and uploading (possible folder structure is kept by uppy.js)
navigating between folders (the "current path" user moves to changes, check the "tree" also against the server)
For the first two, the 0.9.8 "main view" updates accordingly. Great!
Currently, the menu/sidebar also somehow updates when creating a new folder from inside the app.
This is something else, because now we are talking about file manager actions that happen from within Files Gallery. Currently, there are some limitations in Files Gallery, because it can't easily detect folders created from unzipping zip files or folders created when drag-and-dropping folders for upload. In all other cases (like copy/move/create dirs), we can update the menu accordingly, because we already know what folders are affected. So in the extreme cases like unzip and folder-uploads, I need to consider other options, like simply reloading the menu (although in many cases, unzip and upload would not create additional folders). This is clumsy also, but at least it can be triggered specifically after an event that "might" cause folders created (unlike polling, when folders are created from another app).
joose navigating between folders (the "current path" user moves to changes, check the "tree" also against the server)
I didn't quite get what you meant by the above.
joose For the first two, the 0.9.8 "main view" updates accordingly. Great!
Yes, the main view will always update appropriately after actions, and in many cases it will simply reload because it is necessary to update the dir. This is a much lighter task than reloading the menu anyway.
joose Currently, the menu/sidebar also somehow updates when creating a new folder from inside the app.
Yes, because most actions like move/copy/create, we know what folders need to get updated in the menu.
With upload/unzip, we don't know, because folders may or may not get created on server after the event. Uploads don't always happen in current folder, so we can't count on checking current folder for new folders just to check if menu should be reloaded. Same with zip.
In conclusion, first of all we need a menu refresh function, that could trigger after certain file manager actions. Having it update for new folders created outside of Files Gallery however, it would have to be polled at certain intervals or after navigation. There could also be a [refresh] button in the menu that could trigger menu refresh.