-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Libdoc: Support searching keywords by name, arguments, and documentation #1872
Comments
Basic functionality works. UI needs lot of love.
Can this be optional? For example, I use libdoc in robotframework-hub which already has a search feature built in. I don't want the documentation generated by libdoc to have a bunch of javascript or features that aren't easy to embed in another program. |
Can you elaborate how search would make it harder to embed Libdoc outputs with other programs? These docs are already nowadays created dynamically using Javascript, so I cannot see how that could be the problem. I'm not against making search optional. Just having a flag in the doc to not show the UI ought to be easy, but obviously you'd still have all the code there. |
It doesn't make it harder per se, it's just that it makes the data What my code does is this:
It then takes the return result and embeds that inside a div on a web page. If On Fri, Dec 12, 2014 at 2:53 PM, Pekka Klärck notifications@github.com
|
- Initial implementation to search by hash - Initial styles Now search is somewhat usesable already!
@boakley, no worries, there are no changes to |
|
Technical changes: Earlier keywords were searched from the model and their info re-rendered and then matches highlighted. Now highlight is done first, keywords without highlighting marked as unmatched, and styles used to format them. UI changes: All shortcuts are shown always, unmatched are just gray. Also all keyword docs are shown by default, unmatched as gray, but there's an option to hide unmatched.
TODO: - Test w/ IE9 and 10. - Performance testing.
Returned to searching keywords from model and re-rendering keywords as needed. Much better performance with IE8. Same functionality as earlier.
After the latest performance tuning I'd say this feature is ready to be released. We can enhance it in future releases. I'll leave this open for a little time and send mail to users list to ask for comments, though. |
Could the page scroll to the first matched line automatically, like the behavior of Browser's search? |
We've been thinking about auto-scroll feature but weren't certain how it should work in practice. There are, at least, these questions:
If we can come up with a good answers to the above questions and implementation isn't too complicated, we definitely should do it for 2.8.7. Otherwise it's better to wait for the next release when we have more real life experience using the search. |
As i have seen, "Shortcuts" and "Keywords" part are included in search scope. And about when, maybe after click "Enter". Yes, i agree. May need more feedback. |
…id did not work as an anchor. #1872.
@rainmanwy: After revision 1dffe84 opening search always scrolls to shortcuts section. That was easy to implement and seems to work fine. Scrolling can be fine-tuned in future releases if needed. |
After the latest fixes and enhancement @jussimalinen and I consider this issue done. |
Ok, thank you very much! |
Especially with bigger libraries, it would be useful if Libdoc outputs had built-in search capability. It is possible to use browsers' search functionality, but it will search everywhere on the page. Dedicated search functionality could allow searching by name, arguments, documentation, and could show only the matching keywords.
Because Libdoc outputs is already now generated dynamically using Javascript, this shouldn't be too complicated to implement. We thus try to get it already into RF 2.8.7. Some kind of search functionality is a must latest in RF 2.9 when we plan to support keyword tags (#1840).
The text was updated successfully, but these errors were encountered: