Serenity: Help: Search functionality

Created on 3 Jul 2020  路  11Comments  路  Source: SerenityOS/serenity

GNOME Help for example has search functionality and it's incredibly helpful:

image

Would be nice to have this in Serenity's Help application as well. Maybe not a fancy dropdown with updates as you type, but a toolbar button, dialog with text input and then list of search results would be a nice start.

cc @bugaevc :slightly_smiling_face:

Most helpful comment

Ah yes, CHM viewer vibes

shot-2020-07-04_19-27-22

All 11 comments

Yep, agreed, would be nice 馃檪. Both Unix man (apropos) and Windows help have search.

It being interactive sounds fun to me...although might be a little out-of-style for Serenity's GUI feel, not sure.
In the meantime, I made a tiny thing to see how it worked out.
Could probably be moved to some FilteringProxyModel if we make it support nested indices (this just flattens them out).

shot-2020-07-04_18-34-55
shot-2020-07-04_18-35-06
shot-2020-07-04_18-35-32
shot-2020-07-04_18-35-47

I'd expect it to be a separate mode for the navigational sidebar rather than a popup. Gotta imitate Windows CHM viewer closer 馃檪

Eh, just the first thing that came to mind, I guess it's just that I saw the GNOME help above :shrug:
it was just a little prototype to test out how that filtering would work out.
But I think I like the CHM viewer look a bit better...maybe even keeping the current "open page on click"...

I ended up with Role::Search and void* ModelIndex::role_specific_data, then asking the model to tell us whether something matches some term.

Ah yes, CHM viewer vibes

shot-2020-07-04_19-27-22

馃槏

Full text search, or at least search in that first line after name, would be nice, but it looks great without it too

N O S T A L G I A !

Full text search

It's rather simple, I think, but doing that would require _a lot_ of fs hits...not sure if that's ideal with the search-as-you-type model?

It doesn't have to be search-as-you-type... Input your query, press enter (or a search button? anyone have an older version of Windows at hand to check what they used to have?), then we'd do a full-text search.

I just went with pressing return.
I don't remember there being any search buttons, so I assume it was just pressing enter.

/me notices the commit and gets ready to nitpick

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Quaker762 picture Quaker762  路  6Comments

Lubrsi picture Lubrsi  路  4Comments

linusg picture linusg  路  3Comments

nvella picture nvella  路  6Comments

Arthur-Kamau picture Arthur-Kamau  路  7Comments