Open core-ai-bot opened 3 years ago
Comment by JeffryBooher Tuesday Apr 22, 2014 at 19:59 GMT
@
dangoor All feedback addressed ready to re-review.
Comment by dangoor Wednesday Apr 23, 2014 at 19:41 GMT
Hey@
JeffryBooher, wow... small code change!
Unfortunately, I think a bit more code change is required, though:
Comment by JeffryBooher Thursday Apr 24, 2014 at 00:31 GMT
@
dangoor basicStringMatch didn't do it. I'm going to have to write a custom sorter which i had thought about doing anyway.
Comment by JeffryBooher Thursday Apr 24, 2014 at 00:39 GMT
It looks like jsCodeHints makes its own sort functor to callback with
penalizeUnderscoreValueCompare()
We could do something similar to that in CSS code hints
but we first want the needle to match
'ba' (background-*) matches first and (background-attachement) is the first item in the list.
This may be difficult to do with a callback since we need the needle as well...
Comment by dangoor Thursday Apr 24, 2014 at 01:15 GMT
@
JeffryBooher The stringMatch function returns a value with a "matchGoodness" score. You need to hang on to that value for all of the matches and then sort on that. The penalizeUnderscoreValueCompare
is just there in JS code hints to prefer public API values to private ones. JS code hints is doing what the basicMatchSort
does but customized a little bit to handle the stack depth of the match and the underscores.
Comment by JeffryBooher Thursday Apr 24, 2014 at 17:04 GMT
@
dangoor Tests fixed and fuzzyMatching should be on par with what's expected:
"b-l-c" will get you "border-left-color" as the only option. "ml" will yield a list with "margin-left" at the top.
Comment by dangoor Thursday Apr 24, 2014 at 17:57 GMT
@
JeffryBooher Works great!
The code duplication seems borderline for refactoring to eliminate the duplication, but I think it's small enough that this is fine.
I'll go ahead and merge. Thanks for the nice addition!
Issue by JeffryBooher Monday Apr 07, 2014 at 23:09 GMT Originally opened as https://github.com/adobe/brackets/pull/7441
Adds fuzzy code hints to css editing:
Known issues:
shape-inside: circle( <-- presents shapes again. This exists in master because we don't set the context o
JeffryBooher included the following code: https://github.com/adobe/brackets/pull/7441/commits