Skip to content
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

Closed
sethladd opened this issue Nov 12, 2014 · 27 comments
Closed

Find as you type search #7

sethladd opened this issue Nov 12, 2014 · 27 comments
Assignees
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures type-enhancement A request for a change that isn't a bug
Milestone

Comments

@sethladd
Copy link
Contributor

A developer should be able to "find as you type" to locate docs for classes, libraries, fields, methods, functions, statics.

@sethladd sethladd added the type-enhancement A request for a change that isn't a bug label Nov 12, 2014
@sethladd
Copy link
Contributor Author

From dart-archive/dartdoc-viewer#38

Prefer names on the current page, when finding answers.

@sethladd
Copy link
Contributor Author

See also dart-archive/dartdoc-viewer#56

@sethladd
Copy link
Contributor Author

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.

@sethladd
Copy link
Contributor Author

From dart-archive/dartdoc-viewer#66

When searching for names, prefer definitions over mentions in text.

@sethladd
Copy link
Contributor Author

From dart-archive/dartdoc-viewer#102

(1) suggest should have a smarter ranking. dart:math's max is more popular than dart:html's.
(2) there needs to be some way of discovering every max function, popular or not,
like the wikipedia disambiguation pages.

@sethladd
Copy link
Contributor Author

Thought: we can parse all of pub.dartlang.org and generate a ranking of most used SDK APIs to help better inform ranking.

@sethladd sethladd added the P1 A high priority bug; for example, a single project is unusable or has many test failures label Jan 16, 2015
@sethladd
Copy link
Contributor Author

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 :)

@sethladd
Copy link
Contributor Author

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.

@sethladd
Copy link
Contributor Author

Suggestions from @johnmccutchan

Allow a developer to use modifiers in search, e.g.:

extends:Element

implements:Pattern

is:method

@sethladd sethladd added P2 A bug or feature request we're likely to work on and removed P1 A high priority bug; for example, a single project is unusable or has many test failures labels Mar 30, 2015
@sethladd sethladd added this to the Branch milestone Aug 8, 2015
@sethladd sethladd added P1 A high priority bug; for example, a single project is unusable or has many test failures and removed P2 A bug or feature request we're likely to work on labels Aug 8, 2015
@sethladd
Copy link
Contributor Author

sethladd commented Aug 8, 2015

Feedback from beta is that people really want this. Bumping up.

@sethladd
Copy link
Contributor Author

sethladd commented Aug 8, 2015

Started with #799

@sethladd
Copy link
Contributor Author

By default, the search box does this on mobile:

screen shot 2015-08-10 at 10 14 58 am

cc @devoncarew @keertip

of course, we can change this. Thoughts?

here it is on desktop:

screen shot 2015-08-10 at 10 15 42 am

@devoncarew
Copy link
Member

Looks nice! I've also seen the search box replace either the entire top line or most of the top line.

@sethladd
Copy link
Contributor Author

If it replaces the top line, we lose the "what am I looking at" signal, though.

@keertip
Copy link
Collaborator

keertip commented Aug 10, 2015

Looks good!

@devoncarew
Copy link
Member

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.

@sethladd
Copy link
Contributor Author

As in, there's a little search icon on the right, clicking on it pops out the search box

Ah, sure, we can try that.

@sethladd
Copy link
Contributor Author

Making progress.

screen shot 2015-08-10 at 10 05 53 pm

@polux
Copy link
Contributor

polux commented Aug 11, 2015

Looks good!

@sethladd sethladd modified the milestones: Branch, 0.5.0 Aug 11, 2015
@sethladd sethladd self-assigned this Aug 12, 2015
@sethladd
Copy link
Contributor Author

PR is ready. Will need tweaks, but I think it's enough to get feedback from real users.

@sethladd
Copy link
Contributor Author

Testing on the core SDK, it's clear we need to rank these. Will look at the previous logic.

screen shot 2015-08-12 at 8 56 02 am

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

@sethladd
Copy link
Contributor Author

We now have basic weighting/sorting:

screen shot 2015-08-12 at 11 25 43 pm

Even better, shorter name is preferred:

screen shot 2015-08-12 at 11 37 00 pm

@polux
Copy link
Contributor

polux commented Aug 13, 2015

Nice! 👍

@sethladd
Copy link
Contributor Author

First cut of this is done. Room for improvement, so please try it out and send feedback!

@polux
Copy link
Contributor

polux commented Aug 14, 2015

Awesome! One small gotcha: when you're done generating the doc, dartdoc writes:

Success! Open file:///.../doc/api/index.html

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 python -m SimpleHttpClient in .../doc/ and point you browser to http://localhost:8000", which would work for most users.)

@sethladd
Copy link
Contributor Author

That's a really good point! Please open a new issue so we can address this.

@polux
Copy link
Contributor

polux commented Aug 17, 2015

Created #819.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants