Proofreading PolyGerrit plugin dev docs

Change-Id: I9c971b607c2a5cdbcbb44b7837534743e6662ed1
This commit is contained in:
Quinten Yearsley
2017-12-05 11:11:09 -08:00
parent b5688c67ba
commit 888e638eee
3 changed files with 23 additions and 23 deletions

View File

@@ -21,7 +21,7 @@ spec.
located in `gerrit-site/plugins` folder, where `pluginname` is an alphanumeric located in `gerrit-site/plugins` folder, where `pluginname` is an alphanumeric
plugin name. 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`: 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-api-concepts]]
== High-level DOM 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. 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 The common way to access high-level API is through `plugin` instance passed
setup callback parameter of `Gerrit.install()`, also sometimes referred as into setup callback parameter of `Gerrit.install()`, also sometimes referred to
`self`. as `self`.
[[low-level-api]] [[low-level-api]]
== Low-level DOM 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 === attributeHelper
`plugin.attributeHelper(element)` `plugin.attributeHelper(element)`

View File

@@ -1,6 +1,6 @@
= Gerrit Code Review - PolyGerrit Plugin Styling = 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]. link:pg-plugin-dev.html#loading[dev guide].
Sample code for testing endpoints: Sample code for testing endpoints:
@@ -19,8 +19,8 @@ Gerrit.install(plugin => {
``` ```
== Default parameters == Default parameters
All endpoints receive the following params, set as attributes to custom components All endpoints receive the following parameters, set as attributes to custom
that are instantiated at the endpoint: components that are instantiated at the endpoint:
* `plugin` * `plugin`
+ +
@@ -33,12 +33,12 @@ components.
== Plugin endpoints == Plugin endpoints
Following endpoints are available to plugins The following endpoints are available to plugins.
=== change-view-integration === change-view-integration
Extension point is located between `Files` and `Messages` section on the change This extension point is located between `Files` and `Messages` section on the
view page, and it may take full page's width. Primary purpose is to enable change view page, and it may take full page's width. Primary purpose is to
plugins to display custom CI related information (build status, etc). enable plugins to display custom CI-related information (build status, etc).
* `change` * `change`
+ +
@@ -51,10 +51,10 @@ current revision displayed, an instance of
link:rest-api-changes.html#revision-info[RevisionInfo] link:rest-api-changes.html#revision-info[RevisionInfo]
=== change-metadata-item === change-metadata-item
Extension point is located on the bottom of the change view left panel, under The change-metadata-item extension point is located on the bottom of the change
`Label Status` and `Links` sections. It's width is equal to the left panel's and view left panel, under the `Label Status` and `Links` sections. Its width is
primary purpose is to enable plugins to add sections of metadata to the left equal to the left panel's, and its primary purpose is to allow plugins to add
panel. sections of metadata to the left panel.
In addition to default parameters, the following are available: In addition to default parameters, the following are available:

View File

@@ -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 link:https://tabatkins.github.io/specs/css-apply-rule/[using @apply] to its
direct contents. 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 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 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 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]. link:pg-plugin-dev.html#loading[dev guide].
Plugin should provide Style Module, for example: Plugins should provide Style Module, for example:
``` html ``` html
<dom-module id="some-style"> <dom-module id="some-style">
@@ -33,7 +33,7 @@ Plugin should provide Style Module, for example:
</dom-module> </dom-module>
``` ```
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 `Plugin.prototype.registerStyleModule(endpointName, styleModuleName)`, for
example: example:
@@ -45,7 +45,7 @@ example:
== Available styling endpoints == Available styling endpoints
=== change-metadata === change-metadata
Following custom css mixins are recognized: Following custom CSS mixins are recognized:
* `--change-metadata-assignee` * `--change-metadata-assignee`
+ +