Repository navigation
refactor(descriptors): build the shared resource descriptors from fleetops-data - #379
Merged
Merged
Conversation
…etops-data The driver, vehicle, customer, contact, place, order, vendor and fleet descriptors, their pill, summary, identity-cell and select-option wrappers, and the styled placeholder images now come from @fleetbase/fleetops-data, so every extension that lists those resources renders them the same way without loading this engine. FleetOps keeps registering all 53 descriptors; for the eight shared ones it takes the shared descriptor and attaches its own panel opener, which the registry keeps over the lazy opener the shared package registers. The helpers module re-exports the shared building blocks and keeps the openers that only make sense inside this engine; the placeholder-images module keeps its import path as a re-export.
This was referenced Oct 9, 2026
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.
What change does this PR introduce?
Companion to fleetbase/fleetops-data#86. The resource identity descriptors for
driver,vehicle,customer,contact,place,order,vendorandfleet, their thin pill, summary, identity-cell and select-option wrappers, and the styled placeholder images now live in@fleetbase/fleetops-data, where every extension that lists those resources can use them without loading this engine.utils/resource-descriptors/shared.js(new) takes the shared descriptors and attaches this engine'spanelOpenerfor each key, keeping the order stub guard.people.js,assets.jsandoperations.jsspread those in place of their old inline definitions, sobuildFleetOpsResourceDescriptorsstill returns all 53 and the registry keeps these richer versions over the lazy ones the shared package registers on boot.utils/resource-descriptors/helpers.jsre-exports the shared building blocks and keepspanelOpener,routeOpener,parentOpenerandcolourTile, which only make sense here.utils/placeholder-images.jsbecomes a re-export so the existing import path, theplaceholder-imageandresource-imagehelpers and the trailer placeholder keep working.<Cell::DriverIdentity>,<Driver::Pill>and friends are unchanged for every template and test that uses them.Nothing user-facing changes inside FleetOps.
Why was this change needed?
Storefront and other extensions cannot invoke this engine's identity cells, pills or summaries, because an engine's components only exist in its own namespace, and eagerly loading FleetOps from another extension costs the whole bundle. Moving the shared pieces into the package every extension already depends on gives them identical rendering with no engine load until a click. See fleetbase/fleetops-data#86 for the shared side.
Other information
Requires fleetbase/fleetops-data#86 (the local workspace links the package; a published fleetops-data release is needed before this ships).
Validation, run locally against the linked fleetops-data branch:
The 15 failures are all pre-existing: the same filter on the untouched
release/v0.6.72fails the same 15 plus two more flaky controller tests. None involves the moved files (they are the generated "it renders" pill stubs asserting empty text, device, telematic, trailer and vendor panel tests). The existing descriptor, wrapper and identity-cell suites pass unchanged, including the "53 descriptors" count and the per-key wrapper rendering test, which now resolves the wrappers through fleetops-data.No API, postman or fleetbase.io documentation impact beyond what the fleetops-data PR notes.