xjsframework / xjsframework.github.io

XJS Framework website
http://xjsframework.github.io
1 stars 2 forks source link

Improved API Search #28

Open mikeybanez opened 7 years ago

mikeybanez commented 7 years ago

I think we need to consider how to improve the search function in our website. This may or may not include changes to the doc generator itself.

Here are some suggestions:

  1. Maybe we can group, or at the very least sort the search results somehow. I think it makes sense if all classes are seen together, then all interfaces and enums and methods are grouped as well.
  2. Perhaps also consider putting exact matches at the top. For example, it's very difficult to search for the IO class because of all the position related calls. (Similarly, you cannot easily find the Color class.) Alternatively, set a mininum character length for substring matches.
  3. Consider if we should handle duplicate results differently. Specifically, take any Source or Item related method (getPosition() for example) and you can see 10 results for the exact same method. Perhaps we could implement some way of hiding the implementing classes and only show results for the main interfaces themselves. But I'd also like to note that if we totally hide these from search results, then we need a much better way of indicating that some method getPosition() is implemented by this and that class.

@SML-MeSo @virn feel free to comment. This is not an urgent task though.

virn commented 7 years ago
  1. I agree that we should sort the search results in a way, somehow show the classes first then going down in rank/level/group. This would also help in the 2nd point.
  2. Makes sense that we only display the main reference. One thing I can think of is to create a main table on which classes these interfaces are used.