Skip to content

Commit

Permalink
[ACA-805] about screen enhancements (#813)
Browse files Browse the repository at this point in the history
* upgrade to latest adf-extensions

* switch to ADF RepositoryState

* show extensions on About page, i18n fixes

* update docs

* cleanup about styles

* greatly simplify app dependencies rendering

* fix linting

* fix tests
  • Loading branch information
DenysVuika authored and suzanadirla committed Nov 21, 2018
1 parent 3061bc4 commit 1c7f31e
Show file tree
Hide file tree
Showing 27 changed files with 6,110 additions and 151 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
/dist
/tmp
/out-tsc
/src/versions.json

# dependencies
/node_modules
Expand Down
8 changes: 4 additions & 4 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"src/assets",
"src/favicon-96x96.png",
"src/app.config.json",
"src/versions.json",
{
"glob": "**/*",
"input": "node_modules/@alfresco/adf-core/prebuilt-themes",
Expand Down Expand Up @@ -155,7 +154,6 @@
"src/assets",
"src/favicon-96x96.png",
"src/app.config.json",
"src/versions.json",
{
"glob": "**/*",
"input": "node_modules/@alfresco/adf-core/prebuilt-themes",
Expand Down Expand Up @@ -187,7 +185,8 @@
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
"**/node_modules/**",
"package.json"
]
}
}
Expand Down Expand Up @@ -217,7 +216,8 @@
"e2e/tsconfig.e2e.json"
],
"exclude": [
"**/node_modules/**"
"**/node_modules/**",
"package.json"
]
}
}
Expand Down
9 changes: 7 additions & 2 deletions docs/extending/extension-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ The format is represented by a JSON file with the structure similar to the follo

```json
{
"$name": "app",
"$id": "unique.id",
"$name": "extension.name",
"$version": "1.0.0",
"$vendor": "author.name",
"$license": "license",
"$runtime": "1.5.0",
"$description": "some description",

"routes": [],
"actions": [],
Expand Down Expand Up @@ -311,4 +316,4 @@ exposed by the application with a custom one coming with the plugin.
]
}
}
```
```
21 changes: 19 additions & 2 deletions extension.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,12 @@
},

"type": "object",
"required": ["$name", "$version"],
"required": ["$id", "$name", "$version", "$vendor", "$license", "$runtime"],
"properties": {
"$id": {
"description": "Unique identifier",
"type": "string"
},
"$name": {
"description": "Extension name",
"type": "string"
Expand All @@ -577,8 +581,21 @@
"description": "Extension version",
"type": "string"
},
"$vendor": {
"description": "Extension owner",
"type": "string"
},
"$license": {
"description": "Indicates the license of the extension.",
"type": "string"
},
"$runtime": {
"description": "Minimal extension runtime supported by extension",
"type": "string"
},
"$description": {
"description": "Brief description on what the extension does"
"description": "Brief description on what the extension does",
"type": "string"
},
"$references": {
"description": "References to external files",
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

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

13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
"license": "LGPL-3.0",
"scripts": {
"ng": "ng",
"start": "npm run server-versions && ng serve --open",
"start:prod": "npm run server-versions && ng serve --prod --open",
"build": "npm run server-versions && node --max-old-space-size=8192 node_modules/@angular/cli/bin/ng build app --prod",
"build:dev": "npm run server-versions && ng build",
"build.e2e": "npm run server-versions && node --max-old-space-size=8192 node_modules/@angular/cli/bin/ng build app --configuration=e2e",
"start": "ng serve --open",
"start:prod": "ng serve --prod --open",
"build": "node --max-old-space-size=8192 node_modules/@angular/cli/bin/ng build app --prod",
"build:dev": "ng build",
"build.e2e": "node --max-old-space-size=8192 node_modules/@angular/cli/bin/ng build app --configuration=e2e",
"test": "ng test app --code-coverage",
"test:ci": "ng test app --code-coverage --watch=false",
"lint": "ng lint",
"server-versions": "rimraf ./src/versions.json && npm list --depth=0 --json=true --prod=true > ./src/versions.json || exit 0",
"wd:update": "webdriver-manager update --gecko=false",
"e2e": "npm run wd:update && protractor --baseUrl=http://localhost:4000",
"e2e.local": "npm run wd:update && protractor --baseUrl=http://localhost:4200",
Expand All @@ -33,7 +32,7 @@
"dependencies": {
"@alfresco/adf-content-services": "2.6.1",
"@alfresco/adf-core": "2.6.1",
"@alfresco/adf-extensions": "2.6.1",
"@alfresco/adf-extensions": "3.0.0-383b74151a47e188020249aea7ec0dfb586bd0b6",
"@angular/animations": "7.0.3",
"@angular/cdk": "^7.0.3",
"@angular/common": "7.0.3",
Expand Down
2 changes: 1 addition & 1 deletion src/app.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"redirectUriLogout": "/logout"
},
"application": {
"name": "Alfresco",
"name": "Alfresco Content Application",
"logo": "assets/images/alfresco-logo-flower.svg",
"copyright": "© 2017 - 2018 Alfresco Software, Inc. All rights reserved."
},
Expand Down
122 changes: 105 additions & 17 deletions src/app/components/about/about.component.html
Original file line number Diff line number Diff line change
@@ -1,38 +1,126 @@
<app-page-layout>

<app-page-layout-content [scrollable]="true">
<div class="main-content">
<article class="padding">
<header class="header padding-left">Alfresco Content Application</header>
<p class="padding-left"> version: {{ releaseVersion }} </p>
<article>
<header>{{ 'application.name' | adfAppConfig }}</header>
<p>{{ 'APP.ABOUT.VERSION' | translate }} {{ releaseVersion }}</p>
</article>

<article *ngIf="repository" class="padding">
<header class="header padding-left">Alfresco Content Services</header>
<p class="padding-left"> version: {{ repository.edition }} {{ repository.version.display }} </p>
<article>
<header>{{ 'APP.ABOUT.PLUGINS.TITLE' | translate }}</header>
<div>
<mat-table [dataSource]="extensions$ | async">
<ng-container matColumnDef="$id">
<mat-header-cell *matHeaderCellDef
>{{ 'APP.ABOUT.PLUGINS.ID' | translate }}
</mat-header-cell>
<mat-cell *matCellDef="let element">{{ element.$id }}</mat-cell>
</ng-container>

<ng-container matColumnDef="$name">
<mat-header-cell *matHeaderCellDef>{{
'APP.ABOUT.PLUGINS.NAME' | translate
}}</mat-header-cell>
<mat-cell *matCellDef="let element">{{ element.$name }}</mat-cell>
</ng-container>

<ng-container matColumnDef="$version">
<mat-header-cell *matHeaderCellDef>{{
'APP.ABOUT.PLUGINS.VERSION' | translate
}}</mat-header-cell>
<mat-cell *matCellDef="let element">{{
element.$version
}}</mat-cell>
</ng-container>

<ng-container matColumnDef="$vendor">
<mat-header-cell *matHeaderCellDef>{{
'APP.ABOUT.PLUGINS.VENDOR' | translate
}}</mat-header-cell>
<mat-cell *matCellDef="let element">{{
element.$vendor
}}</mat-cell>
</ng-container>

<ng-container matColumnDef="$license">
<mat-header-cell *matHeaderCellDef>{{
'APP.ABOUT.PLUGINS.LICENSE' | translate
}}</mat-header-cell>
<mat-cell *matCellDef="let element">{{
element.$license
}}</mat-cell>
</ng-container>

<ng-container matColumnDef="$runtime">
<mat-header-cell *matHeaderCellDef>{{
'APP.ABOUT.PLUGINS.RUNTIME' | translate
}}</mat-header-cell>
<mat-cell *matCellDef="let element">{{
element.$runtime
}}</mat-cell>
</ng-container>

<ng-container matColumnDef="$description">
<mat-header-cell *matHeaderCellDef>{{
'APP.ABOUT.PLUGINS.DESCRIPTION' | translate
}}</mat-header-cell>
<mat-cell *matCellDef="let element">{{
element.$description
}}</mat-cell>
</ng-container>

<mat-header-row
*matHeaderRowDef="extensionColumns"
></mat-header-row>
<mat-row *matRowDef="let row; columns: extensionColumns"></mat-row>
</mat-table>
</div>
</article>

<article *ngIf="repository">
<header>Alfresco Content Services</header>
<p>
{{ 'APP.ABOUT.VERSION' | translate }} {{ repository.edition }}
{{ repository.version.display }}
</p>
</article>

<article class="padding-top-bottom" *ngIf="license">
<header class="header padding-left-right">License</header>
<article *ngIf="license">
<header>{{ 'APP.ABOUT.LICENSE.TITLE' | translate }}</header>
<adf-datatable [data]="license"></adf-datatable>
</article>

<article class="padding-top-bottom">
<header class="header padding-left-right">Status</header>
<article>
<header>{{ 'APP.ABOUT.STATUS.TITLE' | translate }}</header>
<adf-datatable [data]="status"></adf-datatable>
</article>

<article class="padding-top-bottom">
<header class="header padding-left-right">Modules</header>
<article>
<header>{{ 'APP.ABOUT.MODULES.TITLE' | translate }}</header>
<adf-datatable [data]="modules"></adf-datatable>
</article>

<article>
<header class="header padding-left-right">Packages</header>
<small class="padding-left-right">Current project is using the following ADF libraries:</small>
<adf-datatable [data]="data"></adf-datatable>
<header>{{ 'APP.ABOUT.PACKAGES.TITLE' | translate }}</header>
<mat-table [dataSource]="dependencyEntries">
<ng-container matColumnDef="name">
<mat-header-cell *matHeaderCellDef>{{
'APP.ABOUT.PACKAGES.NAME' | translate
}}</mat-header-cell>
<mat-cell *matCellDef="let element">{{ element.name }}</mat-cell>
</ng-container>

<ng-container matColumnDef="version">
<mat-header-cell *matHeaderCellDef>{{
'APP.ABOUT.PACKAGES.VERSION' | translate
}}</mat-header-cell>
<mat-cell *matCellDef="let element">{{ element.version }}</mat-cell>
</ng-container>

<mat-header-row *matHeaderRowDef="dependencyColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: dependencyColumns"></mat-row>
</mat-table>
</article>
</div>
</app-page-layout-content>

</app-page-layout>
58 changes: 24 additions & 34 deletions src/app/components/about/about.component.theme.scss
Original file line number Diff line number Diff line change
@@ -1,39 +1,29 @@
@mixin aca-about-component-theme($theme) {
$foreground: map-get($theme, foreground);

article {
color: mat-color($foreground, text, 0.54);
}

article:first-of-type {
padding-bottom: 0;
}

article:last-of-type {
margin-bottom: 50px;
}

header {
line-height: 24px;
font-size: 14px;
font-weight: 800;
letter-spacing: -0.2px;
}

a {
text-decoration: none;
color: mat-color($foreground, text, 0.87);
}

.padding {
padding: 25px;
}

.padding-top-bottom {
padding: 25px 0 25px 0;
}

.padding-left-right {
padding: 0 25px 0 25px;
.app-about {
.main-content {
padding: 10px;

article {
color: mat-color($foreground, text, 0.54);
padding: 25px 0 25px 0;

& > header {
line-height: 24px;
font-size: 14px;
font-weight: 800;
letter-spacing: -0.2px;
}
}

article:first-of-type {
padding-bottom: 0;
}

article:last-of-type {
margin-bottom: 50px;
}
}
}
}
Loading

0 comments on commit 1c7f31e

Please sign in to comment.