You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by ahgittin <gi...@git.apache.org> on 2018/10/25 09:59:34 UTC

[GitHub] brooklyn-ui pull request #93: new layout (separable palette) tidies

GitHub user ahgittin opened a pull request:

    https://github.com/apache/brooklyn-ui/pull/93

    new layout (separable palette) tidies

    #84 introduces the separable palette/config panel
    
    this enhances that so that the palette gets the right size, and also fixes extension points and makes it so the "add (member spec)" usage of the panel respects those extension points
    
    minor tidies to dropdowns and other style points also

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ahgittin/brooklyn-ui pr-84-fixes

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/brooklyn-ui/pull/93.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #93
    
----
commit 5ea0aae0c29fa37f8efd61363d5a04c343b7bf01
Author: Alex Heneveld <al...@...>
Date:   2018-10-24T09:25:29Z

    rename btn-ouline to btn-outline

commit 63031129ce1a972bda8c049f9518c6c17e232f85
Author: Alex Heneveld <al...@...>
Date:   2018-10-24T12:37:39Z

    dynamically compute pagination limit for palette based on height

commit 3db686cf3da05948d781c25ce2bb12ecac53232b
Author: Alex Heneveld <al...@...>
Date:   2018-10-24T13:45:34Z

    minor styling changes to make palette nicer
    
    esp for drag and to work with multi-width

commit 7670595878a6eb46701c45c67bce1327e443960b
Author: Alex Heneveld <al...@...>
Date:   2018-10-24T14:45:34Z

    allow palette to have view mode customised to show 6, 4, 3, or 1 item per row

commit 6ccc2b1af2c7c9953a113fb0e6346c60b8ae3fee
Author: Alex Heneveld <al...@...>
Date:   2018-10-24T15:08:57Z

    share palette view state among all palettes

commit 977e6a3dcecaa9f3df338c5b4a8b7cc5e6efb2e0
Author: Alex Heneveld <al...@...>
Date:   2018-10-24T15:43:23Z

    tidy dropdown and other composer styling

commit ca6d09c32e5ffedc2291aa7bfbb2b8b4af2cf8ef
Author: Alex Heneveld <al...@...>
Date:   2018-10-24T16:37:24Z

    make member spec selector act like main catalog palette, filtered for type

commit fb275c64f693fd9fcf2c1c83e26a65e96a3ee6aa
Author: Alex Heneveld <al...@...>
Date:   2018-10-25T09:28:09Z

    support 'mode' parameter for sections

commit 046c65601e1ed314db55ce96fc6de8d6bc9e44e6
Author: Alex Heneveld <al...@...>
Date:   2018-10-25T09:54:57Z

    css so add member spec use of palette can share format

----


---

[GitHub] brooklyn-ui pull request #93: new layout (separable palette) tidies

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/brooklyn-ui/pull/93#discussion_r229330252
  
    --- Diff: ui-modules/blueprint-composer/app/components/catalog-selector/catalog-selector.directive.js ---
    @@ -127,15 +169,15 @@ function controller($scope, $element, $q, $uibModal, $log, $templateCache, palet
         $scope.getPlaceHolder = function () {
             return 'Search';
         };
    -
    +    
         $scope.isLoading = true;
     
         $scope.$watch('search', () => {
             $scope.freeFormTile = {
                 symbolicName: $scope.search,
                 name: $scope.search,
                 displayName: $scope.search,
    -            supertypes: [$scope.family.superType]
    +            supertypes: ($scope.family ? [ $scope.family.superType ] : []),
    --- End diff --
    
    can be passed in as null however


---

[GitHub] brooklyn-ui pull request #93: new layout (separable palette) tidies

Posted by tbouron <gi...@git.apache.org>.
Github user tbouron commented on a diff in the pull request:

    https://github.com/apache/brooklyn-ui/pull/93#discussion_r229345048
  
    --- Diff: ui-modules/blueprint-composer/app/views/main/graphical/edit/add/add.js ---
    @@ -27,17 +27,18 @@ export const graphicalEditAddState = {
         name: 'main.graphical.edit.add',
         url: '/add/:family?configKey',
         template: template,
    -    controller: ['$scope', '$filter', '$state', '$stateParams', 'blueprintService', GraphicalEditAddController],
    +    controller: ['$scope', '$filter', '$state', '$stateParams', 'blueprintService', 'paletteService', GraphicalEditAddController],
         controllerAs: 'vm',
     };
     
    -export function GraphicalEditAddController($scope, $filter, $state, $stateParams, blueprintService) {
    +export function GraphicalEditAddController($scope, $filter, $state, $stateParams, blueprintService, paletteService) {
         switch ($stateParams.family) {
             case EntityFamily.ENTITY.id.toLowerCase():
                 $scope.family = EntityFamily.ENTITY;
                 break;
             case EntityFamily.SPEC.id.toLowerCase():
                 $scope.family = EntityFamily.SPEC;
    +            $scope.familiesToShow = [ EntityFamily.ENTITY, EntityFamily.SPEC ];
    --- End diff --
    
    I cannot find any reference if this on templates


---

[GitHub] brooklyn-ui pull request #93: new layout (separable palette) tidies

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/brooklyn-ui/pull/93#discussion_r229329675
  
    --- Diff: ui-modules/blueprint-composer/app/components/catalog-selector/catalog-selector.directive.js ---
    @@ -20,7 +20,14 @@ import angular from 'angular';
     import {EntityFamily} from '../util/model/entity.model';
     import template from './catalog-selector.template.html';
     
    -const ITEMS_PER_PAGE = 30;
    +const MIN_ROWS_PER_PAGE = 4;
    +
    +const PALETTE_VIEW_MODES = {
    --- End diff --
    
    not convinced.  could be changed when useful.


---

[GitHub] brooklyn-ui pull request #93: new layout (separable palette) tidies

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/brooklyn-ui/pull/93


---

[GitHub] brooklyn-ui pull request #93: new layout (separable palette) tidies

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/brooklyn-ui/pull/93#discussion_r229331445
  
    --- Diff: ui-modules/blueprint-composer/app/views/main/graphical/edit/add/add.js ---
    @@ -27,17 +27,18 @@ export const graphicalEditAddState = {
         name: 'main.graphical.edit.add',
         url: '/add/:family?configKey',
         template: template,
    -    controller: ['$scope', '$filter', '$state', '$stateParams', 'blueprintService', GraphicalEditAddController],
    +    controller: ['$scope', '$filter', '$state', '$stateParams', 'blueprintService', 'paletteService', GraphicalEditAddController],
         controllerAs: 'vm',
     };
     
    -export function GraphicalEditAddController($scope, $filter, $state, $stateParams, blueprintService) {
    +export function GraphicalEditAddController($scope, $filter, $state, $stateParams, blueprintService, paletteService) {
         switch ($stateParams.family) {
             case EntityFamily.ENTITY.id.toLowerCase():
                 $scope.family = EntityFamily.ENTITY;
                 break;
             case EntityFamily.SPEC.id.toLowerCase():
                 $scope.family = EntityFamily.SPEC;
    +            $scope.familiesToShow = [ EntityFamily.ENTITY, EntityFamily.SPEC ];
    --- End diff --
    
    no, it's used in the html


---

[GitHub] brooklyn-ui issue #93: new layout (separable palette) tidies

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on the issue:

    https://github.com/apache/brooklyn-ui/pull/93
  
    all addressed as part of #93 


---

[GitHub] brooklyn-ui issue #93: new layout (separable palette) tidies

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on the issue:

    https://github.com/apache/brooklyn-ui/pull/93
  
    retest this please


---

[GitHub] brooklyn-ui issue #93: new layout (separable palette) tidies

Posted by tbouron <gi...@git.apache.org>.
Github user tbouron commented on the issue:

    https://github.com/apache/brooklyn-ui/pull/93
  
    Thanks @ahgittin, merging


---

[GitHub] brooklyn-ui pull request #93: new layout (separable palette) tidies

Posted by tbouron <gi...@git.apache.org>.
Github user tbouron commented on a diff in the pull request:

    https://github.com/apache/brooklyn-ui/pull/93#discussion_r229344894
  
    --- Diff: ui-modules/blueprint-composer/app/views/main/graphical/edit/add/add.js ---
    @@ -51,8 +52,11 @@ export function GraphicalEditAddController($scope, $filter, $state, $stateParams
                 break;
         }
     
    -    $scope.catalogItemsPerPage = 24;
    -
    +    if (!$scope.familiesToShow) $scope.familiesToShow = [ $scope.family ];
    --- End diff --
    
    I cannot find any reference if this on templates


---

[GitHub] brooklyn-ui pull request #93: new layout (separable palette) tidies

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/brooklyn-ui/pull/93#discussion_r229331551
  
    --- Diff: ui-modules/blueprint-composer/app/components/catalog-selector/catalog-selector.directive.js ---
    @@ -243,4 +285,6 @@ function controller($scope, $element, $q, $uibModal, $log, $templateCache, palet
     
         // allow downstream to configure this controller and/or scope
         (composerOverrides.configurePaletteController || function() {})(this, $scope, $element);
    +    
    +    $scope.paletteItemClasses = "col-xs-3";
    --- End diff --
    
    yes, removed in #94 


---

[GitHub] brooklyn-ui pull request #93: new layout (separable palette) tidies

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/brooklyn-ui/pull/93#discussion_r229353556
  
    --- Diff: ui-modules/blueprint-composer/app/views/main/graphical/edit/add/add.js ---
    @@ -27,17 +27,18 @@ export const graphicalEditAddState = {
         name: 'main.graphical.edit.add',
         url: '/add/:family?configKey',
         template: template,
    -    controller: ['$scope', '$filter', '$state', '$stateParams', 'blueprintService', GraphicalEditAddController],
    +    controller: ['$scope', '$filter', '$state', '$stateParams', 'blueprintService', 'paletteService', GraphicalEditAddController],
         controllerAs: 'vm',
     };
     
    -export function GraphicalEditAddController($scope, $filter, $state, $stateParams, blueprintService) {
    +export function GraphicalEditAddController($scope, $filter, $state, $stateParams, blueprintService, paletteService) {
         switch ($stateParams.family) {
             case EntityFamily.ENTITY.id.toLowerCase():
                 $scope.family = EntityFamily.ENTITY;
                 break;
             case EntityFamily.SPEC.id.toLowerCase():
                 $scope.family = EntityFamily.SPEC;
    +            $scope.familiesToShow = [ EntityFamily.ENTITY, EntityFamily.SPEC ];
    --- End diff --
    
    https://github.com/apache/brooklyn-ui/pull/93/files#diff-ed969f9a529823af9b9282a89cc5ebc1R31


---

[GitHub] brooklyn-ui pull request #93: new layout (separable palette) tidies

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/brooklyn-ui/pull/93#discussion_r229330825
  
    --- Diff: ui-modules/blueprint-composer/app/components/providers/palette-service.provider.js ---
    @@ -37,7 +37,9 @@ export function paletteServiceProvider() {
                 sections[id] = section;
             },
             deleteSection(id) {
    +            let old = sections[id];
                 delete sections[id];
    +            return old;
    --- End diff --
    
    if you want to change order a common pattern would be to delete it but put it to a local var so you could then add it in the right place.  same idea as `Map.remove`


---