Clark-Nikdel-Powell / WP-Admin-Command-Palette

Optimize WordPress admin navigation with a modal window to search for and navigate directly to WordPress admin pages.
GNU General Public License v2.0
4 stars 0 forks source link

Re-order the result divs based on which one has the CLOSEST results #6

Closed jhned closed 9 years ago

jhned commented 9 years ago

We'll need to include the score of the search result, so that we can include the highest score for each section in a data-attribute, and then reorder the search result divs based on which one has the closest match.

The current order makes it seem like the search function isn't working correctly. For instance, if you search for "Lorem Ipsum," you should get a page as the closest match, but instead there are 5 posts that precede it.

We may want to consider including an option to flatten the results into a single list, with labels for the post type or taxonomy type on each individual item, rather than as a sub-heading.

jhned commented 9 years ago

Ok, one issue with this: setting includeScore to true changes the data structure of the results array. It'll probably take significant refactoring to get it re-worked.

gwelser commented 9 years ago

Flat results are displayed in order of Fuse score. Grouped results are also in order within their group.