You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by GitBox <gi...@apache.org> on 2021/04/08 10:10:01 UTC
[GitHub] [brooklyn-ui] ahgittin opened a new pull request #195: UI efficiency and customisability
ahgittin opened a new pull request #195:
URL: https://github.com/apache/brooklyn-ui/pull/195
Allow to handle thousands of entities gracefully, and for the composer link to be customized.
--
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:
users@infra.apache.org
[GitHub] [brooklyn-ui] ahgittin commented on a change in pull request #195: UI efficiency and customisability
Posted by GitBox <gi...@apache.org>.
ahgittin commented on a change in pull request #195:
URL: https://github.com/apache/brooklyn-ui/pull/195#discussion_r609537666
##########
File path: ui-modules/app-inspector/app/views/main/main.controller.js
##########
@@ -23,17 +23,19 @@ export const mainState = {
name: 'main',
url: '/',
template: template,
- controller: ['$scope', '$q', 'brWebNotifications', mainController],
+ controller: ['$scope', '$q', 'brWebNotifications', 'brBrandInfo', mainController],
controllerAs: 'ctrl'
};
const savedSortReverse = 'app-inspector-sort-reverse';
-export function mainController($scope, $q, brWebNotifications) {
+export function mainController($scope, $q, brWebNotifications, brBrandInfo) {
$scope.$emit(HIDE_INTERSTITIAL_SPINNER_EVENT);
let ctrl = this;
+ ctrl.composerUrl = brBrandInfo.blueprintComposerBaseUrl;
Review comment:
this felt weird as opposed to `$scope` but was how everything else did it in this file so i continued the pattern
--
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:
users@infra.apache.org
[GitHub] [brooklyn-ui] ahgittin commented on a change in pull request #195: UI efficiency and customisability
Posted by GitBox <gi...@apache.org>.
ahgittin commented on a change in pull request #195:
URL: https://github.com/apache/brooklyn-ui/pull/195#discussion_r609539613
##########
File path: ui-modules/catalog/app/views/bundle/type/type.template.html
##########
@@ -20,8 +20,8 @@
<header class="row">
<div class="col-md-12">
<div class="media">
- <div class="media-left">
- <img ng-src="{{type | iconGeneratorPipe:'symbolicName'}}" class="media-object" alt="{{::type.symbolicName}}'s logo" />
+ <div class="media-left" ng-if="type.symbolicName">
Review comment:
`ng-if` is needed to prevent `::type | ...` being evaluated when `type` is set but not populated, also elsewhere
--
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:
users@infra.apache.org
[GitHub] [brooklyn-ui] asfgit merged pull request #195: UI efficiency and customisability
Posted by GitBox <gi...@apache.org>.
asfgit merged pull request #195:
URL: https://github.com/apache/brooklyn-ui/pull/195
--
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:
users@infra.apache.org
[GitHub] [brooklyn-ui] ahgittin commented on a change in pull request #195: UI efficiency and customisability
Posted by GitBox <gi...@apache.org>.
ahgittin commented on a change in pull request #195:
URL: https://github.com/apache/brooklyn-ui/pull/195#discussion_r609540703
##########
File path: ui-modules/catalog/app/views/catalog/catalog.template.html
##########
@@ -98,18 +98,29 @@ <h4 class="media-heading">
</div>
<div class="extra" uib-collapse="isCollapsed">
+ <!-- note entities are not filtered as search changes; but they will take an initial search; not intuitive -->
<div ng-init="filteredEntities = (bundle.types | bundleTypeFilter:'org.apache.brooklyn.api.entity.Entity' | filter:state.search)" ng-show="::filteredEntities.length > 0">
<ul class="list-group list-group-types">
<li class="list-group-item typed-group-table-header">
<ng-pluralize count="::filteredEntities.length"
when="{'one': 'Entity', 'other': 'Entities'}">
</ng-pluralize>
</li>
- <li ng-repeat="entity in filteredEntities track by (entity.containingBundle + entity.symbolicName + entity.version)"
+ <li ng-repeat="entity in ::filteredEntities track by (entity.containingBundle + entity.symbolicName + entity.version)"
+ ng-if="!isCollapsed && $index < pagination.itemsPerPage"
ng-class="{'deprecated': entity.deprecated, 'disabled': entity.disabled}"
class="list-group-item">
- <type-item bundle="bundle" type="entity"></type-item>
+ <type-item bundle="::bundle" type="::entity"></type-item>
Review comment:
the `::` here doesn't achieve much, as the digest re-renders `type-item` isolated scope anyway :(
--
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:
users@infra.apache.org
[GitHub] [brooklyn-ui] ahgittin commented on a change in pull request #195: UI efficiency and customisability
Posted by GitBox <gi...@apache.org>.
ahgittin commented on a change in pull request #195:
URL: https://github.com/apache/brooklyn-ui/pull/195#discussion_r609538002
##########
File path: ui-modules/blueprint-composer/app/components/catalog-selector/catalog-selector.directive.js
##########
@@ -346,9 +346,10 @@ export function catalogSelectorDirective() {
if (!rowsPerPage) {
let palette = angular.element(document.querySelector(".page-main-area"));
let toolbar = angular.element(document.querySelector(".navbar-mode"));
+ let title = 56;
let header = angular.element($element[0].querySelector(".catalog-palette-header"));
let footer = angular.element($element[0].querySelector(".catalog-palette-footer"));
- rowsPerPage = Math.max(MIN_ROWS_PER_PAGE, Math.floor((palette[0].offsetHeight - (toolbar[0].offsetHeight + header[0].offsetHeight + footer[0].offsetHeight + 16)) / ($scope.state.viewMode.rowHeightPx || 96)));
+ rowsPerPage = Math.max(MIN_ROWS_PER_PAGE, Math.floor((palette[0].offsetHeight - (toolbar[0].offsetHeight + title + header[0].offsetHeight + footer[0].offsetHeight + 32)) / ($scope.state.viewMode.rowHeightPx || 96)));
Review comment:
prevents it from needing to scroll vertically
--
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:
users@infra.apache.org
[GitHub] [brooklyn-ui] ahgittin commented on a change in pull request #195: UI efficiency and customisability
Posted by GitBox <gi...@apache.org>.
ahgittin commented on a change in pull request #195:
URL: https://github.com/apache/brooklyn-ui/pull/195#discussion_r609539007
##########
File path: ui-modules/blueprint-composer/app/views/main/graphical/graphical.state.less
##########
@@ -147,6 +147,8 @@
&, .palette-full-height-wrapper {
display: flex;
flex-direction: column;
+ justify-content: space-between;
Review comment:
prevents big space at the bottom when tiles are large. does cause a little jumpiness when messages appear but i think it's the least bad answer at least without a lot of work.
--
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:
users@infra.apache.org
[GitHub] [brooklyn-ui] ahgittin commented on a change in pull request #195: UI efficiency and customisability
Posted by GitBox <gi...@apache.org>.
ahgittin commented on a change in pull request #195:
URL: https://github.com/apache/brooklyn-ui/pull/195#discussion_r609540038
##########
File path: ui-modules/catalog/app/views/catalog/catalog.template.html
##########
@@ -69,7 +69,7 @@
</div>
<div class="col-md-12">
- <ul class="list-group list-group-bundles" ng-show="state.view === 'bundles'">
+ <ul class="list-group list-group-bundles" ng-if="state.view === 'bundles'">
Review comment:
big savings -- previously would create DOM for every single entity, even though none shown initially
--
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:
users@infra.apache.org
[GitHub] [brooklyn-ui] ahgittin commented on a change in pull request #195: UI efficiency and customisability
Posted by GitBox <gi...@apache.org>.
ahgittin commented on a change in pull request #195:
URL: https://github.com/apache/brooklyn-ui/pull/195#discussion_r609538271
##########
File path: ui-modules/blueprint-composer/app/components/catalog-selector/catalog-selector-palette-footer.html
##########
@@ -23,43 +23,43 @@
<small class="help-block text-sm palette-footer-message" ng-class="{ 'no-match': searchedItems.length === 0 }">
<span ng-if="search">
<span ng-if="searchedItems.length === 0">
- <span ng-if="!skippingFilters && itemsBeforeActiveFilters.length > itemsAfterActiveFilters.length">
+ <div class="palette-footer-explanation" ng-if="!skippingFilters && itemsBeforeActiveFilters.length > itemsAfterActiveFilters.length"><span>
Review comment:
just improves line spacing and layout when these appear
--
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:
users@infra.apache.org