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 711349 - Popup notification RTL problem.
Popup notification RTL problem.
Status: RESOLVED OBSOLETE
Product: gnome-shell
Classification: Core
Component: message-tray
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 711254 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-11-03 17:43 UTC by Yakir Sitbon
Modified: 2015-03-17 15:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix-Popup-RTL-LTR-direction (1.04 KB, patch)
2013-11-03 17:48 UTC, Yakir Sitbon
needs-work Details | Review
Screenshot - after the patch (81.25 KB, image/png)
2013-11-03 18:10 UTC, Yosef Or Boczko
  Details
0001-Fix-Popup-RTL-LTR-direction.patch (1.04 KB, patch)
2013-11-20 13:48 UTC, Yakir Sitbon
none Details | Review
messageTray: Fix the direction of popup notification in RTL (2.51 KB, patch)
2014-03-07 14:20 UTC, Yosef Or Boczko
reviewed Details | Review
messageTray: Set the direction of notification by the direction of the UI (2.59 KB, patch)
2014-03-08 17:29 UTC, Yosef Or Boczko
none Details | Review

Description Yakir Sitbon 2013-11-03 17:43:22 UTC
https://bugzilla.gnome.org/show_bug.cgi?id=711254

That's problem with gnome-shell. I have solution for this. Just check direction by default system and not by Title.
Comment 1 Yakir Sitbon 2013-11-03 17:48:38 UTC
Created attachment 258872 [details] [review]
Fix-Popup-RTL-LTR-direction
Comment 2 Yosef Or Boczko 2013-11-03 17:58:52 UTC
I can to verify - the patch fix the bug 711254,
and also more bugs with the notifications in RTL.
Comment 3 Yosef Or Boczko 2013-11-03 17:59:44 UTC
*** Bug 711254 has been marked as a duplicate of this bug. ***
Comment 4 drago01 2013-11-03 18:03:32 UTC
Review of attachment 258872 [details] [review]:

Prepend a "messageTray:" to the commit message, otherwise fine.
Comment 5 Yosef Or Boczko 2013-11-03 18:10:07 UTC
Created attachment 258874 [details]
Screenshot - after the patch

We need to align the content of the notification.
The label in the notification itself align to right
also if the content of the label is in English, and
also if the content of the label is in Hebrew.

I think it relate to bug 710241.
Comment 6 Florian Müllner 2013-11-03 18:14:51 UTC
For reference, this was done in bug 646921 where the conclusion was that the alignment should actually depend on the actual text.
I don't care one way or the other, but I wouldn't want to change back and forth because we can't make up our mind how non-RTL notifications should behave in RTL locales ...
Comment 7 Florian Müllner 2013-11-03 18:16:48 UTC
See https://bugzilla.gnome.org/show_bug.cgi?id=646921#c9 in particular.
Comment 8 Jasper St. Pierre (not reading bugmail) 2013-11-03 18:37:49 UTC
Review of attachment 258872 [details] [review]:

Besides Florian's comments (which we should probably check with yoseforb and elad about), you should remove this._titleDirection entirely, along with the set_text_direction call below, as the comment is now wrong.

You will need to fix _bannerBoxallocate to use actor.get_text_direction() rather than this._titleDirection as well...
Comment 9 Yakir Sitbon 2013-11-17 15:05:43 UTC
http://fpaste.org/51842/13836745/
Comment 10 Yakir Sitbon 2013-11-20 13:48:19 UTC
Created attachment 260310 [details] [review]
0001-Fix-Popup-RTL-LTR-direction.patch
Comment 11 Yosef Or Boczko 2014-03-07 14:20:08 UTC
Created attachment 271237 [details] [review]
messageTray: Fix the direction of popup notification in RTL
Comment 12 Florian Müllner 2014-03-07 14:52:05 UTC
Review of attachment 271237 [details] [review]:

Code looks good now. Still, I do want Elad to take a look at this, as he was very involved in defining the current behavior (e.g. "latin chat notifications look wrong when right-aligned"). Also please provide a proper commit message - "Fix foo" is OK if something is obviously broken, but this is changing behavior from something some people consider correct to something other people consider correct, so there should be some justification for the change.
Comment 13 Jasper St. Pierre (not reading bugmail) 2014-03-07 14:54:36 UTC
Review of attachment 271237 [details] [review]:

::: js/ui/messageTray.js
@@ +643,3 @@
         this._titleLabel.clutter_text.set_markup('<b>' + title + '</b>');
 
+        this._table.set_text_direction(Clutter.get_default_text_direction());

This line shouldn't be needed.
Comment 14 Yosef Or Boczko 2014-03-08 17:29:35 UTC
Created attachment 271326 [details] [review]
messageTray: Set the direction of notification by the direction of the UI
Comment 15 Elad Alfassa 2014-03-08 21:05:23 UTC
No, this patch is obviously wrong.

The text in the notification should be aligned in the direction in which it's easier to read, therefor LTR languages should be aligned to the left and displayed as LTR.

Other places in the the system, such as gtk input boxes, or Empathy message viewing behave the same. Notifications should stay the way they are now.

You need to make a distinction between system direction and content direction. As an English speaker, you wouldn't want to see English test displayed as if it was LTR, and English text in notifications is still possible in a system with an RTL locale. Same things go the other way around, I might get an email message with a title in Hebrew, I want it to be aligned to the right and displayed as RTL text so I can properly read it even if my system locale is English.

This bug makes no sense to me, as the behavior we have right now is the correct and logical behavior. Look at Yosef's screenshot, does this really look okay to you? the text is displayed in the wrong direction, and reading it is harder than reading it if it wad displayed in the correct direction.
Comment 16 Elad Alfassa 2014-03-08 21:26:57 UTC
Better explanation, because Yosef claims this screenshot is unrelated. I really don't understand how a bug like this without a proper description is even an acceptable bug. Anyway,

Text should ALWAYS be aligned to the direction of the text. You really DON'T want to have a case where punctuation marks are in the wrong location. You want text to ALWAYS be as readable as it can be. LTR text aligned to the left, RTL text aligned to the right. The title of the notification and the content of the notification should NOT affect each other. They are individuals, and so is their direction. Each of them should be aligned separately. 

Music notifications is special-case. The title of the song should be aligned as per the content, but the media button themselves should conform with the system direction, they shouldn't flip if you have one song with a Hebrew title and another with an English title. They should also be identical to the direction of the buttons in Music and Rhytmbox: inconsistency is a bad thing.

When a notification has an icon or a picture, the position of the icon or the picture should be decided by the system locale and be consistent, otherwise you might get one notification with the picture in the left, and another with the picture in the right and that should not happen.

These should be the proper guidelines for RTL/LTR handling in notifications, and I'm sure Yosef would agree with these.

Whatever you do, do NOT set the direction of the notification by the system locale's direction, because this will mean people with LTR locales getting messages in any RTL language, or people with RTL locales getting messages in any LTR language will have hard time reading the messages they receive.
Comment 17 Florian Müllner 2015-03-17 15:23:37 UTC
This was obsoleted by the new notification design - title/summary are no longer on the same line, so simply following the default text direction should be fine, and a consistent text direction clearly works better with the vertical message list in the calendar.