Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion addon/services/universe/menu-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,16 @@ export default class MenuService extends Service.extend(Evented) {
*/
getHeaderMenuItems() {
const items = this.registry.getRegistry('header', 'menu-item');
return A(items).sortBy('priority');
// Sort extensions by priority first, then append shortcuts at the end.
// Shortcuts must never interleave with extensions in the sorted list
// because the default bar is built by slicing the first N items — if
// shortcuts sort between extensions (e.g. priority 1.1 between 1 and 2)
// they would displace real extensions from the default pinned bar.
const extensions = A(items)
.filter((i) => !i._isShortcut)
.sortBy('priority');
const shortcuts = A(items).filter((i) => i._isShortcut);
return A([...extensions, ...shortcuts]);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fleetbase/ember-core",
"version": "0.3.16",
"version": "0.3.17",
"description": "Provides all the core services, decorators and utilities for building a Fleetbase extension for the Console.",
"keywords": [
"fleetbase-core",
Expand Down
Loading