Modify counting for search limit in typeahead (patching it locally)#1369
Conversation
|
@osma if this works I'll have level-up'ed my monkey-patching in JS (nothing to be proud of, unfortunately 😅). Cheers |
|
Kudos, SonarCloud Quality Gate passed!
|
Codecov ReportBase: 71.17% // Head: 71.17% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## master #1369 +/- ##
=========================================
Coverage 71.17% 71.17%
Complexity 1650 1650
=========================================
Files 32 32
Lines 3788 3788
=========================================
Hits 2696 2696
Misses 1092 1092 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
Whoa, this is awesome @kinow ! You sure have earned a 🏅 for this feat! I tested this and it seems to work, at least for the known example cases. There's no way for me to tell whether this will cause any new troubles, but having to choose between known-buggy and possibly-buggy-but-seems-to-work, I think the latter is a much better option. It's clear we need to replace Typeahead.js, and I think this will be done rather soon as we are going to rebuild the UI for 3.0 anyway. But this solves the problem for now so I'll merge it! 👍 |
🎉 hooray!
👍 agreed.
Writing from scratch is a little tricky, but if there's some reactive framework (react/vue/svelte/or even those smaller micro frameworks) it could save a few lines. Thanks @osma! |








Reasons for creating this PR
Link to relevant issue(s), if any
Description of the changes in this PR
Monkey patching typeahead to simulate as if twitter/typeahead.js#1774 had been merged.
Known problems or uncertainties in this PR
It's hard to write a test for this change, sorry. Only way to review and verify is really deploying somewhere with YSO to compare the search results.
Checklist
.sr-onlyclass, color contrast)