Repository navigation
fix(descriptors): open Fleet-Ops records on their page outside Fleet-Ops - #88
Conversation
… opens its Fleet-Ops page instead of a panel whose components only Fleet-Ops can render
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (90.00%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## release/v0.2.3 #88 +/- ##
==================================================
- Coverage 100.00% 99.96% -0.04%
==================================================
Files 121 121
Lines 3148 3157 +9
Branches 773 777 +4
==================================================
+ Hits 3148 3156 +8
- Misses 0 1 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
What changed
engineOpener(theopenused by the shared driver, vehicle, contact, customer, place, order, vendor and fleet descriptors) now opens a record's context panel only while the console is on the owning engine's routes. Anywhere else it uses the action service'stransition.view, so the record opens on its Fleet-Ops page.Why
Fleet-Ops action services open panels with component names (
vehicle/panel-header, tab components). The<ResourceContextPanel />that renders the panel is the one in the current engine. From Storefront that is Storefront's, so the names do not resolve there and rendering throws:Resolving the component class from the Fleet-Ops engine instance does not help either: the header's own template then fails on Fleet-Ops helpers (
placeholder-image), because loose-mode templates resolve against the rendering engine. Opening the record's page is the reliable path. It is what Storefront's "Open vehicle" button already does.Details
isInsideEngine(manager, engineName)compares the console's current route to the engine mount point fromextensionManager.getEngineMountPoint. When it cannot tell (no manager, no route, no mount point) it answers yes, which keeps the previous behaviour.transitionalways transitions, and an unknown mode still opens nothing.Validation
npx ember test --filter resource-descriptors: 34 tests pass. New tests cover the panel inside Fleet-Ops, the page from Storefront, a panel-only service outside the engine, andisInsideEngine, including the prefix trapconsole.fleet-ops-reports./fleet-ops/manage/vehicles/<id>with the vehicle panel open, where it used to throw.No API or docs impact.