-
Notifications
You must be signed in to change notification settings - Fork 117
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
Find as you type search #7
Comments
From dart-archive/dartdoc-viewer#38 Prefer names on the current page, when finding answers. |
See also dart-archive/dartdoc-viewer#56 |
A user would like a shortcut key to easily access the search/find-as-you-type. See dart-archive/dartdoc-viewer#43 For an example, see how Google Docs works. Cmd-F opens an app-specific search box. |
From dart-archive/dartdoc-viewer#66 When searching for names, prefer definitions over mentions in text. |
From dart-archive/dartdoc-viewer#102 (1) suggest should have a smarter ranking. dart:math's max is more popular than dart:html's. |
Thought: we can parse all of pub.dartlang.org and generate a ranking of most used SDK APIs to help better inform ranking. |
See also dart-archive/dartdoc-viewer#83 if I type something like "Node.remove" in the search box, it would be nice if dart:html Node.remove was the first result. The old doc viewer supported this, and I thought DartDocViewer did too, so not sure if this is a regression or a feature request. Either way, it would be super helpful :) |
See also dart-archive/dartdoc-viewer#107 A request to be able to search for doc-related annotations. In Angular's case, search for all classes marked with ng-class. |
Suggestions from @johnmccutchan Allow a developer to use modifiers in search, e.g.:
|
Feedback from beta is that people really want this. Bumping up. |
Started with #799 |
By default, the search box does this on mobile: of course, we can change this. Thoughts? here it is on desktop: |
Looks nice! I've also seen the search box replace either the entire top line or most of the top line. |
If it replaces the top line, we lose the "what am I looking at" signal, though. |
Looks good! |
As in, there's a little search icon on the right, clicking on it pops out the search box - covering the header. Dismissing the search would recover the space for the regular header. |
Ah, sure, we can try that. |
Looks good! |
PR is ready. Will need tweaks, but I think it's enough to get feedback from real users. |
Testing on the core SDK, it's clear we need to rank these. Will look at the previous logic. Here's the scoring/weighting from the current api.dartlang.org: https://github.com/dart-lang/dartdoc-viewer/blob/master/client/lib/search.dart#L83 |
Nice! 👍 |
First cut of this is done. Room for improvement, so please try it out and send feedback! |
Awesome! One small gotcha: when you're done generating the doc, dartdoc writes:
But when you do this the search box is unavailable because the browser refuses to load the JSON index file. Maybe the message should mention this somehow. (Maybe it could say something like "run |
That's a really good point! Please open a new issue so we can address this. |
Created #819. |
A developer should be able to "find as you type" to locate docs for classes, libraries, fields, methods, functions, statics.
The text was updated successfully, but these errors were encountered: