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 756325 - Roomlist: Highlight the room row I have right clicked
Roomlist: Highlight the room row I have right clicked
Status: RESOLVED FIXED
Product: polari
Classification: Applications
Component: general
3.18.x
Other Linux
: Normal enhancement
: ---
Assigned To: Polari maintainers
Polari maintainers
Depends on:
Blocks:
 
 
Reported: 2015-10-09 23:58 UTC by Bastian Ilsø
Modified: 2015-10-28 20:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
picture of current behavior and suggested behavior (25.43 KB, image/png)
2015-10-09 23:58 UTC, Bastian Ilsø
  Details
Bug 756325 - Roomlist: Highlight the room row I have right clicked (1.70 KB, patch)
2015-10-23 03:20 UTC, Isabella Ribeiro
needs-work Details | Review
Roomlist: Highlight the room row which the popup connects to (2.01 KB, patch)
2015-10-28 19:42 UTC, Isabella Ribeiro
committed Details | Review

Description Bastian Ilsø 2015-10-09 23:58:26 UTC
Created attachment 313000 [details]
picture of current behavior and suggested behavior

When hovering over a row, there is a nice grey highlight on it. However, when I right-click the row the highlight dissapears as the right-click popup appears. We should keep the highlight around until I close the right-click popup again, so it is visually clear what room the right-click popup is connected to.
Comment 1 Isabella Ribeiro 2015-10-19 21:06:19 UTC
I'm working on this bug.
Comment 2 Isabella Ribeiro 2015-10-23 03:20:02 UTC
Created attachment 313905 [details] [review]
Bug 756325 - Roomlist: Highlight the room row I have right clicked
Comment 3 Florian Müllner 2015-10-23 08:52:54 UTC
Review of attachment 313905 [details] [review]:

Apart from the issues pointed out below, please provide a more detailed commit message - https://wiki.gnome.org/Newcomers/CodeContributionWorkflow#Commit_guidelines has some guidelines. This is not a very complicated change, so it doesn't have to be very long, but please
 - outline the reason why the change is made
 - try to be precise (it's about showing the popover, not right-click - <shift>F10 also brings up the popover)

::: data/resources/application.css
@@ +73,3 @@
 }
 
+.polari-room-list .list-row.has-open-popover{

Style nit: space before brace

@@ +74,3 @@
 
+.polari-room-list .list-row.has-open-popover{
+    background-color: @polari_dark_bg_color;

This works fine for "normal" rows, but we don't want it for the selected one, see GtkPlacesSidebar for reference (run "jhbuild run gtk3-demo", run the "picker" demo and click the "file" button)

::: src/roomList.js
@@ +26,3 @@
         this._popover = Gtk.Popover.new_from_model(this.widget, menu);
+        this._popover.connect('notify::visible', Lang.bind(this,
+         	function() {

Indentation is four spaces, not tab.

@@ +29,3 @@
+         		let roomContext = this.widget.get_style_context();
+         		if (this._popover.visible)
+         			roomContext.add_class('has-open-popover');

'has-open-popover' makes more sense than 'has-open-popup', but I would still use the latter, because it's used by GtkPlacesSidebar - if we can get the designers to support it for any GtkListRow, we get the CSS for free.
Comment 4 Isabella Ribeiro 2015-10-28 19:42:44 UTC
Created attachment 314340 [details] [review]
Roomlist: Highlight the room row which the popup connects to

Should be visually clear what room the opened popup is connected to.

This fix highlights the room which the popup belongs to.
Comment 5 Florian Müllner 2015-10-28 20:00:30 UTC
Review of attachment 314340 [details] [review]:

Looks good to me - I'll push with the changes pointed out below

::: data/resources/application.css
@@ +75,3 @@
+.polari-room-list .list-row.has-open-popup {
+    background-color: @polari_dark_bg_color;
+}

We only need those changes on the 3-18 branch - for master, Adwaita already provides all the styling for the .has-open-popup class we need.

::: src/roomList.js
@@ +30,3 @@
+                if (this._popover.visible)
+                    roomContext.add_class('has-open-popup');
+                else 

Nit: trailing whitespace
Comment 6 Florian Müllner 2015-10-28 20:01:22 UTC
Attachment 314340 [details] pushed as f5dfe9b - Roomlist: Highlight the room row which the popup connects to