Conversation
…u items
When a parent MenuItem with a shortcuts array is registered via
registerHeaderMenuItem, each shortcut is now immediately registered as
its own first-class header menu item with a dasherized id of the form
`{parentId}-sc-{shortcutTitle}`.
This fixes three related issues:
1. Shortcuts now appear in universe.headerMenuItems from boot, so the
Customise Navigation panel's "All Extensions" column shows them.
2. Pinned shortcuts can be found by id in allItems when rebuilding the
bar, so they correctly appear in the "Pinned to Bar" column.
3. The id is always dasherized (e.g. fleet-ops-sc-live-map) so lookups
are consistent regardless of how the shortcut title is capitalised.
MenuItem contract: - Added `tags` property (String[] | null) to both constructor branches and toObject(). Accepts a single string or an array; normalised to an array internally. - Added `withTags(tags)` builder method for the chaining pattern. menu-service.js: - Swapped native Array.isArray for Ember's isArray (imported from `@ember/array`) in the shortcut auto-registration loop. - Shortcut scItems now inherit the parent's tags (or their own if defined) so they remain discoverable via the same search terms.
…fleetbase/ember-core into feature/menu-item-shortcuts-description
menu-item.js: - Import isArray from `@ember/array` and replace all four Array.isArray calls (tags normalisation in constructor, withShortcuts, withTags, addShortcut guard). menu-service.js: - Expanded scItem builder to forward the complete MenuItem property surface for each shortcut: identity, routing, full icon properties (icon, iconPrefix, iconSize, iconClass, iconComponent, iconComponentOptions), metadata (description, tags), behaviour (onClick, disabled, type, buttonType), and styling (class, inlineClass, wrapperClass).
…fleetbase/ember-core into feature/menu-item-shortcuts-description
…fleetbase/ember-core into feature/menu-item-shortcuts-description
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…u items
When a parent MenuItem with a shortcuts array is registered via registerHeaderMenuItem, each shortcut is now immediately registered as its own first-class header menu item with a dasherized id of the form
{parentId}-sc-{shortcutTitle}.This fixes three related issues: