GSoC: ToolTip Guidance

After first couple of days I’m starting to get an inkling of the outcome of the project. The basic thought is to provide in convenient way all the information about methods one has to constantly Google. It doesn’t get much more straightforward than being able to hover over the method you are writing and getting a little clue, similarly to the Visual Studio Code.

Screen Shot 2017-06-07 at 16.44.03

We need two things to make this happen, source where to find the information and an object to present it in. One place to get the infromation is throught the documentation that is already accesable throught GNOME Builder in the right panel. The URIs to the individual documentation pages and their keywords (such as the name of the methods) are already imported thanks to Devhelp. For a simple way to then get a text on hover is using the GtkToolTip.

Screen Shot 2017-06-07 at 16.42.42

The styling of the tool tip is very limited and so far the presented information can get bit messy especially when the description doesn’t fit on one line.

Screen Shot 2017-06-07 at 16.44.52

The styling is not the main limit, the tool tip is also not clickable because of the simple reason it disappears when you move the cursor. My vision is to make the documentation card bit more interactive. Due to getting information from the documentation we have a lot more information about the methods than just the input and output types.

Screen Shot 2017-06-08 at 11.19.55

Showing all the information just on hover might be bit too much so the card could have a expand button to show more to user and if even that is not enough of information refer the user to the documentation itself. So for the next part of the implementation I would like to work on hover provider that would be more inclined to customisation and could be used later by more features.

The implementation of this simple documentation card can be found here, even though it’s in it beginning stages I already found it quite practical. If the card doesn’t want to show up, you might want to check the right panel if you actually have the documentation. I haven’t found a centralized system for all the documentation but if you install a package *-doc the specific library it will be automatically added to your Builder through Devhelp, for instance:

  • gtk3-devel-doc
    • GTK+ 3 Reference Manual
    • GAIL Reference Manual
    • GDK 3 Reference Manual
  • glib2-doc
    • GLib Reference Manual
    • GIO Reference Manual
    • GObject Reference Manual
  • webkitgtk3-doc
    • WebKitGTK+ Reference Manual
Advertisements

2 thoughts on “GSoC: ToolTip Guidance

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s