You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
↔️ Define and implement strategy for persisting order of apps in top bar. (Database?) #40254
changed the title [-]Define and implement strategy for persisting. (Database?)[/-][+]↔️ Define and implement strategy for persisting. (Database?)[/+]on Sep 5, 2023
changed the title [-]↔️ Define and implement strategy for persisting. (Database?)[/-][+]↔️ Define and implement strategy for persisting order of apps in top bar. (Database?)[/+]on Sep 5, 2023
Order is stored in info.xml for each app, in navigations/navigation/order.
The method AppManager::getAppInfo is used to get information about each application. I think it would be the right place to alter the value of order for each navigation entry. https://github.com/nextcloud/server/blob/master/lib/private/App/AppManager.php#L710
Note:
This is in navigationManager, more logical.
A configuration key is stored for each application navigation link entry, we may want to store an array for all of them instead.
For each navigation link we store an integer, I think this will behave nice when installing a new application it will go at its usual place, and the user can go in the settings to move it.
On the format stored in the user configuration:
We need to store an integer for each app/key combination. We may use -1 as a special value later for hide.
Basically 3 possibilities:
We store a config key for each app/key combination, like in the patch above, under 'apporder_'.$app.'_'.$key
Pros: easy to set through occ with occ user:setting admin core apporder_files_0 5 for instance
Cons: Lot of clutter in user config keys, harder to cleanup, leftovers on app uninstall
We store an array under apporder
Pros: Cleaner in the config table
Cons: json encoding/decoding needed. Harder to set through occ.
We store an array for each app under apporder_app
I think the worst solution because it has all the cons and non of the pros basically
I think all in all second option is the best one. If needed we can add occ command for this but it does not seem that important.
Activity
[-]Define and implement strategy for persisting. (Database?)[/-][+]↔️ Define and implement strategy for persisting. (Database?)[/+][-]↔️ Define and implement strategy for persisting. (Database?)[/-][+]↔️ Define and implement strategy for persisting order of apps in top bar. (Database?)[/+]come-nc commentedon Sep 19, 2023
Pointers:
Order is stored in info.xml for each app, in navigations/navigation/order.
The method
AppManager::getAppInfois used to get information about each application. I think it would be the right place to alter the value of order for each navigation entry.https://github.com/nextcloud/server/blob/master/lib/private/App/AppManager.php#L710
come-nc commentedon Sep 19, 2023
POC:
Note:
This is in navigationManager, more logical.
A configuration key is stored for each application navigation link entry, we may want to store an array for all of them instead.
For each navigation link we store an integer, I think this will behave nice when installing a new application it will go at its usual place, and the user can go in the settings to move it.
come-nc commentedon Sep 19, 2023
Note: defaultapp is already picked in
core/defaultappfor each user, but I think there is no UI for itcome-nc commentedon Sep 25, 2023
On the format stored in the user configuration:
We need to store an integer for each app/key combination. We may use -1 as a special value later for hide.
Basically 3 possibilities:
'apporder_'.$app.'_'.$keyocc user:setting admin core apporder_files_0 5for instanceI think all in all second option is the best one. If needed we can add occ command for this but it does not seem that important.
sorbaugh commentedon Sep 25, 2023
@come-nc I agree that nr.2 seems best for the current scope 👍
susnux commentedon Oct 9, 2023
#40617