[RFC] Search box

Thomas De Schampheleire patrickdepinguin at gmail.com
Sun Apr 26 15:17:33 EDT 2015


On Sun, Apr 26, 2015 at 8:53 PM, Mads Kiilerich <mads at kiilerich.com> wrote:
> On 04/23/2015 09:32 PM, Andrew Shadura wrote:
>>
>> Hello,
>>
>> While playing with Bootstrap styling, I came across the following
>> question: should we display a search box instead of a link to the
>> search page?
>>
>> I first implemented a search box which appears after clicking "Search"
>> button on the front page. When users type in the box, a dropdown
>> appears, suggesting to search not only by file content (default), but
>> also by commit messages or file names.
>
>
> We should consider both searching inside repositories and searching
> "globally". Most of the global search options seems rather pointless to me
> in real world setups. Globally, I only think it makes sense to search for
> repository names (replacing the "Repositories" menu item?) and repository
> description. Inside the repository it makes more sense to search commit
> messages and filenames and file content (in all or tip or head
> revisions???). We should also add Mercurial revset search as hgweb has it
> (even though that probably would look a lot like the current changelog page
> ... just like searching in commit messages perhaps should).
>
> I think the repo search has more need for being made more available. But
> showing two search boxes on all repo pages would also be weird. It needs
> some clarification of which is which ... but consistency and integration
> would also be nice.
>
> Other pages do have (or doesn't have) other kinds of search filtering. That
> should also be considered.

Searching for existing repositories (the current repositories menu) is
difficult to replace with the search box IMO because it returns
results on the fly. Doing that for arbitrary search entries in such a
dropdown is not easy to display in a clear way.

For the actual search, I do think it makes sense to be able to use it
directly from any page. This search box would be able to search for
different items (search over all repositories, but as Mads I agree it
is probably not that useful), search inside repositories for files,
commits (revset), etc., and context-sensitive search possibilities,
depending on the page on is on.

Redirecting to a search 'page' in order to be able to enter search
terms is not very user-friendly and makes searching harder than it
should be.


>
>> I have also prepared different options regarding to the location of the
>> box. GitHub places it on the left, Bitbucket places in on the right,
>> GitLab doesn't have it at all.
>
>
> But AFAICS, bitbucket only has a "find a repository" option ... which is
> pretty much like our Repositories search field?
>
>> Here's a proof of concept of my "dynamic" search box:
>> https://codehost.me.uk/
>
>
> As (more or less) mentioned before, I don't like that it changes the menu
> content in an unexpected way, that there is no way back, and that it doesn't
> show what you are searching - "commit" and "filename" only shows up after
> typing something ... and I don't know what it these two items on the list
> really mean ... and I wonder where the third option "file content" is.

I actually did like the 'appear-on-click' option, but I can understand
that the moving of the left-side buttons feels odd.
Another alternative currently not shown is a narrow-width search box
on the right side. It could be placed on the left of the login/profile
button. This is similar to the last option, but with the other menu
items to the right.

>
>> And here's comparison of different options:
>> https://shadura.me/kallithea/search-box/
>
>
> I don't think Search needs more expose on the pages right now. It needs
> better usability and functionality before we put a search field on every
> page. I also doubt it is something people use a lot so it doesn't have to be
> _that_ exposed and attract that much attention. The old search page is not
> elegant but I think it is more usable than the fancy widget.

When the search functionality is improved, I do think that a search
option will be used more often by people, and having it available on
every page seems logical to me. We could postpone the proposed change
until we are at this point, but I think it needs to be done
eventually.

Best regards,
Thomas


More information about the kallithea-general mailing list