From a46e16c28a6e773cfc6dec5e0af60d3456d62b74 Mon Sep 17 00:00:00 2001 From: Andy Stark <30621568+therealandeeee@users.noreply.github.com> Date: Wed, 23 Jan 2019 07:45:31 +0000 Subject: [PATCH] [ACA-2157] Fixed structure, markup and links (#904) * [ACA-2157] Added brief description and updated links * [ACA-2157] Fixed broken image URL --- docs/README.md | 2 +- docs/extending/actions.md | 2 + docs/extending/application-actions.md | 10 +- docs/extending/application-features.md | 18 +-- docs/extending/creating-custom-evaluators.md | 10 +- docs/extending/extension-format.md | 22 +--- docs/extending/redistributable-libraries.md | 12 +- docs/extending/registration.md | 4 +- docs/extending/routes.md | 4 +- docs/extending/rules.md | 15 +-- docs/extending/tutorials.md | 2 + docs/features/document-list-layout.md | 131 ++++--------------- docs/features/file-viewer.md | 6 +- docs/features/header.md | 12 +- docs/features/info-drawer.md | 12 +- docs/features/search-results.md | 10 +- docs/features/side-navigation.md | 7 +- docs/features/user-interface-layout.md | 2 +- docs/features/version-manager.md | 6 +- docs/getting-started/building-from-source.md | 4 +- docs/getting-started/configuration.md | 14 +- docs/getting-started/cors.md | 1 + docs/getting-started/docker.md | 7 +- docs/getting-started/internationalization.md | 4 +- docs/getting-started/navigation.md | 4 +- docs/getting-started/prerequisites.md | 4 +- 26 files changed, 106 insertions(+), 219 deletions(-) diff --git a/docs/README.md b/docs/README.md index 0831ddbfa..f59a495d3 100644 --- a/docs/README.md +++ b/docs/README.md @@ -8,7 +8,7 @@ Github only: true The Alfresco Content Application a file management application built using -[Alfresco Application Development Framework (ADF)](https://github.com/Alfresco/alfresco-ng2-components) components and was generated with [Angular CLI](https://github.com/angular/angular-cli). +[Alfresco Application Development Framework (ADF)](https://www.alfresco.com/abn/adf/docs) components and was generated with [Angular CLI](https://github.com/angular/angular-cli). ## Documentation diff --git a/docs/extending/actions.md b/docs/extending/actions.md index 2151773e1..a7b8b9cc7 100644 --- a/docs/extending/actions.md +++ b/docs/extending/actions.md @@ -4,6 +4,8 @@ Title: Actions # Actions +Below are the details of the JSON properties that are used to define actions. + | Name | Description | | -- | -- | | **id** | Unique identifier. | diff --git a/docs/extending/application-actions.md b/docs/extending/application-actions.md index df939e0d4..2494f9e7e 100644 --- a/docs/extending/application-actions.md +++ b/docs/extending/application-actions.md @@ -4,8 +4,10 @@ Title: Application Actions # Application Actions -Application is using NgRx (Reactive libraries for Angular, inspired by Redux). -To get more information on NxRx please refer to the following resources: +The app uses **NgRx** (Reactive libraries for Angular, inspired by Redux) +to implement application actions. + +For more information on NgRx, please refer to the following resources: - [Comprehensive Introduction to @ngrx/store](https://gist.github.com/btroncone/a6e4347326749f938510) @@ -41,10 +43,8 @@ export class MyService { You can invoke every application action from the extensions, i.e. buttons, menus, etc. -
-Many of the actions take currently selected nodes if no payload provided. +**Tip:** Many of the actions take currently selected nodes if no payload provided. That simplifies declaring and invoking actions from the extension files. -
In the example below, we create a new entry to the "NEW" menu dropdown and provide a new `Create Folder (plugin1)` command that invokes the `CREATE_FOLDER` application action. diff --git a/docs/extending/application-features.md b/docs/extending/application-features.md index 6aa546181..7eea45a9f 100644 --- a/docs/extending/application-features.md +++ b/docs/extending/application-features.md @@ -117,9 +117,7 @@ You can populate the menu with an extra entries like in the example below: Please refer to the [Content Actions](/extending/application-features#content-actions) section for more details on supported properties. --It is also possible to update or disable existing entries from within the external extension files. You will need to know the `id` of the target element to customize. -
+**Tip:** It is also possible to update or disable existing entries from within the external extension files. You will need to know the `id` of the target element to customize. ## Navigation Bar @@ -235,10 +233,8 @@ The example above renders two tabs: All corresponding components must be registered for runtime use. --See the [Registration](/extending/registration) section for more details +**Tip:** See the [Registration](/extending/registration) section for more details on how to register your own entries to be re-used at runtime. -
### Tab properties @@ -537,7 +533,7 @@ As with other content actions, custom plugins can disable, update or extend `Ope ## Content metadata presets -The content metadata presets are needed by the [Content Metadata Component](https://alfresco.github.io/adf-component-catalog/components/ContentMetadataComponent.html#readme) to render the properties of metadata aspects for a given node. +The content metadata presets are needed by the [Content Metadata Component](https://www.alfresco.com/abn/adf/docs/content-services/content-metadata-card.component/) to render the properties of metadata aspects for a given node. The different aspects and their properties are configured in the `app.config.json` file, but they can also be set on runtime through extension files. Configuring these presets from `app.extensions.json` will overwrite the default application setting. @@ -547,9 +543,7 @@ Check out more info about merging extensions [here](/extending/extension-format# The `content-metadata-presets` elements can be switched off by setting the `disabled` property. This can be applied also for nested items, allowing disabling down to aspect level. --In order to modify or disable existing entries, you need to know the id of the target element, along with its parents ids. -
+**Tip:** In order to modify or disable existing entries, you need to know the id of the target element, along with its parents ids. Your extensions can perform the following actions at runtime: @@ -642,7 +636,5 @@ Here is the initial setting from `app.extension.json`: ``` --In order to allow the content-metadata presets to be extended, the settings from `app.config.json` must be copied to the `app.extensions.json` file and its ids must be added to all the items. +**Tip:** In order to allow the content-metadata presets to be extended, the settings from `app.config.json` must be copied to the `app.extensions.json` file and its ids must be added to all the items. Having ids allows external plugins to extend the current setting. -
diff --git a/docs/extending/creating-custom-evaluators.md b/docs/extending/creating-custom-evaluators.md index a397d1650..b6d9c1f36 100644 --- a/docs/extending/creating-custom-evaluators.md +++ b/docs/extending/creating-custom-evaluators.md @@ -6,7 +6,9 @@ Title: Creating custom evaluators Rule evaluators are plain JavaScript (or TypeScript) functions that take `RuleContext` references and an optional list of `RuleParameter` instances. -Application provides a special [RuleEvaluator](https://github.com/Alfresco/alfresco-content-app/blob/master/src/app/extensions/rule.extensions.ts#L30) type alias for evaluator functions: +Application provides a special +[RuleEvaluator](https://github.com/Alfresco/alfresco-ng2-components/blob/development/lib/extensions/src/lib/config/rule.extensions.ts) +type alias for evaluator functions: ```ts export type RuleEvaluator = (context: RuleContext, ...args: any[]) => boolean; @@ -23,7 +25,7 @@ export function hasSelection( } ``` -The `context` is a reference to a special instance of the [RuleContext](https://github.com/Alfresco/alfresco-content-app/blob/master/src/app/extensions/rule.extensions.ts#L32) type, +The `context` is a reference to a special instance of the [RuleContext](https://github.com/Alfresco/alfresco-ng2-components/blob/development/lib/extensions/src/lib/config/rule.extensions.ts) type, that provides each evaluator access to runtime entities. ```ts @@ -63,7 +65,5 @@ extensions.setEvaluators({ Now, the `plugin1.rules.hasSelection` evaluator can be used as an inline rule reference, or part of the composite rule like `core.every`. --See the [Registration](/extending/registration) section for more details +**Tip:** See the [Registration](/extending/registration) section for more details on how to register your own entries to be re-used at runtime. -
diff --git a/docs/extending/extension-format.md b/docs/extending/extension-format.md index b39e6383a..1259eb654 100644 --- a/docs/extending/extension-format.md +++ b/docs/extending/extension-format.md @@ -25,11 +25,9 @@ The format is represented by a JSON file with the structure similar to the follo ## Schema -You can find the JSON schema at the project root folder: [extension.schema.json](https://github.com/Alfresco/alfresco-content-app/blob/master/extension.schema.json). +You can find the JSON schema at the project root folder: [extension.schema.json](../../extension.schema.json). --The Schema allows you to validate extension files, provides code completion and documentation hints. -
+**Tip:** The Schema allows you to validate extension files, provides code completion and documentation hints. ```json { @@ -54,10 +52,8 @@ The order of declaration defines the order of loading. } ``` --All extension files are merged together at runtime. +**Note:** All extension files are merged together at runtime. This allows plugins to overwrite the code from the main application or to alter other plugins. -
## Startup behavior @@ -69,10 +65,8 @@ For the sake of speed the files are loaded in parallel, however once everything After all the external files are fetched, the `Loader` sorts them, removes the metadata properties and stacks the resulting JSON objects on top of each other. --Any top-level property name that starts with the `$` symbol is considered metadata and does not participate in the merge process. +**Tip:** Any top-level property name that starts with the `$` symbol is considered metadata and does not participate in the merge process. That allows a plugin to carry extra information for maintenance and visualisation purposes, for example: `$name`, `$version`, `$description`, `$license`, etc. -
### Merging properties @@ -112,10 +106,8 @@ Final result: Note that as a result we have two unique properties `plugin1.key` and `plugin2.key`, and also a `plugin1.text` that was first defined in the `Plugin 1`, but then overwritten by the `Plugin 2`. --JSON merging is a very powerful concept as it gives you the ability to alter any base application settings, +**Tip:** JSON merging is a very powerful concept as it gives you the ability to alter any base application settings, or toggle features in other plugins without rebuilding the application or corresponding plugin libraries. -
### Merging objects @@ -216,9 +208,7 @@ You can find more details in the [Disabling Content](/extending/extension-format The extension `Loader` provides a special support for merging Arrays. By default, two collections will be merged into a single array unless objects have `id` properties. --If array contains two objects with the same `id` property, the objects will be merged rather than appended. -
+**Tip:** If the array contains two objects with the same `id` property, the objects will be merged rather than appended. Before: Plugin 1 diff --git a/docs/extending/redistributable-libraries.md b/docs/extending/redistributable-libraries.md index f73e8294d..d7502dccd 100644 --- a/docs/extending/redistributable-libraries.md +++ b/docs/extending/redistributable-libraries.md @@ -122,10 +122,8 @@ Update the root `package.json` file and append the following entry to the `scrip You can now use that script to build the library and copy assets to the output folder. --It is good practice to provide installation instructions for your library in the `README.md` file. +**Tip:** It is good practice to provide installation instructions for your library in the `README.md` file. Be sure to mention that developers should have a build rule to copy your plugin definition file to the `assets/plugins` folder of the main application. -
## Publishing library to NPM @@ -156,9 +154,7 @@ npm install my-extension This installs the library and all its dependencies. --You do not need to install the library in the original workspace as the application is already configured to use the local version from the `dist` folder. -
+**Note:** You do not need to install the library in the original workspace as the application is already configured to use the local version from the `dist` folder. ### Copy assets @@ -223,6 +219,4 @@ npm start Click the `My Extension` link and in the main content area you will see the extension component coming from your library. --Depending on the application setup, you may need enabling external plugins via the `Settings` dialog available for `admin` users (clicking the application profile button). -
+**Note:** Depending on the application setup, you may need enabling external plugins via the `Settings` dialog available for `admin` users (clicking the application profile button). diff --git a/docs/extending/registration.md b/docs/extending/registration.md index 6d4f1515e..cf2500b1d 100644 --- a/docs/extending/registration.md +++ b/docs/extending/registration.md @@ -42,10 +42,8 @@ export class MyExtensionModule { } ``` --According to Angular rules, all components that are created dynamically at runtime +**Note:** According to Angular rules, all components that are created dynamically at runtime need to be registered within the `entryComponents` section of the NgModule. -
The Registration API is not limited to the custom content only. You can replace any existing entries by replacing the values from your module. diff --git a/docs/extending/routes.md b/docs/extending/routes.md index 05169ed10..5ba8af0db 100644 --- a/docs/extending/routes.md +++ b/docs/extending/routes.md @@ -38,10 +38,8 @@ Use the `app.layout.main` value for the `layout` property to get the default app with header, navigation sidebar and main content area. You can register any component to back the `app.layout.main` value. --By default, the `app.layout.main` is used if you do not specify any custom values. +**Tip:** By default, the `app.layout.main` is used if you do not specify any custom values. Use `blank` if you want your route component take the whole page. -
You can define the full route schema like in the next example: diff --git a/docs/extending/rules.md b/docs/extending/rules.md index 1370c1e39..655443ceb 100644 --- a/docs/extending/rules.md +++ b/docs/extending/rules.md @@ -4,8 +4,7 @@ Title: Rules # Rules -Rules allow evaluating conditions for extension components. -For example, you can disable or hide elements based on certain rules. +Rules allow you to evaluate conditions for extension components, so you can disable or hide elements based on certain rules, for example. Every rule is backed by a condition evaluator. @@ -47,10 +46,8 @@ Rules can accept other rules as parameters: } ``` --You can also negate any rule by utilizing a `!` prefix: +**Tip:** You can also negate any rule by utilizing a `!` prefix: `!app.navigation.isTrashcan` is the opposite of the `app.navigation.isTrashcan`. -
It is also possible to use inline references to registered evaluators without declaring rules, in case you do not need providing extra parameters, or chaining multiple rules together. @@ -160,10 +157,8 @@ The application exposes a set of navigation-related evaluators to help developer The negated evaluators are provided just to simplify development, and to avoid having complex rule trees just to negate the rules, for example mixing `core.every` and `core.not`. --You can also negate any rule by utilizing a `!` prefix: +**Tip:** You can also negate any rule by utilizing a `!` prefix: `!app.navigation.isTrashcan` is the opposite of the `app.navigation.isTrashcan`. -
| Key | Description | | --------------------------------- | ------------------------------------------------------- | @@ -182,10 +177,8 @@ You can also negate any rule by utilizing a `!` prefix: | app.navigation.isSearchResults | User is using the **Search Results** page. | | app.navigation.isNotSearchResults | Current page is not the **Search Results**. | --See [Registration](/extending/registration) section for more details +**Tip:** See the [Registration](/extending/registration) section for more details on how to register your own entries to be re-used at runtime. -
### Example diff --git a/docs/extending/tutorials.md b/docs/extending/tutorials.md index e946e06b1..49c0d6bbc 100644 --- a/docs/extending/tutorials.md +++ b/docs/extending/tutorials.md @@ -4,6 +4,8 @@ Title: Tutorials # Tutorials +Below are some short tutorials that cover common tasks. + ## Custom route with parameters In this tutorial, we are going to implement the following features: diff --git a/docs/features/document-list-layout.md b/docs/features/document-list-layout.md index cf9cb4a71..1712ba179 100644 --- a/docs/features/document-list-layout.md +++ b/docs/features/document-list-layout.md @@ -6,10 +6,10 @@ Title: Document List Layout The main area of the application is composed of several individual ADF components: -1. [Breadcrumb](https://alfresco.github.io/adf-component-catalog/components/BreadcrumbComponent.html) -2. [Toolbar](https://alfresco.github.io/adf-component-catalog/components/ToolbarComponent.html) -3. [Document List](https://alfresco.github.io/adf-component-catalog/components/DocumentListComponent.html) -4. [Pagination](https://alfresco.github.io/adf-component-catalog/components/PaginationComponent.html) +1. [Breadcrumb](https://www.alfresco.com/abn/adf/docs/content-services/breadcrumb.component/) +2. [Toolbar](https://www.alfresco.com/abn/adf/docs/core/toolbar.component/) +3. [Document List](https://www.alfresco.com/abn/adf/docs/content-services/document-list.component/) +4. [Pagination](https://www.alfresco.com/abn/adf/docs/core/pagination.component/)  @@ -20,150 +20,77 @@ The application has seven different Document List views which share commonalitie Personal Files retrieves all content from the logged in user's home area (`/User Homes/Action | -File | -Folder | - - -
---|---|---|
View | -- Opens the selected file using the Preview component, - where the file cannot be displayed natively in a browser a PDF rendition is obtained from the repository. - | -Not applicable | -
Download | -Downloads single files to the user's computer, when multiple files are selected they are compressed into a ZIP and then downloaded. | -Folders are automatically compressed into a ZIP and then downloaded to the user's computer. | -
Edit | -Not applicable | -The folder name and description can be edited in a dialog. | -
Favorite | -- Toggle the favorite mark on or off for files and folders, when multiple items are selected - and one or more are not favorites then the mark will be toggled on. - | -|
Copy | -- Files and folders can be copied to another location in the content repository using the - content-node-selector component; - once the copy action has completed the user is notified and can undo the action (which permanently deletes the created copies). - | -|
Move | -- Files and folders can be moved to another location in the content repository using the - content-node-selector component; - once the move action has completed the user is notified and can undo the action (which moves the items back to the original location). - | -|
Share | -- Create and copy a link to a file that can be shared, the links are accessible without granting permissions to the file, and do not require users to login to the application. Share links can automatically expire based on a date, the minimum expiry date is controlled by the Content Services repository, which is 1 day from the date of creation. - | -- Not applicable. - | -
Delete | -- Files and folders can be deleted from their location in the content repository; - once the delete action has completed the user is notified and can undo the action (which restores the items from the trash). - | -|
Manage Versions | -- Versions of files can be viewed, uploaded, restored, downloaded and deleted by using the version manager dialog; - once each action has completed the list of versions is updated according to the change. - | -Not applicable | -
Permissions | -- Permissions on a file can be adjusted as required in a number of ways; disable inheritance from the parent folder, change a user or groups role and grant users/groups access. - | -Not available | -
-The proxy settings get automatically applied every time you run the application with the "npm start" script. +**Note:** The proxy settings get automatically applied every time you run the application with the "npm start" script. You must restart the application every time you change its settings. -
## Running unit tests diff --git a/docs/getting-started/configuration.md b/docs/getting-started/configuration.md index 04bb1fbdb..fe039187f 100644 --- a/docs/getting-started/configuration.md +++ b/docs/getting-started/configuration.md @@ -73,10 +73,7 @@ If you run the application from a different server than the Content Services ser } ``` --If you run the application as part of Tomcat and not in the root (subfolder), then "baseShareUrl" value should contain full address to the app, for example: "baseShareUrl": "http://{serveraddress}{:port}/{folder}". -
- +**Note:** If you run the application as part of Tomcat and not in the root (subfolder), then "baseShareUrl" value should contain full address to the app, for example: "baseShareUrl": "http://{serveraddress}{:port}/{folder}". ## Application settings @@ -149,9 +146,7 @@ By default, the application ships with the following rules already predefined: } ``` --You can get more details on the supported rules in the following article: Upload Service. -
+**Tip:** You can find more details on the supported rules in the ADF [Upload Service](https://www.alfresco.com/abn/adf/docs/core/upload.service/) docs. ### Pagination settings @@ -175,6 +170,5 @@ You can change the default settings of the pagination that gets applied to all t You can store any information in the application configuration file, and access it at runtime by using the `AppConfigService` service provided by ADF. --Please refer to the AppConfigService documentation to get more details on Application Configuration features and API's available. -
+**Tip:** Please refer to the ADF +[App Config Service](https://www.alfresco.com/abn/adf/docs/core/app-config.service/) documentation to get more details on the Application Configuration features and APIs available. diff --git a/docs/getting-started/cors.md b/docs/getting-started/cors.md index 07fae3339..cddddfd6a 100644 --- a/docs/getting-started/cors.md +++ b/docs/getting-started/cors.md @@ -5,6 +5,7 @@ Title: CORS # CORS The Alfresco Content Application comes with the proxy configuration for Angular CLI to address CORS-related issues for development. + Also, the docker images contain Nginx settings needed for CORS when developing and debugging an application locally. ## Chrome Workaround diff --git a/docs/getting-started/docker.md b/docs/getting-started/docker.md index e52006ec1..350e2c4b9 100644 --- a/docs/getting-started/docker.md +++ b/docs/getting-started/docker.md @@ -4,7 +4,8 @@ Title: Docker # Docker -The ACA comes with the ACS 6.0 Community Edition preconfigured. +ACA comes with the ACS 6.0 Community Edition preconfigured. + The application runs in two modes: - Development (runs latest source code, requires building application) @@ -29,9 +30,7 @@ npm run stop:docker ## Preview Mode --With this mode, you do not need building application from source code or installing dependencies. -
+**Tip:** With this mode, you do not need building application from source code or installing dependencies. To run the latest published container go to the `docker-compose` folder and start docker compose from there: diff --git a/docs/getting-started/internationalization.md b/docs/getting-started/internationalization.md index 9d568d355..de9ebbaf5 100644 --- a/docs/getting-started/internationalization.md +++ b/docs/getting-started/internationalization.md @@ -23,7 +23,7 @@ The default language is English, however the current browser language is taken a ## User-defined language You can allow users to set custom languages that are saved to their preferences. -The main application menu already has the [ADF Language Menu](https://github.com/Alfresco/alfresco-ng2-components/blob/master/docs/core/language-menu.component.md) component integrated and pre-filled with the supported items. +The main application menu already has the [ADF Language Menu](https://www.alfresco.com/abn/adf/docs/core/language-menu.component/) component integrated and pre-filled with the supported items. To change the default language set edit the `app.config.json` file and add or remove items: @@ -80,7 +80,7 @@ You can copy the content over to your newly created file and replace the English The Content Application automatically bundles your file when the project builds. You can test your locale by changing the browser language settings and reloading the page. -Optionally, you can extend the [ADF Language Menu](https://github.com/Alfresco/alfresco-ng2-components/blob/master/docs/core/language-menu.component.md) component with the newly added language by updating the `app.config.json` file. +Optionally, you can extend the [ADF Language Menu](https://www.alfresco.com/abn/adf/docs/core/language-menu.component/) component with the newly added language by updating the `app.config.json` file. ## Customizing ADF translations diff --git a/docs/getting-started/navigation.md b/docs/getting-started/navigation.md index 5ec08fb46..c684b366b 100644 --- a/docs/getting-started/navigation.md +++ b/docs/getting-started/navigation.md @@ -54,9 +54,7 @@ Navigation configuration supports array and object like schema. Defining an obje `label` - represents the visual name of the link. It can be a string or a i18n defined reference. -- Changing ` "route": { "url": "/..." } ` value will affect the navigation since these are mapped to application routing system. -
+**Caution:** Changing ` "route": { "url": "/..." } ` value will affect the navigation since these are mapped to application routing system. ### Custom text (i18n) diff --git a/docs/getting-started/prerequisites.md b/docs/getting-started/prerequisites.md index e3fd3d00c..5cb03903d 100644 --- a/docs/getting-started/prerequisites.md +++ b/docs/getting-started/prerequisites.md @@ -10,9 +10,7 @@ This application uses the latest releases from Alfresco: - [Alfresco Content Services (6.0)](https://www.alfresco.com/platform/content-services-ecm) or [Alfresco Community Edition (6.0 - General Release: 201806)](https://www.alfresco.com/products/community/download) --You also need node.js (LTS) installed to build it locally from source code. -
+**Note:** You also need [Node.js](https://nodejs.org/en/) (LTS) installed to build it locally from source code. The latest version of the Alfresco Content platform is required due to the application using the latest [REST APIs](https://docs.alfresco.com/5.2/pra/1/topics/pra-welcome.html) developments. \ No newline at end of file