Repository navigation
v0.2.3 ~ Customer places load - #85
Merged
Merged
Conversation
…e is not read as a model
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #85 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 116 121 +5
Lines 2936 3157 +221
Branches 698 777 +79
==========================================
+ Hits 2936 3157 +221
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:
|
…e, order, vendor and fleet identity descriptors with every extension The resource identity descriptors for the resources every extension can see through this package's models now live here, together with the thin pill, summary, identity-cell and select-option wrappers that name the resource type for ember-ui's generic components, and the styled placeholder silhouettes they fall back to. An instance initializer registers the descriptors whenever the host or an engine boots, filling in only keys nobody has registered, so a Storefront or Ledger table renders a driver as an identity cell on a deep link without loading the FleetOps engine. Opening a resource loads FleetOps on demand and hands the record to its action service, so the engine bundle is only fetched on click. FleetOps replaces these with its own openers when it boots. Covered at 100% by unit tests for the helpers, descriptors, placeholder images and initializer, and a rendering test that proves every wrapper resolves and passes its resource type through.
feat(descriptors): share the core FleetOps resource identity descriptors with every extension
…row only knows by name
…urvive a universe without an extension manager
typeLabel('fleet-ops:contact') read as "Fleet ops"; the part after the colon is
the type when nothing precedes the extension prefix. extensionManager() now
guards the universe service's lazy manager lookup, which throws on a host
that has none, so canOpen stays false instead of failing.
…rop the engine keyword In the console build the addon-tree hbs-only wrappers were never compiled: ember-cli-htmlbars only colocates an addon's templates when it finds ember-cli-babel among that addon's child addons, and fleetops-data (a plain addon flagged ember-engine, shared by the host and two lazy engines) lost that lookup, so every .js module shipped while all 32 wrapper components vanished and engines failed with 'Could not find module .../components/cell/vehicle-identity'. App-tree templates are compiled by each consumer (host, fleetops, storefront) in its own namespace, which is what the wrappers are for.
feat(identity-stub): share the identity stub builder; typeLabel reads a bare fleet-ops type
… opens its Fleet-Ops page instead of a panel whose components only Fleet-Ops can render
fix(descriptors): open Fleet-Ops records on their page outside Fleet-Ops
…nsion manager throws
docs(release): v0.2.3 notes cover the shared descriptors
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.
Fix
An order's customer resolves to
customer-contactorcustomer-vendor. Neither had a serializer of its own, so their embeddedplaceandplaceswere treated as plain relationship identifiers, and the place's owntypeattribute (apartment, house, office...) was read as the model name. Loading the order then failed with "Encountered a relationship identifier with type 'apartment' ... No model was found for 'apartment'".Both subtypes now extend the customer (contact) serializer, which declares
placeandplacesas embedded.EmbeddedRecordsMixinnormalizes a non-polymorphic embedded relationship with its declared model (place), so a place'stypestays an ordinary attribute. Vendors already use the same approach forpersonnels.Release