feat: add description and shortcuts to header menu registration#210
Merged
feat: add description and shortcuts to header menu registration#210
Conversation
Add a description and shortcuts array to the registerHeaderMenuItem call in extension.js, following the pattern established in the Ledger engine. Shortcuts added: Orders, Routes, Drivers, Vehicles, Fleets, Service Rates, Tracking, Reports
- fleetops: replace unimplemented Routes with Places, replace Tracking with Devices - storefront: remove incomplete Coupons shortcut - registry-bridge: remove unimplemented developer sub-section shortcuts
…ow-route-definition lint error The ember/no-shadow-route-definition rule flagged the top-level `virtual` route (path: '/:section/:slug') as shadowing the nested `virtual` routes (path: '/:slug') inside orders, drivers, vehicles, etc. While the routes are in entirely different URL namespaces at runtime, the static linter cannot distinguish nesting depth and treats any two routes with the same name and structurally identical dynamic segment patterns as a conflict. Fix: rename the top-level route from 'virtual' to 'track-order' (which accurately describes its purpose — the Track Order login-screen button) and update the two corresponding references in extension.js.
… no-shadow-route-definition lint error" This reverts commit 1f2d913.
The top-level virtual route (path: '/:section/:slug') is in a completely different URL namespace from the nested virtual routes (path: '/:slug') inside orders, drivers, vehicles, etc. They do not conflict at runtime. The static linter cannot understand nesting depth so it incorrectly flags this as a shadow. Suppress with an inline eslint-disable comment.
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.
Summary
Adds a
descriptionandshortcutsarray to theregisterHeaderMenuItemcall inaddon/extension.js, following the pattern established in the Ledger engine.Each shortcut entry provides:
title— human-readable section namedescription— one-line summary of what the section doesicon— FontAwesome icon nameroute— the Ember route to transition to on clickChanges
addon/extension.js— expanded the options object passed toregisterHeaderMenuItemwithdescriptionandshortcutsTesting
No logic changes. The shortcuts are purely declarative data consumed by the header menu component in
@fleetbase/ember-ui.