feat: resource view registries for fleet-ops tables and panels - #347
Merged
Merged
Conversation
Extensions can add columns, row actions, bulk actions and toolbar buttons to fleet-ops tables through fleet-ops:table:<resource>:<slot>, and buttons and menu items to its details panels through fleet-ops:details:<resource>:<slot>. - @registry on every top-level Tabular/TabularActions index view and Panel details view; the contacts header follows the open tab's registry - *-actions panel.view passes registry: this.detailsRegistry, so the side panels merge the same buttons (customer and schedule map to their resource) - stable ids on built-in columns, actions and buttons; index query params include registered filter params; registries declared in extension.js Fixes found on the way: - driver, vehicle and trailer registeredTabs deleted `route` from the shared registry items (breaking those tabs in the routed details view once a side panel had opened) and kept only tabs without a component, which are the ones a panel cannot render; they now use registeredPanelTabs like the rest - the sensor details view read the place tab registry Requires @fleetbase/ember-core 0.3.25 and @fleetbase/ember-ui 0.4.5.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/v0.6.71 #347 +/- ##
===================================================
Coverage 100.00% 100.00%
Complexity 12329 12329
===================================================
Files 600 600
Lines 46419 46419
===================================================
Hits 46419 46419
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Open
ember-core 0.3.25's loadSubjectCustomFields rejects instead of resolving with undefined when the fields cannot be loaded. Every other caller already catches; this one now does too, leaving the form without custom fields as before.
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.
Extensions can add columns, row actions, bulk actions and toolbar buttons to fleet-ops tables through
fleet-ops:table:<resource>:<slot>. They can add header buttons and menu items to the details panels throughfleet-ops:details:<resource>:<slot>. Details tabs keepfleet-ops:component:<resource>:details.Changes
@registryon every top-levelTabular/TabularActionsindex view andPaneldetails view, 25 resources in all. The contacts header follows the open tab's registry.*-actionspanel.viewpassesregistry: this.detailsRegistry, so side panels merge the same buttons.customerandschedulemap their model names to their resource names.ids on built-in columns, actions and buttons; index query params include registered filter params; registries declared inextension.js.Fixes
registeredTabsdeletedroutefrom the shared registry items, which broke those tabs in the routed details view once a side panel had opened. It also kept only tabs without a component, which are the ones a panel can't render. All three now useregisteredPanelTabs()like the other services. A test is added totrailer-actions-test.Depends on
Merge only after both are published. Before merging, bump
@fleetbase/ember-coreto^0.3.25and@fleetbase/ember-uito^0.4.5, and refresh the lockfile. Until then this branch builds against the old APIs and will not run.Naming and API reference:
docs/resource-view-registries.mdin ember-core.Testing
Lint and template-lint pass. No tests were run locally, including the new
trailer-actionstest.