Skip to content

Commit

Permalink
[ACS-5631] Improved page layout and provide documentation (#3346)
Browse files Browse the repository at this point in the history
* page layout supports CSS selectors

* migrate to using CSS selectors for page layout

* add docs
  • Loading branch information
DenysVuika authored Jul 18, 2023
1 parent 4ded3b2 commit a6ab4a3
Show file tree
Hide file tree
Showing 29 changed files with 148 additions and 142 deletions.
8 changes: 4 additions & 4 deletions projects/aca-content/about/src/about.component.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<aca-page-layout>
<aca-page-layout-header>
<div class="aca-page-layout-header">
<button mat-icon-button [routerLink]="landingPage">
<mat-icon class="app-profile-icon">arrow_back</mat-icon>
</button>
<h1>{{ 'APP.BROWSE.ABOUT.TITLE' | translate }}</h1>
</aca-page-layout-header>
</div>

<aca-page-layout-content [scrollable]="true">
<div class="aca-page-layout-content scrollable">
<adf-about>
<adf-about-panel *ngIf="dev" [label]="'ABOUT.SERVER_SETTINGS.TITLE' | translate">
<ng-template>
Expand All @@ -32,5 +32,5 @@ <h1>{{ 'APP.BROWSE.ABOUT.TITLE' | translate }}</h1>
</ng-template>
</adf-about-panel>
</adf-about>
</aca-page-layout-content>
</div>
</aca-page-layout>
14 changes: 2 additions & 12 deletions projects/aca-content/about/src/about.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,15 @@ import { AboutModule, AppConfigService, AuthenticationService, RepositoryInfo }
import { DiscoveryApiService } from '@alfresco/adf-content-services';
import { PACKAGE_JSON } from './package-json.token';
import { TranslateModule } from '@ngx-translate/core';
import { AppExtensionService, PageLayoutComponent, PageLayoutContentComponent, PageLayoutHeaderComponent } from '@alfresco/aca-shared';
import { AppExtensionService, PageLayoutComponent } from '@alfresco/aca-shared';
import { RouterModule } from '@angular/router';
import { MatIconModule } from '@angular/material/icon';
import { CommonModule } from '@angular/common';
import { MatButtonModule } from '@angular/material/button';

@Component({
standalone: true,
imports: [
CommonModule,
TranslateModule,
AboutModule,
RouterModule,
MatIconModule,
MatButtonModule,
PageLayoutHeaderComponent,
PageLayoutContentComponent,
PageLayoutComponent
],
imports: [CommonModule, TranslateModule, AboutModule, RouterModule, MatIconModule, MatButtonModule, PageLayoutComponent],
selector: 'app-about-page',
templateUrl: './about.component.html',
styleUrls: ['./about.component.scss'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<aca-page-layout>

<aca-page-layout-header>
<div class="aca-page-layout-header">
<adf-toolbar class="adf-toolbar--inline">
<button mat-icon-button (click)="goBack()">
<mat-icon>arrow_back</mat-icon>
</button>
</adf-toolbar>
<adf-breadcrumb root="{{'ACA_FOLDER_RULES.ACTIONS.MANAGE_RULES' | translate}}"></adf-breadcrumb>
</aca-page-layout-header>
</div>

<aca-page-layout-content>
<div class="aca-page-layout-content">
<div class="main-content">

<ng-container *ngIf="((ruleSetsLoading$ | async) && (inheritedRuleSets$ | async).length === 0) || (actionsLoading$ | async); else onLoaded">
Expand Down Expand Up @@ -127,14 +127,14 @@
</ng-container>

<ng-template #genericError>
<aca-page-layout-error>
<div class="aca-page-layout-error">
<aca-generic-error></aca-generic-error>
</aca-page-layout-error>
</div>
</ng-template>

</ng-template>

</div>
</aca-page-layout-content>
</div>

</aca-page-layout>
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,7 @@ import { RuleSetPickerSmartComponent } from '../rule-set-picker/rule-set-picker.
import { MatSlideToggleChange, MatSlideToggleModule } from '@angular/material/slide-toggle';
import { ActionParameterConstraint } from '../model/action-parameter-constraint.model';
import { TranslateModule } from '@ngx-translate/core';
import {
GenericErrorComponent,
PageLayoutComponent,
PageLayoutContentComponent,
PageLayoutErrorComponent,
PageLayoutHeaderComponent
} from '@alfresco/aca-shared';
import { GenericErrorComponent, PageLayoutComponent } from '@alfresco/aca-shared';
import { MatButtonModule } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';
import { MatProgressBarModule } from '@angular/material/progress-bar';
Expand All @@ -72,9 +66,6 @@ import { RuleDetailsUiComponent } from '../rule-details/rule-details.ui-componen
RuleListUiComponent,
RouterModule,
TemplateModule,
PageLayoutErrorComponent,
PageLayoutContentComponent,
PageLayoutHeaderComponent,
GenericErrorComponent,
RuleDetailsUiComponent,
MatDialogModule
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<aca-page-layout>
<aca-page-layout-header>
<div class="aca-page-layout-header">
<adf-breadcrumb [root]="title" [folderNode]="node" (navigate)="goBack()"> </adf-breadcrumb>

<adf-toolbar class="adf-toolbar--inline">
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
<aca-toolbar-action [actionRef]="entry"></aca-toolbar-action>
</ng-container>
</adf-toolbar>
</aca-page-layout-header>
</div>

<aca-page-layout-content>
<div class="aca-page-layout-content">
<div class="acs-details-container">
<div class="acs-details-title">
<div class="acs-details-breadcrumb" role="heading" aria-level="2" *ngIf="node">
Expand All @@ -36,7 +36,7 @@
</mat-tab>
</mat-tab-group>
</div>
</aca-page-layout-content>
</div>
</aca-page-layout>

<ng-template #loading>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,7 @@

import { Component, OnInit, ViewEncapsulation, OnDestroy } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import {
ContentApiService,
PageComponent,
PageLayoutComponent,
PageLayoutContentComponent,
PageLayoutHeaderComponent,
ToolbarActionComponent
} from '@alfresco/aca-shared';
import { ContentApiService, PageComponent, PageLayoutComponent, ToolbarActionComponent } from '@alfresco/aca-shared';
import { NavigateToPreviousPage, SetSelectedNodesAction } from '@alfresco/aca-shared/store';
import { Subject } from 'rxjs';
import { BreadcrumbModule, PermissionManagerModule } from '@alfresco/adf-content-services';
Expand Down Expand Up @@ -60,9 +53,7 @@ import { CommentsTabComponent } from '../info-drawer/comments-tab/comments-tab.c
MetadataTabComponent,
CommentsTabComponent,
ToolbarActionComponent,
PageLayoutComponent,
PageLayoutContentComponent,
PageLayoutHeaderComponent
PageLayoutComponent
],
selector: 'app-details-manager',
templateUrl: './details.component.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<aca-page-layout>
<aca-page-layout-header>
<div class="aca-page-layout-header">
<adf-breadcrumb root="APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.TITLE"> </adf-breadcrumb>

<adf-toolbar class="adf-toolbar--inline">
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
<aca-toolbar-action [actionRef]="entry"></aca-toolbar-action>
</ng-container>
</adf-toolbar>
</aca-page-layout-header>
</div>

<aca-page-layout-content>
<div class="aca-page-layout-content">
<div class="main-content">
<adf-document-list
#documentList
Expand Down Expand Up @@ -81,5 +81,5 @@
<div class="aca-sidebar" *ngIf="infoDrawerOpened$ | async">
<aca-info-drawer [node]="selection.last"></aca-info-drawer>
</div>
</aca-page-layout-content>
</div>
</aca-page-layout>
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ import {
InfoDrawerComponent,
PageComponent,
PageLayoutComponent,
PageLayoutContentComponent,
PageLayoutHeaderComponent,
ToolbarActionComponent
} from '@alfresco/aca-shared';
import { NavigateLibraryAction } from '@alfresco/aca-shared/store';
Expand All @@ -57,9 +55,7 @@ import { DocumentListDirective } from '../../directives/document-list.directive'
PaginationModule,
InfoDrawerComponent,
ToolbarActionComponent,
PageLayoutComponent,
PageLayoutContentComponent,
PageLayoutHeaderComponent
PageLayoutComponent
],
templateUrl: './favorite-libraries.component.html',
encapsulation: ViewEncapsulation.None
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<aca-page-layout>
<aca-page-layout-header>
<div class="aca-page-layout-header">
<adf-breadcrumb root="APP.BROWSE.FAVORITES.TITLE"> </adf-breadcrumb>

<adf-toolbar class="adf-toolbar--inline">
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
<aca-toolbar-action [actionRef]="entry"></aca-toolbar-action>
</ng-container>
</adf-toolbar>
</aca-page-layout-header>
</div>

<aca-page-layout-content>
<div class="aca-page-layout-content">
<div class="main-content">
<adf-document-list
#documentList
Expand Down Expand Up @@ -68,5 +68,5 @@
<div class="aca-sidebar" *ngIf="infoDrawerOpened$ | async">
<aca-info-drawer [node]="selection.last"></aca-info-drawer>
</div>
</aca-page-layout-content>
</div>
</aca-page-layout>
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ import {
InfoDrawerComponent,
PageComponent,
PageLayoutComponent,
PageLayoutContentComponent,
PageLayoutHeaderComponent,
PaginationDirective,
ToolbarActionComponent
} from '@alfresco/aca-shared';
Expand Down Expand Up @@ -58,8 +56,6 @@ import { DocumentListDirective } from '../../directives/document-list.directive'
PaginationDirective,
InfoDrawerComponent,
ToolbarActionComponent,
PageLayoutContentComponent,
PageLayoutHeaderComponent,
PageLayoutComponent
],
templateUrl: './favorites.component.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<aca-page-layout [hasError]="!isValidPath">
<aca-page-layout-header>
<div class="aca-page-layout-header">
<adf-breadcrumb [root]="title" [folderNode]="node" [maxItems]="isSmallScreen ? 1 : 0" (navigate)="onBreadcrumbNavigate($event)"> </adf-breadcrumb>

<adf-toolbar class="adf-toolbar--inline">
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
<aca-toolbar-action [actionRef]="entry"></aca-toolbar-action>
</ng-container>
</adf-toolbar>
</aca-page-layout-header>
</div>

<aca-page-layout-error>
<div class="aca-page-layout-error">
<aca-generic-error></aca-generic-error>
</aca-page-layout-error>
</div>

<aca-page-layout-content>
<div class="aca-page-layout-content">
<div class="main-content" *ngIf="!(showLoader$ | async)">
<adf-upload-drag-area [rootFolderId]="node?.id" [disabled]="!canUpload" (updateFileVersion)="onUploadNewVersion($event)">
<adf-document-list
Expand Down Expand Up @@ -97,5 +97,5 @@
<div class="aca-sidebar" *ngIf="infoDrawerOpened$ | async">
<aca-info-drawer [node]="selection.last"></aca-info-drawer>
</div>
</aca-page-layout-content>
</div>
</aca-page-layout>
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ import {
InfoDrawerComponent,
PageComponent,
PageLayoutComponent,
PageLayoutContentComponent,
PageLayoutErrorComponent,
PageLayoutHeaderComponent,
PaginationDirective,
ToolbarActionComponent
} from '@alfresco/aca-shared';
Expand Down Expand Up @@ -68,9 +65,6 @@ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
InfoDrawerComponent,
ToolbarActionComponent,
PaginationDirective,
PageLayoutHeaderComponent,
PageLayoutContentComponent,
PageLayoutErrorComponent,
PageLayoutComponent
],
templateUrl: './files.component.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<aca-page-layout>
<aca-page-layout-header>
<div class="aca-page-layout-header">
<adf-breadcrumb root="APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.TITLE"> </adf-breadcrumb>

<adf-toolbar class="adf-toolbar--inline">
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
<aca-toolbar-action [actionRef]="entry"></aca-toolbar-action>
</ng-container>
</adf-toolbar>
</aca-page-layout-header>
</div>

<aca-page-layout-content>
<div class="aca-page-layout-content">
<div class="main-content">
<adf-document-list
#documentList
Expand Down Expand Up @@ -72,5 +72,5 @@
<div class="aca-sidebar" *ngIf="infoDrawerOpened$ | async">
<aca-info-drawer [node]="$any(selection).library"></aca-info-drawer>
</div>
</aca-page-layout-content>
</div>
</aca-page-layout>
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ import {
InfoDrawerComponent,
PageComponent,
PageLayoutComponent,
PageLayoutContentComponent,
PageLayoutHeaderComponent,
PaginationDirective,
ToolbarActionComponent
} from '@alfresco/aca-shared';
Expand All @@ -58,8 +56,6 @@ import { DocumentListDirective } from '../../directives/document-list.directive'
PaginationDirective,
InfoDrawerComponent,
ToolbarActionComponent,
PageLayoutContentComponent,
PageLayoutHeaderComponent,
PageLayoutComponent
],
templateUrl: './libraries.component.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<aca-page-layout>
<aca-page-layout-header>
<div class="aca-page-layout-header">
<adf-breadcrumb root="APP.BROWSE.RECENT.TITLE"> </adf-breadcrumb>

<adf-toolbar class="adf-toolbar--inline">
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
<aca-toolbar-action [actionRef]="entry"></aca-toolbar-action>
</ng-container>
</adf-toolbar>
</aca-page-layout-header>
</div>

<aca-page-layout-content>
<div class="aca-page-layout-content">
<div class="main-content">
<adf-document-list
#documentList
Expand Down Expand Up @@ -68,5 +68,5 @@
<div class="aca-sidebar" *ngIf="infoDrawerOpened$ | async">
<aca-info-drawer [node]="selection.last"></aca-info-drawer>
</div>
</aca-page-layout-content>
</div>
</aca-page-layout>
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ import {
InfoDrawerComponent,
PageComponent,
PageLayoutComponent,
PageLayoutContentComponent,
PageLayoutHeaderComponent,
PaginationDirective,
ToolbarActionComponent
} from '@alfresco/aca-shared';
Expand All @@ -57,8 +55,6 @@ import { DocumentListDirective } from '../../directives/document-list.directive'
PaginationDirective,
InfoDrawerComponent,
ToolbarActionComponent,
PageLayoutContentComponent,
PageLayoutHeaderComponent,
PageLayoutComponent
],
templateUrl: './recent-files.component.html',
Expand Down
Loading

0 comments on commit a6ab4a3

Please sign in to comment.