From bc90b0bc43fc37be9d26cc755130fd429859dab7 Mon Sep 17 00:00:00 2001 From: howard-stearns Date: Mon, 22 Aug 2016 16:09:09 -0700 Subject: [PATCH] pr review --- interface/resources/qml/AddressBarDialog.qml | 12 ++++++------ interface/resources/qml/hifi/Card.qml | 6 +++++- scripts/system/html/css/SnapshotReview.css | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/interface/resources/qml/AddressBarDialog.qml b/interface/resources/qml/AddressBarDialog.qml index 7be7c2c83b..f2bdc5ba6d 100644 --- a/interface/resources/qml/AddressBarDialog.qml +++ b/interface/resources/qml/AddressBarDialog.qml @@ -273,9 +273,9 @@ Window { function asyncMap(array, iterator, cb) { // call iterator(element, icb) once for each element of array, and then cb(error, mappedResult) // when icb(error, mappedElement) has been called by each iterator. - // Calls to iterator are overlapped and map call icb in any order, but the mappedResults are collected in the same + // Calls to iterator are overlapped and may call icb in any order, but the mappedResults are collected in the same // order as the elements of the array. - // short-circuits if error. Note that iterator MUST be an asynchronous function. (Use setTimeout if necessary.) + // Short-circuits if error. Note that iterator MUST be an asynchronous function. (Use setTimeout if necessary.) var count = array.length, results = []; if (!count) { return cb(null, results); @@ -287,7 +287,7 @@ Window { iterator(element, function (error, mapped) { results[index] = mapped; if (error || !--count) { - count = 1; // don't cb multiple times if error + count = 0; // don't cb multiple times if error cb(error, results); } }); @@ -397,9 +397,9 @@ Window { // only appending the collected results. var params = [ 'open', // published hours handle now - // FIXME: should determine if place is actually running - 'restriction=open', // Not by whitelist, etc. FIXME: If logged in, add hifi to the restriction options, in order to include places that require login. - // FIXME add maturity + // TBD: should determine if place is actually running? + 'restriction=open', // Not by whitelist, etc. TBD: If logged in, add hifi to the restriction options, in order to include places that require login? + // TBD: add maturity? 'protocol=' + encodeURIComponent(AddressManager.protocolVersion()), 'sort_by=users', 'sort_order=desc', diff --git a/interface/resources/qml/hifi/Card.qml b/interface/resources/qml/hifi/Card.qml index fe162349c1..53829eed9e 100644 --- a/interface/resources/qml/hifi/Card.qml +++ b/interface/resources/qml/hifi/Card.qml @@ -37,6 +37,7 @@ Rectangle { property int textSizeSmall: 18; property string defaultThumbnail: Qt.resolvedUrl("../../images/default-domain.gif"); HifiConstants { id: hifi } + function pastTime(timestamp) { // Answer a descriptive string timestamp = new Date(timestamp); var then = timestamp.getTime(), @@ -77,7 +78,7 @@ Rectangle { anchors.left: parent.left; onStatusChanged: { if (status == Image.Error) { - console.log("source: " + source + ": failed to load " + hfiUrl); + console.log("source: " + source + ": failed to load " + hifiUrl); source = defaultThumbnail; } } @@ -129,6 +130,9 @@ Rectangle { margins: textPadding; } } + // These two can be supplied to provide hover behavior. + // For example, AddressBarDialog provides functions that set the current list view item + // to that which is being hovered over. property var hoverThunk: function () { }; property var unhoverThunk: function () { }; MouseArea { diff --git a/scripts/system/html/css/SnapshotReview.css b/scripts/system/html/css/SnapshotReview.css index 4faa17e7a3..c2965f92e1 100644 --- a/scripts/system/html/css/SnapshotReview.css +++ b/scripts/system/html/css/SnapshotReview.css @@ -1,5 +1,5 @@ /* -// edit-style.css +// SnapshotReview.css // // Created by Howard Stearns for David Rowe 8/22/2016. // Copyright 2016 High Fidelity, Inc.