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 706851 - userWidget: Use the user name if the real name doesn't fit
userWidget: Use the user name if the real name doesn't fit
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-08-26 22:59 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2013-10-30 17:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
userWidget: Use the user name if the real name doesn't fit (5.10 KB, patch)
2013-08-26 22:59 UTC, Jasper St. Pierre (not reading bugmail)
reviewed Details | Review
loginDialog: Use UserWidget (3.11 KB, patch)
2013-08-26 22:59 UTC, Jasper St. Pierre (not reading bugmail)
none Details | Review

Description Jasper St. Pierre (not reading bugmail) 2013-08-26 22:59:13 UTC
This is part of the new designs. See patch.
Comment 1 Jasper St. Pierre (not reading bugmail) 2013-08-26 22:59:15 UTC
Created attachment 253201 [details] [review]
userWidget: Use the user name if the real name doesn't fit

This meets the new designs.
Comment 2 Jasper St. Pierre (not reading bugmail) 2013-08-26 22:59:18 UTC
Created attachment 253202 [details] [review]
loginDialog: Use UserWidget
Comment 3 Ray Strode [halfline] 2013-08-28 14:51:49 UTC
Review of attachment 253201 [details] [review]:

::: js/ui/userWidget.js
@@ +109,3 @@
+            this._currentLabel = this._realNameLabel;
+        else
+            this._currentLabel = this._userNameLabel;

so this sort of makes the assumption that user name is shorter than real name, which is often true but not always.  Also, if they both don't fit, I think it would be better to see an ellipsized real name than an ellipsed user name.

@@ +127,3 @@
+        if (this._user.is_loaded) {
+            this._realNameLabel.text = this._user.get_real_name();
+            this._userNameLabel.text = this._user.get_user_name();

don't you need to queue a reallocation in thise case?
Comment 4 Ray Strode [halfline] 2013-08-28 14:54:36 UTC
Review of attachment 253202 [details] [review]:

does this make the user list change appearance?
Comment 5 Jasper St. Pierre (not reading bugmail) 2013-08-28 15:01:01 UTC
(In reply to comment #3)
> so this sort of makes the assumption that user name is shorter than real name,
> which is often true but not always.  Also, if they both don't fit, I think it
> would be better to see an ellipsized real name than an ellipsed user name.

I'm not so sure. In some cultures, it's considered rude to truncate the real name, which is why we show the username instead. I think an ellipsized user name is better than an ellipsized real name, but that's an aday question :)

> don't you need to queue a reallocation in thise case?

The ClutterText/StLabel will queue a relayout for us when the text property changes.