From c93835eb0cb68ae0a96f78d65af3aaa651d1b0cb Mon Sep 17 00:00:00 2001 From: Sheetal Umesh Kumar Date: Wed, 25 Jan 2017 14:59:46 -0500 Subject: [PATCH] Show annotation count on the page, so that users don't have to open to sidebar to know how many annotations are in the page. Fixes: https://github.com/hypothesis/product-backlog/issues/129 --- scripts/gulp/live-reload-server.js | 6 +- src/annotator/annotation-counts.js | 26 ++++++++ src/annotator/sidebar.coffee | 6 +- src/annotator/test/annotation-counts-test.js | 67 ++++++++++++++++++++ src/shared/bridge-events.js | 10 +++ src/sidebar/annotation-metadata.js | 19 ++++++ src/sidebar/frame-sync.js | 12 ++++ src/sidebar/test/annotation-fixtures.js | 20 ++++++ src/sidebar/test/annotation-metadata-test.js | 22 +++++++ src/sidebar/test/frame-sync-test.js | 7 ++ 10 files changed, 193 insertions(+), 2 deletions(-) create mode 100644 src/annotator/annotation-counts.js create mode 100644 src/annotator/test/annotation-counts-test.js create mode 100644 src/shared/bridge-events.js diff --git a/scripts/gulp/live-reload-server.js b/scripts/gulp/live-reload-server.js index 7ae6c0a4264..03e41923ab2 100644 --- a/scripts/gulp/live-reload-server.js +++ b/scripts/gulp/live-reload-server.js @@ -36,7 +36,11 @@ function LiveReloadServer(port, appServer) { Hypothesis Client Test -
${changelogText()}
+
+ Number of annotations: + ... +
+
${changelogText()}