jleyba / js-dossier

A JavaScript documentation generation tool.
Apache License 2.0
149 stars 15 forks source link

interfaces not findable with search box #81

Closed myphysicslab closed 7 years ago

myphysicslab commented 8 years ago

In my set of documentation, some interfaces are not findable in the search box. For example, when I type "rigidbody" I see several suggestions involving the class RigidBodyEventHandler, but nothing for RigidBody interface itself.

I will try to get more info about which interfaces or classes are having this problem. This was previously a problem with another interface (called Edge) but after updating Dossier to latest version that one is now appearing.

jleyba commented 8 years ago

Are these interfaces included in the side navigation menu? Everything in that menu should also be included in the search index.

One potential problem is the autocomplete widget. I'm using goog.ui.ac.AutoComplete, and I've noticed before the default matcher doesn't always match on the "closest" string - in your case showing RigidBodyEventHandler instead of RigidBody.

myphysicslab commented 8 years ago

Yes, RigidBody is listed in the side navigation menu. Looks like everything is listed there. I found a more extreme example: I have 12 classes or interfaces that start with the word "Display" but only one of them (DisplayGraph) appears when I type "display" into the search bar.

jleyba commented 7 years ago

If you'd like further adjustments, please provide the types.js file generated by dossier so I have concrete data to work with.

myphysicslab commented 7 years ago

Confirmed fixed. Works well now. Thanks!

For example, all the classes that start with "Display" are showing up.

That said, there are aspects of the current behavior that I might alter (but not urgent):

When I type "rigidbody" I get some of the classes/interfaces that start with "rigidbody" but not all of them. I suspect the length of the list is being limited, and in my case I'm seeing some static properties that are less important than the other classes (with longer names) that are more important.

To be specific, I'm seeing:

search_box

But I'd rather see classes RigidBodyEventHandler, RigidBodyObserver on the list than static properties like RigidBodySim.W_.

Perhaps I'm asking to prioritize classes and interfaces over properties & methods? Or to prioritize names that have the word fragment in them.

I've uploaded the types.js file to http://www.myphysicslab.com/rmnp/types.js

jleyba commented 7 years ago

The list is currently capped at 10 entries.

Good suggestion for favoring types of properties. Will track that in #86