Skip to content

fix(settings): sort app list by app name instead of app objects - #59848

Merged
susnux merged 2 commits into
masterfrom
jtr/fix-settings-sort-list
Apr 29, 2026
Merged

fix(settings): sort app list by app name instead of app objects#59848
susnux merged 2 commits into
masterfrom
jtr/fix-settings-sort-list

Conversation

@joshtrichards

@joshtrichardsjoshtrichards commented Apr 22, 2026

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

This is fixing a "it works by accident" scenario. 😄 Fix app list sorting in apps/settings/src/components/AppList.vue by passing app.name to OC.Util.naturalSortCompare instead of the full app object.

Why

OC.Util.naturalSortCompare expects strings, but the current code passes app objects. As a result, chunkify returns an empty array and the natural sort is effectively a no-op, so the comparator falls back to the existing status-bucket ordering.

The UI often still appeared correct because the backend already returns /settings/apps/list alphabetically by name.

That behavior becomes especially fragile when combining regular apps with ExApps, since each backend list may already be individually sorted, but the concatenated combined list is not guaranteed to be globally sorted unless the frontend explicitly sorts by name.

Changes

  • replace OC.Util.naturalSortCompare(a, b) with OC.Util.naturalSortCompare(a.name, b.name)
  • keep the existing status-bucket ordering as the primary sort

Result

Sorting should remain the same from a user perspective in normal cases, but the implementation is now explicit, type-correct, and stable when mixing regular apps and ExApps.

Related

TODO

  • ...

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@joshtrichards

Copy link
Copy Markdown
MemberAuthor

/compile /

@joshtrichardsjoshtrichards added the 3. to review Waiting for reviews label Apr 22, 2026
@joshtrichards
joshtrichards marked this pull request as ready for review April 22, 2026 14:37
@joshtrichards
joshtrichards requested a review from a team as a code ownerApril 22, 2026 14:37
@joshtrichards
joshtrichards requested review from nfebe, sorbaugh and szaimen and removed request for a teamApril 22, 2026 14:37
@joshtrichardsjoshtrichards added this to the Nextcloud 34 milestone Apr 22, 2026

@miaulalalamiaulalala left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neat :shipit:

Dist conflicts, please rebase 🙏

@szaimenszaimen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐘

@nickvergessen
nickvergessen removed the request for review from a teamApril 24, 2026 09:21
@susnux

Copy link
Copy Markdown
Contributor

/compile rebase

joshtrichardsand others added 2 commits April 29, 2026 12:24
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@nextcloud-command
nextcloud-commandforce-pushed the jtr/fix-settings-sort-list branch from 04a1043 to ccdd49eCompareApril 29, 2026 12:31
@susnux
susnux merged commit 4cd65b0 into masterApr 29, 2026
131 checks passed
@susnux
susnux deleted the jtr/fix-settings-sort-list branch April 29, 2026 13:25
@susnux

Copy link
Copy Markdown
Contributor

/backport to stable33

This was referenced Apr 30, 2026
This was referenced May 7, 2026
This was referenced May 15, 2026
@nextcloud-botnextcloud-bot mentioned this pull request May 27, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@joshtrichards@susnux@miaulalala@szaimen@nextcloud-command