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

Flex sidebar #178

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Flex sidebar #178

wants to merge 12 commits into from

Conversation

kenbowen
Copy link
Member

Please review for search experience quality.

chuckhoupt and others added 4 commits August 31, 2019 12:33
…serted search framework (but searching not yet implemented).
Implemented sidebar-based search for predicates in refs pages.
@chuckhoupt
Copy link
Member

I'm seeing an jQuery regex error at page-load. I added an onerror handler to make it more visible.

For a while I thought the error was preventing search, but it turned out just to be the test search I had chosen: "cut". Strangely "cut" doesn't match anything, even though "cut" is in !/0's description.

@chuckhoupt
Copy link
Member

Here are some ideas on the search experience:

  • A search should show each matching predicate, as it does in the old interface (https://alsprolog.com/docs/ref/alshelp.html), rather then just highlight package/group. Because the folding lists hide items, the code will have to open and un-open detail elements (just as it already shows/hides items).
  • Because there is a lot of hierarchy, I think unmatched parts of the hierarchy (Package/Group names) should be hidden if they don't contain matching items.

A concrete example of the suggestions above would be a search for "bag", which would display the bagof/3 item and its package and group, but nothing else:

Search: bag

  • Core Prolog
    • Control
      • bagof/3

docs/docs/ref/cut.md Outdated Show resolved Hide resolved
@@ -2,8 +2,14 @@
{%- for package in site.ref_packages %}

<li>
<strong>{{package | escape}}</strong>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing all the changes to this file are experimental/scratch changes. Should they be removed?

@kenbowen
Copy link
Member Author

kenbowen commented Jan 15, 2020 via email

@kenbowen
Copy link
Member Author

kenbowen commented Jan 15, 2020 via email

@kenbowen
Copy link
Member Author

kenbowen commented Jan 15, 2020 via email

@kenbowen
Copy link
Member Author

kenbowen commented Jan 15, 2020 via email

@chuckhoupt
Copy link
Member

Maybe we should do something like: Starting at the first typed char, color as now, but do not show the matches; When reaching 3 chars (4?), start expanding the details tabs and show the matches.

The trouble with having a minimum length requirement is that it will prevent useful searches for things like "!", "gc", ">=", etc.

Another option might be to have a maximum result threshold (in the 20-50 range?). For example, "g" matches 100+ entries, but "gc" only matches 2 -- the search code could delay the display of results until the count falls below the max threshold.

@kenbowen
Copy link
Member Author

kenbowen commented Jan 31, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants