Skip to content

Commit

Permalink
[ACA-2162] allow custom icons with navbar (#917)
Browse files Browse the repository at this point in the history
* allow custom icons with navbar

* fix breaking change

* update protractor settings
  • Loading branch information
DenysVuika authored Feb 4, 2019
1 parent 80dabdd commit ff19e57
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 42 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
},
"private": true,
"dependencies": {
"@alfresco/adf-content-services": "3.0.0-0282bfa4686accfd24cbac61795891378c25fb64",
"@alfresco/adf-core": "3.0.0-0282bfa4686accfd24cbac61795891378c25fb64",
"@alfresco/adf-extensions": "3.0.0-0282bfa4686accfd24cbac61795891378c25fb64",
"@alfresco/adf-content-services": "3.0.0-3a5fe3fb92cdc7397cbfd3d0869833ea1f1fe8d5",
"@alfresco/adf-core": "3.0.0-3a5fe3fb92cdc7397cbfd3d0869833ea1f1fe8d5",
"@alfresco/adf-extensions": "3.0.0-3a5fe3fb92cdc7397cbfd3d0869833ea1f1fe8d5",
"@alfresco/js-api": "3.0.0-d7850f421268e21861e2cd219441b7343efd27ba",
"@angular/animations": "7.2.3",
"@angular/cdk": "^7.3.0",
Expand Down
43 changes: 25 additions & 18 deletions protractor.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// https://github.com/angular/protractor/blob/master/lib/config.ts

const path = require('path');
const {
SpecReporter
} = require('jasmine-spec-reporter');
const { SpecReporter } = require('jasmine-spec-reporter');
const jasmineReporters = require('jasmine-reporters');
const CDP = require('chrome-remote-interface');

Expand Down Expand Up @@ -63,7 +61,13 @@ exports.config = {
default_directory: downloadFolder
}
},
args: ['--incognito', '--headless', '--remote-debugging-port=9222', '--disable-gpu', '--no-sandbox']
args: [
'--incognito',
'--headless',
'--remote-debugging-port=9222',
'--disable-gpu',
'--no-sandbox'
]
}
},

Expand All @@ -76,21 +80,23 @@ exports.config = {
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 60000,
print: function () {}
print: function() {}
},

plugins: [{
package: 'protractor-screenshoter-plugin',
screenshotPath: `${projectRoot}/e2e-output/report`,
screenshotOnExpect: 'failure',
screenshotOnSpec: 'none',
withLogs: true,
writeReportFreq: 'end',
imageToAscii: 'none',
htmlOnExpect: 'none',
htmlOnSpec: 'none',
clearFoldersBeforeTest: true
}],
plugins: [
{
package: 'protractor-screenshoter-plugin',
screenshotPath: `${projectRoot}/e2e-output/report`,
screenshotOnExpect: 'failure',
screenshotOnSpec: 'none',
withLogs: true,
writeReportFreq: 'end',
imageToAscii: 'none',
htmlOnExpect: 'none',
htmlOnSpec: 'none',
clearFoldersBeforeTest: true
}
],

onPrepare() {
require('ts-node').register({
Expand All @@ -105,7 +111,8 @@ exports.config = {
jasmine.getEnv().addReporter(
new SpecReporter({
spec: {
displayStacktrace: true
displayStacktrace: true,
displayDuration: true
}
})
);
Expand Down
26 changes: 15 additions & 11 deletions src/app/components/sidenav/sidenav.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@
[matRippleCentered]="true"
[matRippleRadius]="20"
>
<mat-icon>{{ item.icon }}</mat-icon>
<adf-icon
[color]="routerLink.isActive ? 'accent' : 'primary'"
[value]="item.icon"
></adf-icon>
</button>

<span
Expand Down Expand Up @@ -55,15 +58,14 @@
collapsedHeight="48px"
>
<mat-panel-title [attr.title]="item.description | translate">
<mat-icon
<adf-icon
[color]="
routerLink.isActive && !expansionPanel.expanded
? 'accent'
: 'primary'
"
>
{{ item.icon }}
</mat-icon>
[value]="item.icon"
></adf-icon>
<span
class="item--label item--parent"
[id]="item.id"
Expand Down Expand Up @@ -97,7 +99,7 @@
[matRippleCentered]="true"
[matRippleRadius]="20"
>
<mat-icon>{{ child.icon }}</mat-icon>
<adf-icon [value]="item.icon"></adf-icon>
</button>

<span
Expand Down Expand Up @@ -146,7 +148,10 @@
[attr.aria-label]="item.title | translate"
[attr.title]="item.description | translate"
>
<mat-icon>{{ item.icon }}</mat-icon>
<adf-icon
[color]="routerLink.isActive ? 'accent' : 'primary'"
[value]="item.icon"
></adf-icon>
</button>
</div>
</ng-container>
Expand All @@ -160,15 +165,14 @@
#childMenu="matMenuTrigger"
[matMenuTriggerFor]="menu"
>
<mat-icon
<adf-icon
[color]="
routerLink.isActive || childMenu.menuOpen
? 'accent'
: 'primary'
"
>
{{ item.icon }}
</mat-icon>
[value]="item.icon"
></adf-icon>
</button>
</div>

Expand Down
3 changes: 2 additions & 1 deletion src/app/services/node-actions.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@ export class NodeActionsService {
imageResolver: this.imageResolver.bind(this),
isSelectionValid: this.canCopyMoveInsideIt.bind(this),
breadcrumbTransform: this.customizeBreadcrumb.bind(this),
select: new Subject<MinimalNodeEntryEntity[]>()
select: new Subject<MinimalNodeEntryEntity[]>(),
excludeSiteContent: []
};

this.dialog.open(ContentNodeSelectorComponent, <any>{
Expand Down

0 comments on commit ff19e57

Please sign in to comment.