After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 759922 - Add tooltips to button that are missing
Add tooltips to button that are missing
Status: RESOLVED FIXED
Product: gnome-maps
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-maps-maint
gnome-maps-maint
: 788951 (view as bug list)
Depends on:
Blocks: 788951
 
 
Reported: 2015-12-28 08:58 UTC by Jonas Danielsson
Modified: 2018-01-19 12:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
sidebar-tooltip: added tooltip to add and remove via point (1.19 KB, patch)
2016-02-25 19:36 UTC, Nayan Deshmukh
reviewed Details | Review
[Patch]sidebar-tooltip: added the tooltips to sidebar button (1.47 KB, patch)
2016-02-26 12:52 UTC, Nayan Deshmukh
reviewed Details | Review
sidebar-tooltip: added the tooltips to sidebar button (1.48 KB, patch)
2016-03-04 16:22 UTC, Nayan Deshmukh
none Details | Review
Sidebar-tooltip: added the tooltips to sidebar button (1.28 KB, patch)
2016-03-04 16:29 UTC, Nayan Deshmukh
accepted-commit_after_freeze Details | Review
MapType Tooltip: Added tooltips to MapTypes (1.38 KB, patch)
2016-03-07 01:56 UTC, Kaustav Biswas
none Details | Review
Tooltips to Route Planner Buttons (1.20 KB, patch)
2018-01-17 15:24 UTC, Vibhanshu Vaibhav
none Details | Review
Tooltips to route planner buttons (1.93 KB, patch)
2018-01-18 09:33 UTC, Vibhanshu Vaibhav
accepted-commit_now Details | Review
routeEntry: Add tooltips to route planner buttons (1.93 KB, patch)
2018-01-18 09:35 UTC, Vibhanshu Vaibhav
none Details | Review
routeEntry: Add tooltips to route location buttons (2.00 KB, patch)
2018-01-18 20:32 UTC, Marcus Lundblad
committed Details | Review

Description Jonas Danielsson 2015-12-28 08:58:34 UTC
Are there buttons in Maps that would benefit from having tooltips? From an accessibility point of view?

A review of this and code to add tooltips would be appreciated! One can check the code in main-window.ui to see examples of tooltips added for headerbar buttons.
Comment 1 Karanbir Chahal 2016-01-02 11:18:17 UTC
The zoom in or out buttons could do with some tool tips. 
Also the search bar could have some default text such as "Search for places.."
or something like that.
Apart from that I don't think other tool tool tips can be incorporated.
Anyone else? Suggestions?
Comment 2 Karanbir Chahal 2016-01-02 11:20:36 UTC
The route planner slider bar could also do with some tool tips.
The destination and the departure place for example.
The icons for driving,walking and cycling makes a lot of sense already.
Comment 3 Nayan Deshmukh 2016-02-25 19:11:34 UTC
I am new to gnome-maps.

I think the route planner sidebar should have some tooltips on add button and the remove button. the tooltips could be "Add a via point" and "Remove the via point". And may be some way to let user know that he can drag and drop the entries by dragging and dropping the icon.
Comment 4 Nayan Deshmukh 2016-02-25 19:36:49 UTC
Created attachment 322409 [details] [review]
sidebar-tooltip: added tooltip to add and remove via point

Added an "Add a via point" tooltip and a
"Remove the via point" to improve accessibility.
Comment 5 Marcus Lundblad 2016-02-26 12:33:59 UTC
Review of attachment 322409 [details] [review]:

::: src/routeEntry.js
@@ +69,3 @@
             this._buttonImage.icon_name = 'list-add-symbolic';
             this._icon.icon_name = 'maps-point-start-symbolic';
+            this._button.set_tooltip_text("Add a via point");            

I was thinking about if these labels would be a bit technical.
Maybe something like "Add location to visit in route"?
Comment 6 Marcus Lundblad 2016-02-26 12:34:40 UTC
I think we would possibly need some designer input on the labels?
Comment 7 Marcus Lundblad 2016-02-26 12:35:22 UTC
Also, this will need a string announcement and UI freeze exception.
Comment 8 Nayan Deshmukh 2016-02-26 12:52:56 UTC
Created attachment 322458 [details] [review]
[Patch]sidebar-tooltip: added the tooltips to sidebar button

added tooltip "Add location to visit in route"
to button to add via point and "Remove the location from route"
to remove the via point so that it makes more sense to users
Comment 9 Marcus Lundblad 2016-03-01 11:50:20 UTC
Review of attachment 322458 [details] [review]:

::: src/routeEntry.js
@@ +69,3 @@
             this._buttonImage.icon_name = 'list-add-symbolic';
             this._icon.icon_name = 'maps-point-start-symbolic';
+            this._button.set_tooltip_text("Add location to visit in route");            

These strings should be marked for translation.
Like _("Add location to visit in route")
Comment 10 Nayan Deshmukh 2016-03-04 16:22:17 UTC
Created attachment 323105 [details] [review]
sidebar-tooltip: added the tooltips to sidebar button

added tooltip "Add location to visit in route"
to button to add via point and "Remove the location from route"
to remove the via point so that it makes more sense to users
Comment 11 Nayan Deshmukh 2016-03-04 16:29:50 UTC
Created attachment 323106 [details] [review]
Sidebar-tooltip: added the tooltips to sidebar button

Added tooltip "Add location to visit in route"
to button to add via point and "Remove the location from route"
to remove the via point so that it makes more sense to users
Comment 12 Marcus Lundblad 2016-03-06 17:44:21 UTC
Review of attachment 323106 [details] [review]:

LGTM
Comment 13 Kaustav Biswas 2016-03-07 01:56:24 UTC
Created attachment 323227 [details] [review]
MapType Tooltip: Added tooltips to MapTypes

Added tooltips "Street View" and "Aerial View" to the two Map Type buttons,
streetLayerButton and aerialLayerButton respectively in the layers-popover.ui
Comment 14 Jonas Danielsson 2016-03-07 07:29:17 UTC
Sorry for my absence from this bugzilla entry. I want to make sure we get the 3.20 release out before returning to this. We are in string freeze. That means no new strings added, so that translators have time to work.

I will pick this up when we branch master for 3.22.

Thanks!
Comment 15 Marcus Lundblad 2016-03-07 07:58:44 UTC
Thanks Kaustav for the patch!
I also was thinking about if we should use "title case" or not for these strings.
I.e. "Street View" vs. "Street view".
I think it varies a bit in the menus, so perhaps, after master is open for new strings, go through this and try to normalize it.
Comment 16 Kaustav Biswas 2016-03-07 13:17:28 UTC
@ Jonas : oh ok sure . 

@ Marcus : Alright , I will normalize it .
Comment 17 Kaustav Biswas 2016-03-08 09:05:24 UTC
 I was going through the strings in the menu , i noticed that the other menu options were not in title case but in the layer popover , the Load Map Layer button is in title case , so what do you say ? should i normalize the street/aerial view or keep it as it is to match the Load Map Layer button ?
Comment 18 André Klapper 2017-10-13 17:46:21 UTC
*** Bug 788951 has been marked as a duplicate of this bug. ***
Comment 19 Moo 2017-10-13 18:48:38 UTC
Not only tooltips are needed but also some labels.

GtkLabel. Maybe placeholder text.
Comment 20 Vibhanshu Vaibhav 2018-01-12 14:23:45 UTC
I am new to gnome-maps.

I would like to work on this. Adding tool tips or labels to various buttons and text area especially to the route planner sidebar will improve usability.

I would also like to propose a feature of allowing the user location as the route planner starting point by default.
Comment 21 Marcus Lundblad 2018-01-15 21:06:54 UTC
(In reply to Vibhanshu Vaibhav from comment #20)
> I am new to gnome-maps.
> 
> I would like to work on this. Adding tool tips or labels to various buttons
> and text area especially to the route planner sidebar will improve usability.
> 
> I would also like to propose a feature of allowing the user location as the
> route planner starting point by default.

Hi Vibhanshu!
Thanks for taking interest in Maps! I think adding tooltips to some of the buttons in the routing sidebar sounds like a good idea. Like the buttons to add/remove destinations and reversing a route. These buttons are generated dynamically and not part of a .ui file. You can take a look in src/routeEntry.js where these buttons are created (in a switch-statement).
Did you try building and running Maps (i.e. using Flatpak from gnome-builder)?
Having the user location as a default starting point might be interesting. I think adding this might need some UI design (i.e. what happens if you enter a starting point manually, and then erase it, should it be a way to reset to the current location?). In a way something similar is possible today, if you open a place "normally" using the "global" search and in the place bubble click on the route button, it will create a route from your current location to that place.
Comment 22 Vibhanshu Vaibhav 2018-01-16 10:17:08 UTC
(In reply to Marcus Lundblad from comment #21)
> (In reply to Vibhanshu Vaibhav from comment #20)
> > I am new to gnome-maps.
> > 
> > I would like to work on this. Adding tool tips or labels to various buttons
> > and text area especially to the route planner sidebar will improve usability.
> > 
> > I would also like to propose a feature of allowing the user location as the
> > route planner starting point by default.
> 
> Hi Vibhanshu!
> Thanks for taking interest in Maps! I think adding tooltips to some of the
> buttons in the routing sidebar sounds like a good idea. Like the buttons to
> add/remove destinations and reversing a route. These buttons are generated
> dynamically and not part of a .ui file. You can take a look in
> src/routeEntry.js where these buttons are created (in a switch-statement).
> Did you try building and running Maps (i.e. using Flatpak from
> gnome-builder)?
> Having the user location as a default starting point might be interesting. I
> think adding this might need some UI design (i.e. what happens if you enter
> a starting point manually, and then erase it, should it be a way to reset to
> the current location?). In a way something similar is possible today, if you
> open a place "normally" using the "global" search and in the place bubble
> click on the route button, it will create a route from your current location
> to that place.

Yes I've successfully built and run Maps on my Linux(Ubuntu 16.04) PC with Flatpak.

Clicking on the route button on the place bubble of a location when searched globally does works the way you mentioned. 

But when you simply open the route planner sidebar, all the entries are empty. 

From a user's perspective they would usually look for directions from their current location itself so maybe if starting point entry in the route planner is automatically set to the current location the user would just have to enter the destination. They can also change the starting point if they wish to by just deleting and entering a new location.
Comment 23 Vibhanshu Vaibhav 2018-01-17 15:24:30 UTC
Created attachment 366949 [details] [review]
Tooltips to Route Planner Buttons

Added tooltips `Add in-route location`, `Remove in-route location` and `Reverse Route` to the Route Planner Sidebar Buttons for improved usability.
Comment 24 Marcus Lundblad 2018-01-17 18:28:26 UTC
Review of attachment 366949 [details] [review]:

We try to follow the GNOME commit message guidelines. The commit message should start with the module name (without the extension .js), the actual file that is changed is appearant from the commit itself. Also there shall not be title case in this string.
So something like:
routeEntry: Add tooltips for the route planner buttons

::: src/routeEntry.js
@@ +69,3 @@
             this._buttonImage.icon_name = 'list-add-symbolic';
             this._icon.icon_name = 'maps-point-start-symbolic';
+            this._button.set_tooltip_text("Add in-route location");

You could set these using the property directly instead of calling the setter, also the string should be marked as translatable, and along with that I think there should be a comment as a hint for translators that this is a tooltip text (the comment will appear in the translated template files that translators fill in). Also "in-route" sounds a bit weird to me, maybe something like "Add via location" would sound better?
So something like:
/* Translators: this is a tooltip */
this._button.tooltip_text = _("Add via location");

You will also need to define the _ as the gettext function at the top of this file with:
const _ = imports.gettext.gettext;

@@ +74,3 @@
             this._buttonImage.icon_name = 'list-remove-symbolic';
             this._icon.icon_name = 'maps-point-end-symbolic';
+            this._button.set_tooltip_text("Remove in-route location");

Like above…

@@ +79,3 @@
             this._buttonImage.icon_name = 'route-reverse-symbolic';
             this._icon.icon_name = 'maps-point-end-symbolic';
+            this._button.set_tooltip_text("Reverse Route");

I think we should probably not use title case for tooltip texts, so "Reverse route"
Comment 25 Vibhanshu Vaibhav 2018-01-18 05:22:58 UTC
(In reply to Marcus Lundblad from comment #24)
> Review of attachment 366949 [details] [review] [review]:
> 
> We try to follow the GNOME commit message guidelines. The commit message
> should start with the module name (without the extension .js), the actual
> file that is changed is appearant from the commit itself. Also there shall
> not be title case in this string.
> So something like:
> routeEntry: Add tooltips for the route planner buttons
> 
> ::: src/routeEntry.js
> @@ +69,3 @@
>              this._buttonImage.icon_name = 'list-add-symbolic';
>              this._icon.icon_name = 'maps-point-start-symbolic';
> +            this._button.set_tooltip_text("Add in-route location");
> 
> You could set these using the property directly instead of calling the
> setter, also the string should be marked as translatable, and along with
> that I think there should be a comment as a hint for translators that this
> is a tooltip text (the comment will appear in the translated template files
> that translators fill in). Also "in-route" sounds a bit weird to me, maybe
> something like "Add via location" would sound better?
> So something like:
> /* Translators: this is a tooltip */
> this._button.tooltip_text = _("Add via location");
> 
> You will also need to define the _ as the gettext function at the top of
> this file with:
> const _ = imports.gettext.gettext;
> 
> @@ +74,3 @@
>              this._buttonImage.icon_name = 'list-remove-symbolic';
>              this._icon.icon_name = 'maps-point-end-symbolic';
> +            this._button.set_tooltip_text("Remove in-route location");
> 
> Like above…
> 
> @@ +79,3 @@
>              this._buttonImage.icon_name = 'route-reverse-symbolic';
>              this._icon.icon_name = 'maps-point-end-symbolic';
> +            this._button.set_tooltip_text("Reverse Route");
> 
> I think we should probably not use title case for tooltip texts, so "Reverse
> route"

Thanks for helping me out with this. I've made the changes to the code and I'll follow the proper commit guidelines in my next patch. But I'm stuck with how to mark the string translatable.

Also, can you please guide me to some good documentation so that I can understand the code on my own as it would help me with solving other bugs.
Comment 26 Marcus Lundblad 2018-01-18 07:44:54 UTC
(In reply to Vibhanshu Vaibhav from comment #25)
> (In reply to Marcus Lundblad from comment #24)
> > Review of attachment 366949 [details] [review] [review] [review]:
> > 
> > We try to follow the GNOME commit message guidelines. The commit message
> > should start with the module name (without the extension .js), the actual
> > file that is changed is appearant from the commit itself. Also there shall
> > not be title case in this string.
> > So something like:
> > routeEntry: Add tooltips for the route planner buttons
> > 
> > ::: src/routeEntry.js
> > @@ +69,3 @@
> >              this._buttonImage.icon_name = 'list-add-symbolic';
> >              this._icon.icon_name = 'maps-point-start-symbolic';
> > +            this._button.set_tooltip_text("Add in-route location");
> > 
> > You could set these using the property directly instead of calling the
> > setter, also the string should be marked as translatable, and along with
> > that I think there should be a comment as a hint for translators that this
> > is a tooltip text (the comment will appear in the translated template files
> > that translators fill in). Also "in-route" sounds a bit weird to me, maybe
> > something like "Add via location" would sound better?
> > So something like:
> > /* Translators: this is a tooltip */
> > this._button.tooltip_text = _("Add via location");
> > 
> > You will also need to define the _ as the gettext function at the top of
> > this file with:
> > const _ = imports.gettext.gettext;
> > 
> > @@ +74,3 @@
> >              this._buttonImage.icon_name = 'list-remove-symbolic';
> >              this._icon.icon_name = 'maps-point-end-symbolic';
> > +            this._button.set_tooltip_text("Remove in-route location");
> > 
> > Like above…
> > 
> > @@ +79,3 @@
> >              this._buttonImage.icon_name = 'route-reverse-symbolic';
> >              this._icon.icon_name = 'maps-point-end-symbolic';
> > +            this._button.set_tooltip_text("Reverse Route");
> > 
> > I think we should probably not use title case for tooltip texts, so "Reverse
> > route"
> 
> Thanks for helping me out with this. I've made the changes to the code and
> I'll follow the proper commit guidelines in my next patch. But I'm stuck
> with how to mark the string translatable.
> 
I forgot to mention that this file also needs to be added to the list in po/POTFILES.in
You could look in src/transitLegRow.js for an example of how to programmatically set tooltip texts on buttons (around line 108).

> Also, can you please guide me to some good documentation so that I can
> understand the code on my own as it would help me with solving other bugs.

We don't currenly have any good overall architectural overview of the source (we probably should, though). But at least some is at https://wiki.gnome.org/Apps/Maps/Resources, such as links to GJS docs.
Comment 27 Marcus Lundblad 2018-01-18 07:49:21 UTC
(In reply to Marcus Lundblad from comment #26)
> (In reply to Vibhanshu Vaibhav from comment #25)
> > (In reply to Marcus Lundblad from comment #24)
> > > Review of attachment 366949 [details] [review] [review] [review] [review]:
> > > 
> > > We try to follow the GNOME commit message guidelines. The commit message
> > > should start with the module name (without the extension .js), the actual
> > > file that is changed is appearant from the commit itself. Also there shall
> > > not be title case in this string.
> > > So something like:
> > > routeEntry: Add tooltips for the route planner buttons
> > > 
> > > ::: src/routeEntry.js
> > > @@ +69,3 @@
> > >              this._buttonImage.icon_name = 'list-add-symbolic';
> > >              this._icon.icon_name = 'maps-point-start-symbolic';
> > > +            this._button.set_tooltip_text("Add in-route location");
> > > 
> > > You could set these using the property directly instead of calling the
> > > setter, also the string should be marked as translatable, and along with
> > > that I think there should be a comment as a hint for translators that this
> > > is a tooltip text (the comment will appear in the translated template files
> > > that translators fill in). Also "in-route" sounds a bit weird to me, maybe
> > > something like "Add via location" would sound better?
> > > So something like:
> > > /* Translators: this is a tooltip */
> > > this._button.tooltip_text = _("Add via location");
> > > 
> > > You will also need to define the _ as the gettext function at the top of
> > > this file with:
> > > const _ = imports.gettext.gettext;
> > > 
> > > @@ +74,3 @@
> > >              this._buttonImage.icon_name = 'list-remove-symbolic';
> > >              this._icon.icon_name = 'maps-point-end-symbolic';
> > > +            this._button.set_tooltip_text("Remove in-route location");
> > > 
> > > Like above…
> > > 
> > > @@ +79,3 @@
> > >              this._buttonImage.icon_name = 'route-reverse-symbolic';
> > >              this._icon.icon_name = 'maps-point-end-symbolic';
> > > +            this._button.set_tooltip_text("Reverse Route");
> > > 
> > > I think we should probably not use title case for tooltip texts, so "Reverse
> > > route"
> > 
> > Thanks for helping me out with this. I've made the changes to the code and
> > I'll follow the proper commit guidelines in my next patch. But I'm stuck
> > with how to mark the string translatable.
> > 
> I forgot to mention that this file also needs to be added to the list in
> po/POTFILES.in
> You could look in src/transitLegRow.js for an example of how to
> programmatically set tooltip texts on buttons (around line 108).
> 
And the _("...") wrapper is what makes the string marked for translation (it actually invokes the gettext function to lookup a translation for that string (that's what the imports.gettext.gettext defines).

> > Also, can you please guide me to some good documentation so that I can
> > understand the code on my own as it would help me with solving other bugs.
> 
> We don't currenly have any good overall architectural overview of the source
> (we probably should, though). But at least some is at
> https://wiki.gnome.org/Apps/Maps/Resources, such as links to GJS docs.
Comment 28 Vibhanshu Vaibhav 2018-01-18 09:33:18 UTC
Created attachment 366997 [details] [review]
Tooltips to route planner buttons
Comment 29 Vibhanshu Vaibhav 2018-01-18 09:35:32 UTC
Created attachment 366998 [details] [review]
routeEntry: Add tooltips to route planner buttons
Comment 30 Marcus Lundblad 2018-01-18 20:32:09 UTC
Created attachment 367042 [details] [review]
routeEntry: Add tooltips to route location buttons
Comment 31 Marcus Lundblad 2018-01-18 20:34:24 UTC
Review of attachment 366997 [details] [review]:

LGTM (the patch wasn't formatted correctly as a git patch and tagged with the bug URL, but I fixed that)
Comment 32 Marcus Lundblad 2018-01-18 20:35:10 UTC
Comment on attachment 367042 [details] [review]
routeEntry: Add tooltips to route location buttons

Attachment 367042 [details] pushed as 3baa45e - routeEntry: Add tooltips to route location buttons
Comment 33 Vibhanshu Vaibhav 2018-01-19 02:29:52 UTC
(In reply to Marcus Lundblad from comment #31)
> Review of attachment 366997 [details] [review] [review]:
> 
> LGTM (the patch wasn't formatted correctly as a git patch and tagged with
> the bug URL, but I fixed that)

Thanks a lot. :)