Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Implement Quicksilver score-based text matching for the jQuery version, plus some style tweaks #1080

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants

New pull request with clean commits per the last comment in my last pull request.

@stof stof commented on the diff Mar 20, 2013

coffee/lib/score.js
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+
+String.prototype.score = function(abbreviation,offset) {
@stof

stof Mar 20, 2013

Collaborator

Please don't modify the String prototype

@stof stof commented on the diff Mar 20, 2013

@@ -14,6 +14,7 @@ javascripts = {
'coffee/lib/select-parser.coffee'
'coffee/lib/abstract-chosen.coffee'
'coffee/chosen.jquery.coffee'
+ 'coffee/lib/score.js'
@stof

stof Mar 20, 2013

Collaborator

you should move the lib before the final file IMO

@stof stof commented on the diff Mar 20, 2013

chosen/chosen.css
@@ -238,6 +241,7 @@
overflow-x: hidden;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
+ min-width: 178px;
@stof

stof Mar 20, 2013

Collaborator

Are these changes related to the scoring change ?

Collaborator

stof commented Mar 20, 2013

The prototype version should be updated as well.

Contributor

pfiller commented Apr 23, 2013

Thanks, @theteknocat. Chosen's search method is going to get an overhaul and I think QuickSilver looks interesting, but I don't think Chosen is ready to commit to this yet. We'll keep it in mind as we evaluate our options for improving search, though.

Some general concerns:

  • I think any score-based results list would sort based on the quality of the score.
  • I share @stof's worry about modifying the string prototype
  • Prototype version needs to have matched functionality

@pfiller pfiller closed this Apr 23, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment