feat(admin): add custom admin route ranking feature (#13946)

*  Add custom admin routes ranking

* 🐛 Fix sorting

* 📝 Update admin ui-routes documentation

*  Add admin menu items spec

* 🔧 Add changeset

* 🐛 Remove redundant undefined initializations

* 🔥 🔥 Move the documentation to a separate PR

* ♻️ Move sorting logic to utils

* 🔧 Update changeset

---------

Co-authored-by: Bastien MONTOIS <bqst@bqst-hqckintosh.home>
This commit is contained in:
Bastien
2025-11-07 19:59:40 +01:00
committed by GitHub
parent aae92d5447
commit 213c344804
9 changed files with 437 additions and 7 deletions

View File

@@ -31,6 +31,12 @@ export interface RouteConfig {
*/
nested?: NestedRoutePosition
/**
* The ranking of the route among sibling routes. Routes are sorted in ascending order (lower rank appears first).
* If not provided, the route will be ranked after all routes with explicit ranks.
*/
rank?: number
/**
* An optional i18n namespace for translating the label. When provided, the label will be treated as a translation key.
* @example