blob: 45c6e726760a0bc3564bf4df8209f49e1e742a87 [file] [log] [blame]
= Gerrit Code Review - PolyGerrit Plugin Styling
== Plugin endpoints
Plugin should be html-based and imported following PolyGerrit's
link:pg-plugin-dev.html#loading[dev guide].
Sample code for testing endpoints:
``` js
Gerrit.install(plugin => {
// Change endpoint below
const endpoint = 'change-metadata-item';
plugin.hook(endpoint).onAttached(element => {
console.log(endpoint, element);
const el = element.appendChild(document.createElement('div'));
el.textContent = 'Ah, there it is. Lovely.';
el.style = 'background: pink; line-height: 4em; text-align: center;';
});
});
```
=== 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).
=== 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.