Skip to content

Feature: Collection sort order in admin sidebar #474

Closed

Description

@Emlembow

Problem

Collections in the admin sidebar are sorted alphabetically by slug (see `listCollections` in `packages/core/src/schema/registry.ts:85` — `.orderBy("slug", "asc")`). This forces arbitrary ordering that rarely matches how content should be presented on the site.

For example, a portfolio site with `positions`, `projects`, `education`, `certifications`, `endorsements`, `posts`, `pages` always shows them in alphabetical order in the admin: Certifications → Education → Endorsements → Pages → Positions → Posts → Projects — regardless of the logical order the site renders them in.

Proposed Solution

Add a `sort_order` column to `_emdash_collections` (nullable integer). Update `listCollections` to `.orderBy("sort_order", "asc")` with a secondary sort on `slug` for ties (and for collections with no explicit order).

Schema change

  • Migration: `ALTER TABLE _emdash_collections ADD COLUMN sort_order INTEGER`
  • Update `Collection` type and seed schema to accept `sortOrder` / `sort_order`
  • Expose reordering in the admin UI (drag-to-reorder, like fields/menus/widgets already have)

Seed file

```jsonc
{
"collections": [
{ "slug": "positions", "sortOrder": 1, ... },
{ "slug": "projects", "sortOrder": 2, ... }
]
}
```

Workarounds

None that don't involve renaming slugs (which breaks URLs and queries) or forking the admin.

Related

  • `packages/core/src/schema/registry.ts:85` — alphabetical sort
  • `packages/admin/src/components/Sidebar.tsx:169` — consumes the manifest collections as-is
  • `packages/admin/src/lib/api/schema.ts` already has `reorderFields`, `reorderMenuItems`, `reorderWidgets` — same pattern would apply for collections

Activity

  1. added
    enhancement
    on Apr 29, 2026
  2. added this to the 1.0 milestone on Jul 1, 2026
  3. added
    roadmap/1.0
    roadmap/editor-experience
    on Jul 2, 2026
  4. added a commit that references this issue on Aug 9, 2026
    b13c079
  5. added a commit that references this issue on Aug 9, 2026
    e8048e4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/adminenhancementroadmap/1.0roadmap/editor-experience

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions