GitHub PullRequestReviewCommentEvent at 2014-01-26 08:30:06
Repository: spark
Actor: ussuri
Payload: {"comment":{"url":"https://api.github.com/repos/dart-lang/spark/pulls/comments/9174875","id":9174875,"diff_hunk":"@@ -0,0 +1,70 @@\n+<!DOCTYPE html>\n+\n+<!-- Copyright (c) 2014, Google Inc. Please see the AUTHORS file for details.\n+     All rights reserved. Use of this source code is governed by a BSD-style\n+     license that can be found in the LICENSE file. -->\n+\n+<!--\n+/**\n+ * spark-suggest-box displays suggestions based on text entered by a user and\n+ * allows the user select one using either mouse or keyboard (using the arrow\n+ * keys and the \"enter\" key).\n+ *\n+ * The suggestions themselves are supplied by a [SuggestOracle] passed via the\n+ * [oracle] attribute. Placehoder text can be provided via the [placeholder]\n+ * attribute.\n+ *\n+ * Example:\n+ *   <spark-suggest-box oracle=\"{{colorOracle}}\" placeholder=\"Pick a color...\">\n+ *   </spark-suggest-box>\n+ */\n+-->\n+\n+<link rel=\"import\" href=\"../../../packages/spark_widgets/common/spark_widget.html\"/>\n+\n+<polymer-element name=\"spark-suggest-box\" extends=\"spark-widget\"\n+    attributes=\"oracle placeholder\">\n+  <template>\n+    <style>\n+      @import url(\"packages/spark_widgets/spark_suggest/spark_suggest_box.css\");\n+    </style>\n+\n+    <input\n+        id=\"text-box\"\n+        type=\"search\"\n+        on-keyup=\"{{inputKeyUp}}\"\n+        focused\n+        placeholder=\"{{placeholder}}\" />\n+\n+    <spark-overlay\n+        id=\"suggestion-list-overlay\"\n+        opened=\"{{suggestionsOpened}}\"\n+        class=\"spark-overlay-scale-slideup\">\n+      <div class=\"suggest-item-list\">\n+        <template if=\"{{isLoading}}\">\n+          <!-- TODO(yjbanov): The indicator should be a component -->\n+          <div id=\"loading-indicator\">\n+            <div id=\"r0\">\n+              <div id=\"r1\"></div><div id=\"r2\"></div>\n+              <div id=\"r3\"></div><div id=\"r4\"></div>\n+              <div id=\"r5\"></div><div id=\"r6\"></div>\n+              <div id=\"r7\"></div><div id=\"r8\"></div>\n+            </div>\n+          </div>\n+        </template>\n+        <template repeat=\"{{s in suggestions | enumerate}}\">\n+          <div\n+              id=\"suggest-item-{{s.index}}\"","path":"widgets/lib/spark_suggest/spark_suggest_box.html","position":57,"original_position":57,"commit_id":"e0c96d6c8c11ea2165d21b53084bcdf1584d4687","original_commit_id":"e0c96d6c8c11ea2165d21b53084bcdf1584d4687","user":{"login":"ussuri","id":5606182,"avatar_url":"https://gravatar.com/avatar/1516d304ef0f0f973d6ee56d3377a0ce?d=https%3A%2F%2Fidenticons.github.com%2Fa814f7afb37b14149f0d1ce4857fbecb.png&r=x","gravatar_id":"1516d304ef0f0f973d6ee56d3377a0ce","url":"https://api.github.com/users/ussuri","html_url":"https://github.com/ussuri","followers_url":"https://api.github.com/users/ussuri/followers","following_url":"https://api.github.com/users/ussuri/following{/other_user}","gists_url":"https://api.github.com/users/ussuri/gists{/gist_id}","starred_url":"https://api.github.com/users/ussuri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ussuri/subscriptions","organizations_url":"https://api.github.com/users/ussuri/orgs","repos_url":"https://api.github.com/users/ussuri/repos","events_url":"https://api.github.com/users/ussuri/events{/privacy}","received_events_url":"https://api.github.com/users/ussuri/received_events","type":"User","site_admin":false},"body":"I'm not sure what's the value of setting `id` for these elements and then parsing it to extract the index; I think you could just as well set `index=\"{{s.index}}\"` attribute. But it's a minor, feel free to leave as is.\r\n\r\nAlso, we might be able to reuse spark-selection for this whole thing, but I haven't taken a good look. Could you just add a TODO comment, e.g. \"Explore if spark-selection could be reused here\"?","created_at":"2014-01-26T08:30:06Z","updated_at":"2014-01-26T08:30:06Z","html_url":"https://github.com/dart-lang/spark/pull/782#discussion_r9174875","pull_request_url":"https://api.github.com/repos/dart-lang/spark/pulls/782","_links":{"self":{"href":"https://api.github.com/repos/dart-lang/spark/pulls/comments/9174875"},"html":{"href":"https://github.com/dart-lang/spark/pull/782#discussion_r9174875"},"pull_request":{"href":"https://api.github.com/repos/dart-lang/spark/pulls/782"}}}}