Merge "Show hovercard with a delay of 500 ms"
diff --git a/polygerrit-ui/README.md b/polygerrit-ui/README.md
index 07eba02..de25d79 100644
--- a/polygerrit-ui/README.md
+++ b/polygerrit-ui/README.md
@@ -2,7 +2,13 @@
 
 Follow the
 [setup instructions for Gerrit backend developers](https://gerrit-review.googlesource.com/Documentation/dev-readme.html)
-where applicable.
+where applicable, the most important command is:
+
+```
+git clone --recurse-submodules https://gerrit.googlesource.com/gerrit
+```
+
+The --recurse-submodules option is needed on git clone to ensure that the core plugins, which are included as git submodules, are also cloned.
 
 ## Installing [Bazel](https://bazel.build/)
 
@@ -46,17 +52,16 @@
 
 or use [nvm - Node Version Manager](https://github.com/nvm-sh/nvm).
 
-Various steps below require installing additional npm packages. To start developing, it is enough
-to install only top-level packages with the following command: 
+### Additional packages
+
+We have several bazel commands to install packages we may need for FE development.
+
+For first time users to get the local server up, `npm start` should be enough and will take care of all of them for you.
 
 ```sh
 # Install packages from root-level packages.json
 bazel fetch @npm//:node_modules
-```
 
-All other packages are installed by bazel when needed. If you want to install them manually, run the
-following commands:
-```sh
 # Install packages from polygerrit-ui/app/packages.json
 bazel fetch @ui_npm//:node_modules
 
@@ -92,6 +97,8 @@
 ./polygerrit-ui/run-server.sh --plugins=plugins/my_plugin/static/my_plugin.js,plugins/my_plugin/static/my_plugin.html
 ```
 
+If any issues occured, please refer to the Troubleshooting section at the bottom or contact the team!
+
 ## Running locally against production data
 
 ### Local website
@@ -275,3 +282,21 @@
 If you are willing to join the queue and help the community review changes,
 you can create an issue through Monorail and request to join the queue!
 We will review your request and start from there.
+
+## Troubleshotting & Frequently asked questions
+
+1. Local host is blank page and console shows missing files from `polymer-bridges`
+
+Its likely you missed the `polymer-bridges` submodule when you clone the `gerrit` repo.
+
+To fix that, run:
+```
+// fetch the submodule
+git submodule update --init --recursive
+
+// reset the workspace (please save your local changes before running this command)
+npm run clean
+
+// install all dependencies and start the server
+npm start
+```
\ No newline at end of file
diff --git a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.js b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.js
index 6f1eaa8..252f409 100644
--- a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.js
+++ b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.js
@@ -60,11 +60,12 @@
  * All candidates tips to show, will pick randomly.
  */
 const RESPECTFUL_REVIEW_TIPS= [
-  'DO: Assume competence.',
-  'DO: Provide rationale or context.',
-  'DO: Consider how comments may be interpreted.',
-  'DON’T: Criticize the person.',
-  'DON’T: Use harsh language.',
+  'Assume competence.',
+  'Provide rationale or context.',
+  'Consider how comments may be interpreted.',
+  'Avoid harsh language.',
+  'Make your comments specific and actionable.',
+  'When disagreeing, explain the advantage of your approach.',
 ];
 
 /**
@@ -294,8 +295,8 @@
         'respectful-tip-dismissed',
         {tip: this._respectfulReviewTip}
     );
-    // add a 3 day delay to the tip cache
-    this.$.storage.setRespectfulTipVisibility(/* delayDays= */ 3);
+    // add a 14-day delay to the tip cache
+    this.$.storage.setRespectfulTipVisibility(/* delayDays= */ 14);
   }
 
   _onRespectfulReadMoreClick() {
diff --git a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment_html.js b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment_html.js
index 4a0f388..6c9ebee 100644
--- a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment_html.js
@@ -282,7 +282,7 @@
                 <a tabindex="-1" on-click="_onRespectfulReadMoreClick" href="https://testing.googleblog.com/2019/11/code-health-respectful-reviews-useful.html" target="_blank">
                   Read more
                 </a>
-                <iron-icon class="close pointer" on-click="_dismissRespectfulTip" icon="gr-icons:close"></iron-icon>
+                <a tabindex="-1" class="close pointer" on-click="_dismissRespectfulTip">Not helpful</a>
               </div>
             </div>
           </template>
diff --git a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment_test.html b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment_test.html
index 756e6fd..33f19c5 100644
--- a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment_test.html
+++ b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment_test.html
@@ -1161,7 +1161,7 @@
       });
     });
 
-    test('add 3 day delays once dismissed', done => {
+    test('add 14-day delays once dismissed', done => {
       // fake stub for storage
       const respectfulGetStub = sinon.stub();
       const respectfulSetStub = sinon.stub();
@@ -1185,7 +1185,7 @@
         MockInteractions.tap(element.shadowRoot
             .querySelector('.respectfulReviewTip .close'));
         flushAsynchronousOperations();
-        assert.isTrue(respectfulSetStub.lastCall.args[0] === 3);
+        assert.isTrue(respectfulSetStub.lastCall.args[0] === 14);
         done();
       });
     });
diff --git a/polygerrit-ui/app/elements/shared/gr-hovercard-account/gr-hovercard-account_test.html b/polygerrit-ui/app/elements/shared/gr-hovercard-account/gr-hovercard-account_test.html
index 7a5f4c6..be0f2b2 100644
--- a/polygerrit-ui/app/elements/shared/gr-hovercard-account/gr-hovercard-account_test.html
+++ b/polygerrit-ui/app/elements/shared/gr-hovercard-account/gr-hovercard-account_test.html
@@ -24,20 +24,8 @@
 
 <script src="/node_modules/@webcomponents/webcomponentsjs/webcomponents-lite.js"></script>
 <script src="/components/wct-browser-legacy/browser.js"></script>
-<script type="module" src="../../../test/test-pre-setup.js"></script>
-<script type="module" src="../../../test/common-test-setup.js"></script>
 <script src="../../../node_modules/iron-test-helpers/mock-interactions.js" type="module"></script>
 
-<script type="module" src="./gr-hovercard-account.js"></script>
-
-<script type="module">
-  import '../../../test/test-pre-setup.js';
-  import '../../../test/common-test-setup.js';
-  import './gr-hovercard-account.js';
-
-  void (0);
-</script>
-
 <test-fixture id="basic">
   <template>
     <gr-hovercard-account class="hovered"></gr-hovercard-account>
@@ -46,7 +34,6 @@
 
 
 <script type="module">
-  import '../../../test/test-pre-setup.js';
   import '../../../test/common-test-setup.js';
   import './gr-hovercard-account.js';
 
diff --git a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/mock-diff-response_test.html b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/mock-diff-response_test.html
index df3b9a5..015d71e 100644
--- a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/mock-diff-response_test.html
+++ b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/mock-diff-response_test.html
@@ -16,7 +16,6 @@
 -->
 
 <link rel="import" href="/bower_components/polymer/polymer.html">
-<script src="../../../test/test-pre-setup.js"></script>
 <link rel="import" href="../../../test/common-test-setup.html"/>
 <dom-module id="mock-diff-response">
   <template></template>
diff --git a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/mock-diff-response_test.js b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/mock-diff-response_test.js
index e29d300..e7bc662 100644
--- a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/mock-diff-response_test.js
+++ b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/mock-diff-response_test.js
@@ -16,7 +16,6 @@
  */
 import '../../../scripts/bundled-polymer.js';
 
-import '../../../test/test-pre-setup.js';
 import '../../../test/common-test-setup.js';
 import {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';
 import {html} from '@polymer/polymer/lib/utils/html-tag.js';
diff --git a/polygerrit-ui/app/elements/shared/gr-storage/gr-storage.js b/polygerrit-ui/app/elements/shared/gr-storage/gr-storage.js
index 1597439..8f5c486 100644
--- a/polygerrit-ui/app/elements/shared/gr-storage/gr-storage.js
+++ b/polygerrit-ui/app/elements/shared/gr-storage/gr-storage.js
@@ -26,8 +26,8 @@
 const CLEANUP_THROTTLE_INTERVAL = DURATION_DAY;
 
 const CLEANUP_PREFIXES_MAX_AGE_MAP = {
-  // respectfultip has a 3 day expiration
-  'respectfultip:': 3 * DURATION_DAY,
+  // respectfultip has a 14-day expiration
+  'respectfultip:': 14 * DURATION_DAY,
   'draft:': DURATION_DAY,
   'editablecontent:': DURATION_DAY,
 };