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 686472 - Incorrect badge placement
Incorrect badge placement
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: message-tray
3.6.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-10-19 15:32 UTC by Allan Day
Modified: 2012-12-03 10:26 UTC
See Also:
GNOME target: ---
GNOME version: 3.7/3.8


Attachments
17x13 overlap 2.4em size (190.73 KB, image/png)
2012-10-24 18:28 UTC, Carlos Soriano
  Details
The same configuration but clipped to see it better (14.01 KB, image/png)
2012-10-24 18:32 UTC, Carlos Soriano
  Details
gnome-shell.css: Adjust missed message counter size and position from message tray items to not obscure them. (1.07 KB, patch)
2012-10-25 13:09 UTC, Carlos Soriano
needs-work Details | Review
Current patch in lock screen (625.87 KB, image/png)
2012-10-25 19:29 UTC, Giovanni Campagna
  Details
MessageTray, screenShield: Adjust missed message counter size and position from message tray and screenShield items to not obscure them. Also, add some padding in screenShield notifications to make space to the new position of the badge. (1.71 KB, patch)
2012-11-14 21:35 UTC, Carlos Soriano
none Details | Review
tweaked patch (1.71 KB, patch)
2012-11-20 10:55 UTC, Allan Day
none Details | Review
MessageTray, screenShield: Adjust missed message counter size and position and add some padding in screenShield notifications to not obscure the items below the missed message counter. (1.66 KB, patch)
2012-11-28 17:29 UTC, Carlos Soriano
none Details | Review
MessageTray, ScreenShield: adjust missed message counter (1.67 KB, patch)
2012-11-28 19:54 UTC, Carlos Soriano
accepted-commit_now Details | Review
MessageTray, ScreenShield: adjust missed message counter (1.67 KB, patch)
2012-11-28 20:21 UTC, Carlos Soriano
committed Details | Review

Description Allan Day 2012-10-19 15:32:54 UTC
When there are missed messages from a message tray item, we display a badge with a count of the number of missed message. Right now, that badge is placed too centrally, so that it obscures a large part of the tray item. In the case of chat contacts, this often results in the badge overlapping a large portion of their face.

It would be better if the badges were moved so that they are overhanging the edge of tray items and do not overlap as much.
Comment 1 Carlos Soriano 2012-10-24 18:28:41 UTC
Created attachment 227185 [details]
17x13 overlap 2.4em size
Comment 2 Carlos Soriano 2012-10-24 18:32:23 UTC
Created attachment 227187 [details]
The same configuration but clipped to see it better
Comment 3 Carlos Soriano 2012-10-24 18:36:43 UTC
After few tries this is the better.

The badge is moved to the right more than to down, because the visual effect seeing it from distance if the badge is too down is ugly. Instead, the visual effect to the right is not ugly.
Also the badge is a little smaller than before, to let more space to the avatar, but without overlapping the text counter with two digits.

If you like it tell me and I'll push the patch.
Comment 4 Allan Day 2012-10-25 11:45:54 UTC
(In reply to comment #2)
> Created an attachment (id=227187) [details]
> The same configuration but clipped to see it better

Thanks for looking at this, Carlos. The screenshot looks good to me: can you post your patch here for review?
Comment 5 Carlos Soriano 2012-10-25 13:09:25 UTC
Created attachment 227248 [details] [review]
gnome-shell.css: Adjust missed message counter size and position from message tray items to not obscure them.
Comment 6 Carlos Soriano 2012-10-25 13:12:08 UTC
I haven't got commit permission, so if the patch is good, commit it. 
Thanks
Comment 7 Giovanni Campagna 2012-10-25 16:53:10 UTC
Review of attachment 227248 [details] [review]:

There is a problem with this patch: the same counters are used in the lock screen, and there the counter is clipped.
You need either to fix the sizing of SourceActors to include the counters (which would probably mess the message tray), or have a different style in the lock screen.
Comment 8 Carlos Soriano 2012-10-25 17:59:08 UTC
Giovanni,

Probably we want to approximate the style of both counters, so I will try with different configurations to try to use the same style for both, once I finally know how to run lock-screen in jhbuild.
Comment 9 Jasper St. Pierre (not reading bugmail) 2012-10-25 18:21:53 UTC
(In reply to comment #7)
> Review of attachment 227248 [details] [review]:
> 
> There is a problem with this patch: the same counters are used in the lock
> screen, and there the counter is clipped.
> You need either to fix the sizing of SourceActors to include the counters
> (which would probably mess the message tray), or have a different style in the
> lock screen.

Where / why do we clip the actor?
Comment 10 Giovanni Campagna 2012-10-25 19:28:43 UTC
I have no idea, but I can provide you with a screenshot if you want.
Comment 11 Giovanni Campagna 2012-10-25 19:29:26 UTC
Created attachment 227298 [details]
Current patch in lock screen
Comment 12 Jasper St. Pierre (not reading bugmail) 2012-10-25 19:36:21 UTC
Best guess is the scroll view, not allowing things to paint outside of its allocation. I'm not sure what the best solution is for that -- maybe modify the scroll to not push a clip at all if we don't need it?
Comment 13 Allan Day 2012-11-01 10:20:04 UTC
(In reply to comment #12)
> Best guess is the scroll view, not allowing things to paint outside of its
> allocation. I'm not sure what the best solution is for that -- maybe modify the
> scroll to not push a clip at all if we don't need it?

I'm not exactly sure what that means, so at the risk of sounding stupid - wouldn't it make sense to adjust the layout of the list so that each "cell" in the list can accommodate a badge if necessary?

Looking at the mockups, there is quite a bit of padding between each item:

https://raw.github.com/gnome-design-team/gnome-mockups/master/system-lock-login-boot/lock.png
Comment 14 Jasper St. Pierre (not reading bugmail) 2012-11-01 13:32:56 UTC
(In reply to comment #13)
> (In reply to comment #12)
> I'm not exactly sure what that means, so at the risk of sounding stupid -
> wouldn't it make sense to adjust the layout of the list so that each "cell" in
> the list can accommodate a badge if necessary?

Yeah, that's an easier solution. By the way, do we want to move the badge in the message tray as well?
Comment 15 Allan Day 2012-11-02 10:26:13 UTC
(In reply to comment #14)
> By the way, do we want to move the badge in
> the message tray as well?

I'm not sure what you mean there.
Comment 16 Jasper St. Pierre (not reading bugmail) 2012-11-02 15:18:43 UTC
The mockup has the badge at the top right. Do we want that for the lock screen only, or for the tray too?
Comment 17 Allan Day 2012-11-02 16:39:05 UTC
(In reply to comment #16)
> The mockup has the badge at the top right. Do we want that for the lock screen
> only, or for the tray too?

Oh I see. No, I'd keep them both in the bottom right like we currently have.
Comment 18 Carlos Soriano 2012-11-14 21:32:15 UTC
patch working:
http://postimage.org/image/jrpy8mk5l/

changed position of the badge to 13px at the right, because in the previous patch the badge overlaps a little the notification "square glow" at the right in the message tray.
Comment 19 Carlos Soriano 2012-11-14 21:35:59 UTC
Created attachment 229013 [details] [review]
MessageTray, screenShield: Adjust missed message counter size and position from message tray and screenShield items to not obscure them. Also, add some padding in screenShield notifications to make space to the new position of the badge.
Comment 20 Allan Day 2012-11-20 10:55:50 UTC
Created attachment 229462 [details] [review]
tweaked patch

Looks great to me! One small tweak - I'd reduce the padding between the icon and the text for notifications in the lock screen (I've updated the patch).
Comment 21 Carlos Soriano 2012-11-20 11:07:36 UTC
Oh, ok, I augmented the padding because it was more vision-relaxed to me, but ok =)
Comment 22 Giovanni Campagna 2012-11-24 02:40:19 UTC
I saw that this is marked NEEDS REVIEW in the wiki page.
The patch looks fine to me, and it seems to work fine too.

You can consider this an accepted-commit_now, as long as you rewrite the commit message using the proper format of summary (~ 85 chars) and longer word wrapped description.
Thank you!
Comment 23 Carlos Soriano 2012-11-28 17:29:28 UTC
Created attachment 230105 [details] [review]
MessageTray, screenShield: Adjust missed message counter size and position and add some padding in screenShield notifications to not obscure the items below the missed message counter.
Comment 24 Carlos Soriano 2012-11-28 17:33:56 UTC
Is the commit message good now? Maybe my English is not good. Tell me something if it is not.
Thanks!
Comment 25 Giovanni Campagna 2012-11-28 18:40:34 UTC
The content of the commit message is fine, but it should be formatted as summary

'''
One line of summary

Longer multi-line description.
'''

I would go with:

MessageTray, ScreenShield: adjust missed message counter

Fix counter size and position and add some padding in
ScreenShield notifications to not obscure the items below
the missed message counter.
Comment 26 Carlos Soriano 2012-11-28 19:54:54 UTC
Created attachment 230121 [details] [review]
MessageTray, ScreenShield: adjust missed message counter

Fix counter size and position and add some padding in
ScreenShield notifications to not obscure the items below
the missed message counter.
Comment 27 Carlos Soriano 2012-11-28 19:56:13 UTC
Thanks Giovanni, I didn't know I have to do it in this manner.
Comment 28 Jasper St. Pierre (not reading bugmail) 2012-11-28 20:01:35 UTC
Review of attachment 230121 [details] [review]:

Seems to have a whitespace issue. Good to commit with that fixed.

::: data/theme/gnome-shell.css
@@ +2313,3 @@
 
+.screen-shield-notification-count-text {
+	padding: 0px 18px;

No tabs.
Comment 29 Carlos Soriano 2012-11-28 20:21:43 UTC
Created attachment 230129 [details] [review]
MessageTray, ScreenShield: adjust missed message counter

Fix counter size and position and add some padding in
ScreenShield notifications to not obscure the items below
the missed message counter.
Comment 30 Carlos Soriano 2012-11-28 20:23:37 UTC
Sorry for that Jasper. Good catch.
Comment 31 Giovanni Campagna 2012-12-02 22:22:49 UTC
Pushed as Carlos doesn't have commit rights yet.
Attachment 230129 [details] pushed as 00c78d3 - MessageTray, ScreenShield: adjust missed message counter
Comment 32 Allan Day 2012-12-03 10:26:15 UTC
Awesome. Very happy to see this fixed.