Skip to content

Commit

Permalink
[ACA-2122] automatic code formatting on commit (Alfresco#890)
Browse files Browse the repository at this point in the history
  • Loading branch information
DenysVuika authored and dhrn committed Apr 30, 2019
1 parent b355e1c commit 69f6c58
Show file tree
Hide file tree
Showing 28 changed files with 2,159 additions and 1,022 deletions.
1,210 changes: 1,059 additions & 151 deletions package-lock.json

Large diffs are not rendered by default.

17 changes: 14 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@
"e2e:docker": "npm run start:docker && npm run e2e && npm run stop:docker",
"spellcheck": "cspell 'src/**/*.ts' 'e2e/**/*.ts' 'projects/**/*.ts'",
"inspect.bundle": "ng build app --prod --stats-json && npx webpack-bundle-analyzer dist/app/stats.json",
"format:check": "prettier --list-different \"src/{app,environments}/**/*{.ts,.js,.css,.scss}\"",
"format:check": "prettier --list-different \"src/{app,environments}/**/*.{ts,js,css,scss,html}\"",
"format:fix": "prettier --write \"src/{app,environments}/**/*.{ts,js,css,scss,html}\"",
"build.tomcat": "npm run build -- --base-href ./ && jar -cvf docker/tomcat/artifacts/content-app.war -C dist/app/ .",
"build.tomcat.e2e": "./build-tomcat-e2e.sh",
"e2e.tomcat": "npm run wd:update && protractor --baseUrl=http://localhost:4000/content-app/",
"docker.tomcat.start": "cd docker/tomcat && docker-compose up -d --build && wait-on http://localhost:8080 && wait-on http://localhost:4000",
"docker.tomcat.stop": "cd docker/tomcat && docker-compose stop",
"docker.tomcat.e2e": "npm run docker.tomcat.start && npm run e2e.tomcat"
"docker.tomcat.e2e": "npm run docker.tomcat.start && npm run e2e.tomcat",
"lint:staged": "lint-staged"
},
"private": true,
"dependencies": {
Expand Down Expand Up @@ -88,7 +90,9 @@
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"lint-staged": "^8.1.0",
"ng-packagr": "^4.4.0",
"pre-commit": "^1.2.2",
"prettier": "^1.15.3",
"protractor": "^5.4.0",
"rimraf": "2.6.2",
Expand All @@ -100,5 +104,12 @@
"tslint": "~5.11.0",
"typescript": "^3.1.6",
"wait-on": "^3.0.1"
}
},
"lint-staged": {
"*.{ts,js,css,scss,html}": [
"prettier --single-quote --write",
"git add"
]
},
"pre-commit": "lint:staged"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<mat-icon>ic_error</mat-icon>
<p class="generic-error__title">
{{ 'APP.MESSAGES.ERRORS.MISSING_CONTENT' | translate }}
{{ 'APP.MESSAGES.ERRORS.MISSING_CONTENT' | translate }}
</p>
2 changes: 1 addition & 1 deletion src/app/components/common/icon/icon.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<ng-container *ngIf="isCustom; else: default">
<ng-container *ngIf="isCustom; else default">
<mat-icon [svgIcon]="value"></mat-icon>
</ng-container>

Expand Down
27 changes: 21 additions & 6 deletions src/app/components/create-menu/create-menu.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
data-automation-id="create-button"
mat-raised-button
[matMenuTriggerFor]="rootMenu"
title="{{ 'APP.NEW_MENU.TOOLTIP' | translate }}">
<span class="app-create-menu__text">{{ 'APP.NEW_MENU.LABEL' | translate }}</span>
<mat-icon title="{{ 'APP.NEW_MENU.TOOLTIP' | translate }}">arrow_drop_down</mat-icon>
title="{{ 'APP.NEW_MENU.TOOLTIP' | translate }}"
>
<span class="app-create-menu__text">{{
'APP.NEW_MENU.LABEL' | translate
}}</span>
<mat-icon title="{{ 'APP.NEW_MENU.TOOLTIP' | translate }}"
>arrow_drop_down</mat-icon
>
</button>
</ng-container>

Expand All @@ -17,12 +22,22 @@
data-automation-id="create-button"
[matMenuTriggerFor]="rootMenu"
#createMenu="matMenuTrigger"
title="{{ 'APP.NEW_MENU.TOOLTIP' | translate }}">
<mat-icon [color]="createMenu.menuOpen? 'accent': 'primary'" title="{{ 'APP.NEW_MENU.TOOLTIP' | translate }}">queue</mat-icon>
title="{{ 'APP.NEW_MENU.TOOLTIP' | translate }}"
>
<mat-icon
[color]="createMenu.menuOpen ? 'accent' : 'primary'"
title="{{ 'APP.NEW_MENU.TOOLTIP' | translate }}"
>queue</mat-icon
>
</button>
</ng-container>

<mat-menu #rootMenu="matMenu" class="app-create-menu__root-menu app-create-menu__sub-menu" [overlapTrigger]="false" yPosition="below">
<mat-menu
#rootMenu="matMenu"
class="app-create-menu__root-menu app-create-menu__sub-menu"
[overlapTrigger]="false"
yPosition="below"
>
<ng-container *ngFor="let action of createActions; trackBy: trackById">
<app-toolbar-menu-item [actionRef]="action"></app-toolbar-menu-item>
</ng-container>
Expand Down
29 changes: 15 additions & 14 deletions src/app/components/current-user/current-user.component.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
<div title="{{ (profile$ | async)?.id }}">
<div class="current-user__full-name">{{ (profile$ | async)?.userName }}</div>
<div
class="current-user__avatar am-avatar"
[matMenuTriggerFor]="userMenu">
{{ (profile$ | async)?.initials }}
</div>
<div class="current-user__full-name">{{ (profile$ | async)?.userName }}</div>
<div class="current-user__avatar am-avatar" [matMenuTriggerFor]="userMenu">
{{ (profile$ | async)?.initials }}
</div>
</div>

<mat-menu #userMenu="matMenu" [overlapTrigger]="false">
<button *ngIf="languagePicker$ | async"
mat-menu-item [matMenuTriggerFor]="langMenu">
{{ 'APP.LANGUAGE' | translate }}
</button>
<button
*ngIf="(languagePicker$ | async)"
mat-menu-item
[matMenuTriggerFor]="langMenu"
>
{{ 'APP.LANGUAGE' | translate }}
</button>

<button mat-menu-item (click)="onLogoutEvent()" adf-logout>
{{ 'APP.SIGN_OUT' | translate }}
</button>
<button mat-menu-item (click)="onLogoutEvent()" adf-logout>
{{ 'APP.SIGN_OUT' | translate }}
</button>
</mat-menu>

<mat-menu #langMenu="matMenu">
<adf-language-menu></adf-language-menu>
<adf-language-menu></adf-language-menu>
</mat-menu>
25 changes: 15 additions & 10 deletions src/app/components/info-drawer/info-drawer.component.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
<div *ngIf="isLoading">
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
</div>
<ng-container *ngIf="!isLoading && !!displayNode">
<adf-info-drawer [title]="'APP.INFO_DRAWER.TITLE' | translate">
<adf-info-drawer-tab
*ngFor="let tab of tabs"
[icon]="tab.icon"
[label]="tab.title | translate">
<adf-dynamic-tab [node]="displayNode" [id]="tab.component" [attr.data-automation-id]="tab.component">
</adf-dynamic-tab>
</adf-info-drawer-tab>
</adf-info-drawer>
<adf-info-drawer [title]="'APP.INFO_DRAWER.TITLE' | translate">
<adf-info-drawer-tab
*ngFor="let tab of tabs"
[icon]="tab.icon"
[label]="tab.title | translate"
>
<adf-dynamic-tab
[node]="displayNode"
[id]="tab.component"
[attr.data-automation-id]="tab.component"
>
</adf-dynamic-tab>
</adf-info-drawer-tab>
</adf-info-drawer>
</ng-container>
Loading

0 comments on commit 69f6c58

Please sign in to comment.