App menu: Fix default order and related issues - #62963
Conversation
kra-mo
left a comment
There was a problem hiding this comment.
Looks good from the screenshots/description.
But the app order should probably also be updated downstream to match, no?
Just in my opinion: The concept of app order defined by apps themselves does not seem to be a good solution – otherwise everyone would just fight for |
|
Question: wouldnt it be even possible to add some headings into the menu to actuallly separate the apps based on their category inside this menu? |
Certainly would be possible and could be considered if Hub grows more, but I think that’s too much at least for now. |
|
/compile |
| // Set order from user defined app order, then the default app order. | ||
| // The default order is skipped for users that sorted the apps themselves, | ||
| // so a newly installed app does not jump to the front of their order. | ||
| $defaultOrder = $this->customAppOrder === [] ? (self::DEFAULT_APP_ORDER[$id] ?? null) : null; |
There was a problem hiding this comment.
I don't think this line is needed
There was a problem hiding this comment.
Without the line, when someone installs an app defined inside the default order (e.g. Deck) later on, it would then mess with their custom ordering.
With this line, it gets added to the end, as would be expected if you customized it.
5f04ab1 to
1354275
Compare
|
Rector fails on master too, so unrelated |
| // Sections of the settings app itself. Their names ("Personal settings", | ||
| // "Appearance and accessibility", ...) are too long and varied for the header, | ||
| // so they all show as "Settings". Other settings entries keep their own name. |
There was a problem hiding this comment.
AI comments like this are pretty bad. They will get outdated - because no one updates such comments - and once someone / something tries to understand whats going on it will just confuse.
Basically the reason why comments explaining the implementation are an anti-pattern, instead implementation should be self explaining.
(this is just an example there are more below - also using // will make them pretty useless as they are not even doc blocks).
| /** | ||
| * Default app menu order, grouped by topic with four apps per row. | ||
| * Apps ship very different orders in their info.xml, so the values are | ||
| * negative to keep this group in front of everything else. | ||
| * Apps that are not listed keep their own order. | ||
| */ | ||
| private const DEFAULT_APP_ORDER = [ | ||
| // Basics | ||
| 'dashboard' => -100, | ||
| 'files' => -99, | ||
| 'office' => -98, | ||
| 'photos' => -97, | ||
| // Collaboration | ||
| 'spreed' => -96, | ||
| 'mail' => -95, | ||
| 'calendar' => -94, | ||
| 'contacts' => -93, | ||
| // Productivity | ||
| 'deck' => -92, | ||
| 'collectives' => -91, | ||
| 'tables' => -90, | ||
| 'circles' => -89, | ||
| // All other apps follow, starting with Activity | ||
| 'activity' => -88, | ||
| ]; |
There was a problem hiding this comment.
Why this? We already have default app orders set in the appinfo, of each of those apps.
So this is a breaking change not just visual polishing
There was a problem hiding this comment.
IMHO If we really want to introduce this, than we should do this as a separate feature with the ability for the admin to override this instance wide (would then also resolve many requests by admins we received).
There was a problem hiding this comment.
So should this be changed in all the individual apps instead? I can do that, it’s just a mess if we want to change it again at some point.
As said in #62963 (comment), I think app devs themselves deciding the order is not a good default.
There was a problem hiding this comment.
IMHO If we really want to introduce this, than we should do this as a separate feature with the ability for the admin to override this instance wide (would then also resolve many requests by admins we received).
Ok, then I would do:
- A section in Admin settings → Theming for App menu sorting
- Same concept we use for the App menu sorting in Personal settings
- A checkbox, checked by default, "Allow people to customize their app order"
There was a problem hiding this comment.
@jancborchardt I agree, but this is done in other places as well, like unified search and I think sharing, given that we don't have things like sandboxing, we assume that admins trust the apps they install to behave in good-faith so fighting for -9999 should not be an issue.
Still, it would probably make sense to have some sane default and then for all new apps to install as the last entry, and just sort them alphabetically on reset. This is what e.g. iOS does, but this would mean properly deprecating app-declared ordering.
There was a problem hiding this comment.
I think this makes sense (what @kra-mo said).
Personally I would like bring up the discussion (not now) to remove the personal settings for app order at some point and instead move the app order adjustment directly to the app menu like its done on gdrive.
There was a problem hiding this comment.
Ok, so then what is the best course of action?
From what I understand, best would be to fix the order as individual PRs in each of the Hub apps, ok?
Because we do need a good default regardless, cause only a subset of admins and people will customize.
There was a problem hiding this comment.
From my point of view:
- split this PR (split off the default order part)
- merge this PR with the polishing
- either adjust HUB apps or do the default order as a second PR
Assisted-by: ClaudeCode:claude-opus-5 Signed-off-by: Jan C. Borchardt <925062+jancborchardt@users.noreply.github.com>
Assisted-by: ClaudeCode:claude-opus-5 Signed-off-by: Jan C. Borchardt <925062+jancborchardt@users.noreply.github.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
1354275 to
965290e
Compare
| // Sections of the settings app itself. Their names ("Personal settings", | ||
| // "Appearance and accessibility", ...) are too long and varied for the header, | ||
| // so they all show as "Settings". Other settings entries keep their own name. |
There was a problem hiding this comment.
| // Sections of the settings app itself. Their names ("Personal settings", | |
| // "Appearance and accessibility", ...) are too long and varied for the header, | |
| // so they all show as "Settings". Other settings entries keep their own name. |
| // Trigger label. Sections of the settings app show as "Settings", | ||
| // see SETTINGS_SECTION_IDS. All other entries use their own name, | ||
| // so the app management page shows "Apps" like in the account menu. |
There was a problem hiding this comment.
| // Trigger label. Sections of the settings app show as "Settings", | |
| // see SETTINGS_SECTION_IDS. All other entries use their own name, | |
| // so the app management page shows "Apps" like in the account menu. |
| // On the app management page the "More apps" tile is the current | ||
| // entry, so it is marked active like any other app tile. |
There was a problem hiding this comment.
| // On the app management page the "More apps" tile is the current | |
| // entry, so it is marked active like any other app tile. |
Summary
The app-menu currently has apps very wildly and inconsistently sorted. Especially now that we have the rows of 4 apps each, like a home screen, it would be good to have the default Nextcloud Hub experience nice and organized.
The sorting is based on this logic, with one bullet point representing a row, and 4 app icons fitting in each row:
Some things don’t fit the imaginary categories completely, like "Teams" being with Productivity. But Groupware is together as it makes sense. And since the labels don’t show up anywhere I think it’s fine.
Additional menu polishing:
Checklist
3. to review, feature component)stable32)AI (if applicable)