-
Notifications
You must be signed in to change notification settings - Fork 127
Switch search functionality to custom handling #2486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch search functionality to custom handling #2486
Conversation
adding @srawlins to reviewers as I am not that knowledgeable with javascript |
I'm not the most familiar either, so if anything isn't clear from the code let me know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some general questions, I'll also take the code for a spin locally.
Two broad questions:
|
Automated testing would be a great addition. We've needed it for a long while and agree that it can go in a future PR. This area of the code has been a bit fragile and relying on manual spot checking shouldn't be the only way we test this functionality. |
|
Ah yeah the custom scoring etc is probably a good reason to roll our own.
Thanks much! From previous experience, I think anything dealing with keystroke or mouse events cannot be done in a headless browser like PhantomJS. We need something bigger like Chrome. But I think with a dummy HTML file, we should be able to write some straightforward tests and run them with Karma or something. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finished review: One change. Did some spot checks and verified #2483 is fixed.
It looks like tabbing while within the search box is no longer equivalent to clicking on a selection, which is a good thing. I also notice that the search does substrings now which is a welcome change, and just in general it "feels" better to use than the old one, in subtle ways. Looking forward to this change landing!
8567142
to
c66f366
Compare
Force pushing makes me have to re-review everything to avoid missing changes that could have been introduced, just an FYI that will slow the landing of this commit. |
@jcollins-g Sorry about that, I'll keep that in mind for next time! |
What is the alternative to force pushing after a rebase? Should I not be rebasing? |
@srawlins You can merge the updated master into your branch. If not as clean of a history in the PR, but will all be squashed on merge anyway. |
Yes. While this is not considered "best practice" for git itself in many situations because of the history being complicated, it actually works better with the review tools on github to do it this way and depend on the later "squash and merge" to clean up the mess. |
OK I'll merge from now on. |
This may have fixed #1776 ; I'll check later on pub.dev. |
This switches the current
typeahead
handling to custom handling. The typeahead library had a lot of functionality we don't use, it isn't supported anymore, and it also required us to also pull in jquery.This is a preliminary change and sticks with the same search functionality and UI. Follow-up PRs can introduce style changes as well as expanded search functionality.
This PR accomplishes the following:
index.json
index.json
multiple times unnecessarily.Note: These changes don't support Internet Explorer. Testing previous functionality, it didn't before either, so nothing is really lost here.
Breaking changes:
Testing instructions:
pub run grinder serve-sdk-docs
Tab
fills the search bar with that hint.