Hey,
PolyGerrit allows to hook into it’s UI via plugins. Plugins can be simple .html files. We’re using such a plugin to swap in our logo (I attached it for your reference).
Also see: https://gerrit-review.googlesource.com/Documentation/pg-plugin-dev.html
Cheers,
Markus
--
--
To unsubscribe, email
repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hey,
PolyGerrit allows to hook into it’s UI via plugins. Plugins can be simple .html files. We’re using such a plugin to swap in our logo (I attached it for your reference).
Also see: https://gerrit-review.googlesource.com/Documentation/pg-plugin-dev.html
Cheers,
Markus
From: repo-d...@googlegroups.com [mailto:repo-d...@googlegroups.com] On Behalf Of Peter Bruin
Sent: Friday, March 9, 2018 6:48 AM
To: Repo and Gerrit Discussion <repo-d...@googlegroups.com>
Subject: Customize PolyGerrit
Hi all,
I am wondering if it is possible to add headers, footers or css to the PolyGerrit UI?
So far it looks like the GerritSiteHeader.html and GerritSite.css are not included, is this correct?
Is there another way to add custome content (logo) to the site?
Thanks,
Peter Bruin
--
--
To unsubscribe, email repo-discus...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hey,
PolyGerrit allows to hook into it’s UI via plugins. Plugins can be simple .html files. We’re using such a plugin to swap in our logo (I attached it for your reference).
Also see: https://gerrit-review.googlesource.com/Documentation/pg-plugin-dev.html
Cheers,
Markus
From: repo-d...@googlegroups.com [mailto:repo-d...@googlegroups.com] On Behalf Of Peter Bruin
Sent: Friday, March 9, 2018 6:48 AM
To: Repo and Gerrit Discussion <repo-d...@googlegroups.com>
Subject: Customize PolyGerrit
Hi all,
I am wondering if it is possible to add headers, footers or css to the PolyGerrit UI?
So far it looks like the GerritSiteHeader.html and GerritSite.css are not included, is this correct?
Is there another way to add custome content (logo) to the site?
Thanks,
Peter Bruin
--
--
To unsubscribe, email repo-discus...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Friday, March 9, 2018 at 2:28:08 PM UTC+8, Markus Duft wrote:Hey,
PolyGerrit allows to hook into it’s UI via plugins. Plugins can be simple .html files. We’re using such a plugin to swap in our logo (I attached it for your reference).
Also see: https://gerrit-review.googlesource.com/Documentation/pg-plugin-dev.html
thanks for the information, we can change the site logo now, can you explain more about how to change the color of header bar?
To unsubscribe, email repo-discuss...@googlegroups.com
Sent from my iPhone
On Friday, March 9, 2018 at 2:28:08 PM UTC+8, Markus Duft wrote:Hey,
PolyGerrit allows to hook into it’s UI via plugins. Plugins can be simple .html files. We’re using such a plugin to swap in our logo (I attached it for your reference).
Also see: https://gerrit-review.googlesource.com/Documentation/pg-plugin-dev.html
thanks for the information, we can change the site logo now, can you explain more about how to change the color of header bar?I’ve uploaded an example based on GerritHub:
On Saturday, January 5, 2019 at 6:55:24 PM UTC+8, lucamilanesio wrote:Sent from my iPhone
On Friday, March 9, 2018 at 2:28:08 PM UTC+8, Markus Duft wrote:Hey,
PolyGerrit allows to hook into it’s UI via plugins. Plugins can be simple .html files. We’re using such a plugin to swap in our logo (I attached it for your reference).
Also see: https://gerrit-review.googlesource.com/Documentation/pg-plugin-dev.html
thanks for the information, we can change the site logo now, can you explain more about how to change the color of header bar?I’ve uploaded an example based on GerritHub:Great.
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/8f4aa00b-888e-4e89-b3eb-1519ff2ec0c7%40googlegroups.com.
<!--
Copyright (C) 2019 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<dom-module id="gerrit-styles">
<script>
Gerrit.install((plugin) => {
if (!window.localStorage.getItem('dark-theme')) {
plugin.registerStyleModule('app-theme', 'gerrit-style');
}
plugin.registerCustomComponent(
'header-title', 'gerrit-custom-header', {replace: true});
});
</script>
</dom-module>
<dom-module id="gerrit-style">
<template>
<style>
html {
--header-background: rgb(59,120,231);
--header-text-color: rgb(255,255,255);
--border-width: 0 0 3px 0;
--border-style: solid;
--default-horizontal-margin: 0.5em 0.5em 0.5em;
}
</style>
</template>
</dom-module>
<dom-module id="gerrit-custom-header">
<template>
<style>
.gerritHeader::before {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAtCAYAAADoSujCAAAABGdBTUEAALGPC/xhBQAACkFpQ0NQSUNDIFByb2ZpbGUAAEgNnZZ3VFPZFofPvTe90BIiICX0GnoJINI7SBUEUYlJgFAChoQmdkQFRhQRKVZkVMABR4ciY0UUC4OCYtcJ8hBQxsFRREXl3YxrCe+tNfPemv3HWd/Z57fX2Wfvfde6AFD8ggTCdFgBgDShWBTu68FcEhPLxPcCGBABDlgBwOFmZgRH+EQC1Py9PZmZqEjGs/buLoBku9ssv1Amc9b/f5EiN0MkBgAKRdU2PH4mF+UClFOzxRky/wTK9JUpMoYxMhahCaKsIuPEr2z2p+Yru8mYlybkoRpZzhm8NJ6Mu1DemiXho4wEoVyYJeBno3wHZb1USZoA5fco09P4nEwAMBSZX8znJqFsiTJF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Idj/mPyr2y/MBKfdQWDt4TJXqbdu0sewF/69ckkNLKY5Q2ofbXP6w33dB1OgMBrty2XVUUtyVRuvN9HTy/3vSdua3rXbr7H0SXfo3+OPT1AAAAAElFTkSuQmCC');
background-size: 1.3em 1.3em;
background-repeat: no-repeat;
content: "";
display: inline-block;
height: 1.1em;
margin-right: calc(1em / 2);
margin-left: calc(1em / 3);
margin-bottom: calc(1em / 7);
vertical-align: middle;
width: 1.1em;
}
.gerritHeader::after {
content: 'Gerrit';
}
</style>
<span class="gerritHeader"></span>
</template>
<script>
(function() {
'use strict';
Polymer({
is: 'gerrit-custom-header',
});
})();
</script>
</dom-module>
On 22 Oct 2019, at 10:30, Makson Lee <cdle...@gmail.com> wrote:On Saturday, January 5, 2019 at 7:43:36 PM UTC+8, Makson Lee wrote:
On Saturday, January 5, 2019 at 6:55:24 PM UTC+8, lucamilanesio wrote:Sent from my iPhone
On Friday, March 9, 2018 at 2:28:08 PM UTC+8, Markus Duft wrote:Hey,
PolyGerrit allows to hook into it’s UI via plugins. Plugins can be simple .html files. We’re using such a plugin to swap in our logo (I attached it for your reference).
Also see: https://gerrit-review.googlesource.com/Documentation/pg-plugin-dev.html
thanks for the information, we can change the site logo now, can you explain more about how to change the color of header bar?I’ve uploaded an example based on GerritHub:Great.The example is not working after upgraded Gerrit from 3.0.3 to 3.1.0-rc0.Yes, I know.Gerrit v3.1.x uses Polymer2 with Shadow-DOM, which encapsulates CSS properties in the component and thus doesn't allow anymore overriding at global level.I believe Paladox had a workaround, correct?Luca.
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-d...@googlegroups.com.
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/3dc056a4-f20a-4ae1-87b6-de00013fbcab%40googlegroups.com.
Luca
To unsubscribe, email repo-discuss+unsub...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/3dc056a4-f20a-4ae1-87b6-de00013fbcab%40googlegroups.com.
On 22 Oct 2019, at 22:20, 'Paladox none' via Repo and Gerrit Discussion <repo-d...@googlegroups.com> wrote:Yup! (should work from the latest 2.16/3.0 releases). It won't work on gerrit 2.15 though.
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/34ca5573-c183-4543-94c9-aaaebe9f0dbf%40googlegroups.com.
I assume this method of styling can also be applied to change-metadata-item elements? I had a plugin running on Gerrit 3.0.X which was using traditional css style overrides, and for the life of me I can’t get it to work by moving the CSS to a dom-module and sourcing it in via
plugin.registerStyleModule('app-theme', <dom-module id>);
The documentation on polygerrit plugins seems outdated, but I’ve tried a host of different things like changing the endpoint in ‘plugin.registerStyleModule’ to ‘change-metadata’ as well as lots of other tinkering, but the styles I’ve set in the dom-module never seem to show up.
Example code (stripped of all the fun stuff)
<dom-module id="test-style">
<template>
<style>
.open {color: white;
background-color: #2b6dd8;
font-size: 13px;
border-radius: 3px;
text-align: center;
float: left;
margin: 15px;
padding-top: 5px;
padding-bottom: 5px;
padding-left: 8px;
padding-right: 8px;
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.3);
}
.open:hover,
.open:focus {background-color: #2a5db0;
cursor: pointer;
text-decoration: none;
}
</style>
</template>
</dom-module>
<dom-module id="test">
<script>
Gerrit.install(plugin => {
function test(change, revision) {
plugin.hook('change-metadata-item').onAttached(el => {
const openButton = el.appendChild(document.createElement('div'));
openButton.innerHTML = 'Test';
openButton.classList.add("open");
openButton.id = "openButton";
});
}
plugin.registerStyleModule('app-theme', 'test-style');
plugin.on('showchange', test);
});
</script>
</dom-module>
Thanks,
Luke
From: 'Paladox none' via Repo and Gerrit Discussion [mailto:repo-d...@googlegroups.com]
Sent: Tuesday, October 22, 2019 2:18 PM
To: Repo and Gerrit Discussion <repo-d...@googlegroups.com>
Subject: Re: Customize PolyGerrit
--
--
To unsubscribe, email
repo-discuss...@googlegroups.com
More info at
http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
repo-discuss...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/repo-discuss/3dc056a4-f20a-4ae1-87b6-de00013fbcab%40googlegroups.com.
<dom-module id="test-component">
<template>
<style>
.open {color: white;
background-color: #2b6dd8;
font-size: 13px;
border-radius: 3px;
text-align: center;
float: left;
margin: 15px;
padding-top: 5px;
padding-bottom: 5px;
padding-left: 8px;
padding-right: 8px;
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.3);
}
.open:hover,
.open:focus {background-color: #2a5db0;
cursor: pointer;
text-decoration: none;
}
</style>
<div class="open">Test</div>
</template>
<script>
Polymer({
is: "test-component"
});
</script>
</dom-module>
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/DF4PR8401MB1196111AB453DA6A77E7C38C94F70%40DF4PR8401MB1196.NAMPRD84.PROD.OUTLOOK.COM.
2. to change style on global level, like the font-size, font color etc:Due to the shadow DOM we are using css variables to control most of our styles across the pages. And for those controlled by css variables, you can override by changing the variable in your customized app-theme module. Similar to how you register with `app-theme` before, you just need to have those variables overridden:```html {--header-background-color: #0068a2;--header-text-color: #ffffff;}```see all variables available to you from 3.0: https://gerrit.googlesource.com/gerrit/+/refs/heads/stable-3.0/polygerrit-ui/app/styles/themes/app-theme.htmlHope that can help you a bit :)
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/CAEmTNiXNb_vXS50ZDf7MCrQe6b2ZEoZ2eGTqWPw88e%3DQfVys%2BQ%40mail.gmail.com.
I’ve never really used Polymer, nor am I a web developer so I’m likely doing things wrong here, but it still doesn’t seem to be taking the style:

It would help a ton to see some working examples doing something similar – everything I’ve found in documentation doesn’t seem to work (or I’m just not extending things properly, which is more likely J).
<dom-module id="test-style">
<template>
<style>
.open {color: white;
background-color: #2b6dd8;
font-size: 13px;
border-radius: 3px;
text-align: center;
float: left;
margin: 15px;
padding-top: 5px;
padding-bottom: 5px;
padding-left: 8px;
padding-right: 8px;
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.3);
}
.open:hover,
.open:focus {background-color: #2a5db0;
cursor: pointer;
text-decoration: none;
}
</style>
<div class="open">TEST</div>
</template>
<script>
Polymer({
is: "test-style"
});
</script>
</dom-module>
<dom-module id="test">
<script>
Gerrit.install(plugin => {
function test(change, revision) {
const dom = plugin.hook('change-metadata-item', 'test-style');
dom.onAttached(el => {
const openButton = el.appendChild(document.createElement('div'));
openButton.innerHTML = 'TEST';
openButton.classList.add("open");
});
}
plugin.on('showchange', test);
});
</script>
</dom-module>
Thank you for the help!
Luke
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/CAEmTNiXNb_vXS50ZDf7MCrQe6b2ZEoZ2eGTqWPw88e%3DQfVys%2BQ%40mail.gmail.com.