algairim commented on a change in pull request #229: URL: https://github.com/apache/brooklyn-ui/pull/229#discussion_r655550852
########## File path: ui-modules/blueprint-composer/app/components/catalog-saver/catalog-saver.directive.js ########## @@ -68,6 +68,30 @@ export function saveToCatalogModalDirective($rootScope, $uibModal, $injector, $f } } Review comment: I would not include so many custom calls from the override provider. Suggestion: ``` export function saveToCatalogModalDirective($rootScope, $uibModal, $injector, $filter, composerOverrides, blueprintService) { let modalDirective = this; modalDirective.getConfigNameFromEntity = (entity) => { // use $scope directly // code omitted ... }; modalDirective.getConfigBundleNameFromScope = () => { // use $scope directly // code omitted ... }; modalDirective.getSuggestedSymbolicNameFromBlueprint = (entity, metadata) => { // use $scope directly // code omitted ... }; modalDirective.updateCatalogConfig = (config, $element) => { // use $scope directly // code omitted ... } // allow downstream to configure directive and scope here (composerOverrides.configureCatalog || () => {})(modalDirective, $scope); return = { // code omitted ... ``` Customize methods defined on `modalDirective` instance in the downstream code and call them accessing instance of the directive `modalDirective.getConfigNameFromEntity(entity)` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org