commit | c5bda5b6b5fe91a2f7cd40c5a917dd2280b04814 | [log] [tgz] |
---|---|---|
author | Edwin Kempin <ekempin@google.com> | Fri Aug 13 15:17:49 2021 +0200 |
committer | Edwin Kempin <ekempin@google.com> | Fri Aug 13 15:17:49 2021 +0200 |
tree | ebb19452032e63054dbaaa315bfaa49c788099df | |
parent | 6a27089c51237743a8e7cae03837f921b0028b3b [diff] | |
parent | aa2edb431337cc935659ab69d95ca7555cbc787e [diff] |
Merge branch 'stable-3.4' * stable-3.4: Stop propagation for all keys but exempt the save button Stop propagation for all keys but exempt the save button Change-Id: Ia8d0a88db7d8d438e2f744f4433f566714d01fcb
A plugin that uses CodeMirror to provide a rich code editing experience in PolyGerrit.
This plugin is rewritten into Polymer 3 syntax. The gr-editor.js
is the main entry for the plugin.
But to support the lazy load on the codemirror
with supported languages, we still have the codemirror-element.html
as an asset which still built separately as an html.
We may consider drop the selectively language support and in favor of all-in-one bundle in the future or change build rule to support bundle css
in js
to move off of the html completely.
To run UI tests here will need install dependencies from both npm and bower.
npm run wct-test
should take care both for you, read more in package.json
.
You will need polymer-bridges
which is a submodule you can clone from: https://gerrit-review.googlesource.com/admin/repos/polymer-bridges
As polymer 3 no longer support Polymer.importHref
anymore, this plugin still supports it through a custom implementation in gr-editor.js
.
bazel build :codemirror_editor
gerrit/plugins/codemirror-editor/
folder and it will automatically served at http://localhost:8081/plugins_/codemirror-editor/
If your plugin is already enabled, then you can block it and then inject the compiled local verison.
See more about how to use dev helper extension to help you test here: https://gerrit.googlesource.com/gerrit-fe-dev-helper/+/master