From 888e638eee8e2b61065b446866cc375bbaa0390a Mon Sep 17 00:00:00 2001 From: Quinten Yearsley Date: Tue, 5 Dec 2017 11:11:09 -0800 Subject: [PATCH] Proofreading PolyGerrit plugin dev docs Change-Id: I9c971b607c2a5cdbcbb44b7837534743e6662ed1 --- Documentation/pg-plugin-dev.txt | 12 ++++++------ Documentation/pg-plugin-endpoints.txt | 22 +++++++++++----------- Documentation/pg-plugin-styling.txt | 12 ++++++------ 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Documentation/pg-plugin-dev.txt b/Documentation/pg-plugin-dev.txt index c4017f304a..5b91f756f7 100644 --- a/Documentation/pg-plugin-dev.txt +++ b/Documentation/pg-plugin-dev.txt @@ -21,7 +21,7 @@ spec. located in `gerrit-site/plugins` folder, where `pluginname` is an alphanumeric plugin name. -Note: Code examples target modern brosers (Chrome, Firefox, Safari, Edge) +Note: Code examples target modern browsers (Chrome, Firefox, Safari, Edge). Here's a recommended starter `myplugin.html`: @@ -132,17 +132,17 @@ Note: TODO: Insert link to the full styling API. [[high-level-api-concepts]] == High-level DOM API concepts -High leve API is based on low-level DOM API and is essentially a standartized +High level API is based on low-level DOM API and is essentially a standardized way for doing common tasks. It's less flexible, but will be a bit more stable. -Common way to access high-leve API is through `plugin` instance passed into -setup callback parameter of `Gerrit.install()`, also sometimes referred as -`self`. +The common way to access high-level API is through `plugin` instance passed +into setup callback parameter of `Gerrit.install()`, also sometimes referred to +as `self`. [[low-level-api]] == Low-level DOM API -Low-level DOM API methods are the base of all UI customization. +The low-level DOM API methods are the base of all UI customization. === attributeHelper `plugin.attributeHelper(element)` diff --git a/Documentation/pg-plugin-endpoints.txt b/Documentation/pg-plugin-endpoints.txt index 7c960dd1e0..315ef203db 100644 --- a/Documentation/pg-plugin-endpoints.txt +++ b/Documentation/pg-plugin-endpoints.txt @@ -1,6 +1,6 @@ = Gerrit Code Review - PolyGerrit Plugin Styling -Plugin should be html-based and imported following PolyGerrit's +Plugins should be html-based and imported following PolyGerrit's link:pg-plugin-dev.html#loading[dev guide]. Sample code for testing endpoints: @@ -19,8 +19,8 @@ Gerrit.install(plugin => { ``` == Default parameters -All endpoints receive the following params, set as attributes to custom components -that are instantiated at the endpoint: +All endpoints receive the following parameters, set as attributes to custom +components that are instantiated at the endpoint: * `plugin` + @@ -33,12 +33,12 @@ components. == Plugin endpoints -Following endpoints are available to plugins +The following endpoints are available to plugins. === change-view-integration -Extension point is located between `Files` and `Messages` section on the change -view page, and it may take full page's width. Primary purpose is to enable -plugins to display custom CI related information (build status, etc). +This extension point is located between `Files` and `Messages` section on the +change view page, and it may take full page's width. Primary purpose is to +enable plugins to display custom CI-related information (build status, etc). * `change` + @@ -51,10 +51,10 @@ current revision displayed, an instance of link:rest-api-changes.html#revision-info[RevisionInfo] === change-metadata-item -Extension point is located on the bottom of the change view left panel, under -`Label Status` and `Links` sections. It's width is equal to the left panel's and -primary purpose is to enable plugins to add sections of metadata to the left -panel. +The change-metadata-item extension point is located on the bottom of the change +view left panel, under the `Label Status` and `Links` sections. Its width is +equal to the left panel's, and its primary purpose is to allow plugins to add +sections of metadata to the left panel. In addition to default parameters, the following are available: diff --git a/Documentation/pg-plugin-styling.txt b/Documentation/pg-plugin-styling.txt index 58b6d7a4ae..301da51c13 100644 --- a/Documentation/pg-plugin-styling.txt +++ b/Documentation/pg-plugin-styling.txt @@ -10,16 +10,16 @@ PolyGerrit UI implements number of styling endpoints, which apply CSS mixins link:https://tabatkins.github.io/specs/css-apply-rule/[using @apply] to its direct contents. -NOTE: Only items (ie CSS properties and mixin targets) documented here are +NOTE: Only items (i.e. CSS properties and mixin targets) documented here are guaranteed to work in the long term, since they are covered by integration tests. + When there is a need to add new property or endpoint, please link:https://bugs.chromium.org/p/gerrit/issues/entry?template=PolyGerrit%20Issue[file -a bug] stating your usecase to track and maintain for future releases. +a bug] stating your use case to track and maintain for future releases. -Plugin should be html-based and imported following PolyGerrit's +Plugins should be html-based and imported following PolyGerrit's link:pg-plugin-dev.html#loading[dev guide]. -Plugin should provide Style Module, for example: +Plugins should provide Style Module, for example: ``` html @@ -33,7 +33,7 @@ Plugin should provide Style Module, for example: ``` -Plugin should register style module with a styling endpoint using +Plugins should register style module with a styling endpoint using `Plugin.prototype.registerStyleModule(endpointName, styleModuleName)`, for example: @@ -45,7 +45,7 @@ example: == Available styling endpoints === change-metadata -Following custom css mixins are recognized: +Following custom CSS mixins are recognized: * `--change-metadata-assignee` +