Notification Message Truncated
Reported by
mtay...@pushnami.com,
Nov 16 2017
|
||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36 Steps to reproduce the problem: 1. Invoke ServiceWorkerRegistration.showNotification() passing a message "Welcome - Successfully Subscribed". Alternatively - 1. Clone https://github.com/mtaylor22/simple-push-demo 2. gulp dev 3. Enable notifications 4. Click "SEND A PUSH VIA XHR" What is the expected behavior? The notification message should appear as "Welcome - Successfully Subscribed" What went wrong? The notification message appears as "Welcome - Successfully" Did this work before? Yes 58.0.3029.96 Does this work in other browsers? N/A Chrome version: 62.0.3202.94 Channel: stable OS Version: 6.1 (Windows 7, Windows Server 2008 R2) Flash Version: The behavior appears to clip the last word where a line break causes only one word on the second line.
,
Nov 17 2017
"We downloaded the zip file from the URL provided, i.e., https://github.com/mtaylor22/simple-push-demo and tried adding the extensions to chrome in order to get the notifications by enabling deverloper mode, we are unable to add the extension from the downloaded file. @Reporter: Could you please provide a sample extension file to triage the issue further. Thanks!"
,
Nov 17 2017
The fork is now published at https://mtaylor22.github.io/simple-push-demo/ for reference. The simplest way to reproduce the bug on Chrome (stable) would be following exactly these steps: 1. navigate to https://mtaylor22.github.io/simple-push-demo/ 2. enable notifications 3. Click "SEND A PUSH VIA XHR" What is the expected behavior? The notification message should appear as "Welcome - Successfully Subscribed" What went wrong? The notification message appears as "Welcome - Successfully"
,
Nov 17 2017
Thank you for providing more feedback. Adding requester "vamshi.kommuri@techmahindra.com" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 20 2017
Able to reproduce the issue on reported version 62.0.3202.94 and on chrome version # 64.0.3272.0 using Windows 10 hence providing bisect info NOTE: This is not applicable to Mac 10.12.6 and Ubuntu 14.04 Manual Bisect Info: ================ Good build: 62.0.3187.0 Bad build: 62.0.3188.0 You are probably looking for a change made after 494703 (known good), but no later than 494704 (first known bad). CHANGELOG URL: https://chromium.googlesource.com/chromium/src/+log/101b811383bbcdefaa86e864275afbea17d902f8..97156ad7e3aaf12a766c5e69d457ad15f492690b Suspecting same from changelog. @yhanada: Please confirm the issue and help in re-assigning if it is not related to your change. Thanks!
,
Nov 20 2017
Thank you for the bug report! yhanada's change actually fixed a bug, so it was the right thing to do. The lack of title space is unfortunate. I wonder if we could consider eliding the title instead of dropping the entire last word?
,
Nov 20 2017
,
Nov 22 2017
Hello, We ran into this bug also with cut title. Can you tell the approximate fix date of this bug, please? Thank you.
,
Nov 22 2017
As BoundedLabel has eliding functionality, this might be caused by using BoundedLabel wrongly in my change. AFAIK, the new material design notification doesn't have this issue. I will take a look, but it will be after M-64, so I appreciate it if anyone could take over this issue.
,
Nov 22 2017
Playing around with this, I see the following behaviour: - Anything that fits on a single line is fine. - Anything that definitely needs wrapping is fine. - Anything that *might* need wrapping (i.e. would have fit until we shrunk the label) is being cut-off. I might be able to take a more in-depth look later on, but don't have time for it at least this week either.
,
Nov 22 2017
re: c6 and c10 - eliding vs. wrapping: if we can get wrapping to work for the 3rd bullet on c10, that'd be great for usefulness. Thanks!
,
Dec 1 2017
,
Dec 3 2017
,
Dec 3 2017
By the way, this can be reproduced using much less code (even on this page) -
Notification.requestPermission(() => new Notification("Welcome - Successfully Subscribed"));
,
Dec 6 2017
Issue 792350 has been merged into this issue.
,
Jan 15 2018
Issue 781690 has been merged into this issue.
,
Jan 19 2018
,
Jan 30 2018
,
Jan 30 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ecc9db734979ea7db10a7add238984af49113e1e commit ecc9db734979ea7db10a7add238984af49113e1e Author: Tetsui Ohkubo <tetsui@chromium.org> Date: Tue Jan 30 23:26:56 2018 Remove icon view from layout when no icon available. Previously, |icon_view_| was created even if the notification does not have an icon, and changing is visibility by icon_view_->SetVisible(). However, ProportionalImageView always returns the fixed image size and FillLayout does not take visibility into account. As a result, |right_content_| always occupied the right side even if there is no icon. By this CL, the behavior is changed as follows: * When icon is available, * icon_view_->visible() always returns true. * right_content_->visible() may return false. (in case of use_image_for_icon) * When icon is not available, * icon_view_ is null. * right_content_->visible() always returns false. Before: http://screen/5KwSgEQQBaH After: http://screen/ym6upUfc1qc (Pressing Shift-Esc to show the notification) TEST=message_center_unittests BUG= 785589 Change-Id: Ie3c133c82947681565cd07ddfada0c17a87dc591 Reviewed-on: https://chromium-review.googlesource.com/891079 Commit-Queue: Tetsui Ohkubo <tetsui@chromium.org> Reviewed-by: Evan Stade <estade@chromium.org> Cr-Commit-Position: refs/heads/master@{#533079} [modify] https://crrev.com/ecc9db734979ea7db10a7add238984af49113e1e/ui/message_center/views/notification_view_md.cc [modify] https://crrev.com/ecc9db734979ea7db10a7add238984af49113e1e/ui/message_center/views/notification_view_md.h [modify] https://crrev.com/ecc9db734979ea7db10a7add238984af49113e1e/ui/message_center/views/notification_view_md_unittest.cc
,
Jun 18 2018
I ran into this issue as well on Windows 10. When I use this title:
[Urgent] Submit a seller proposal
it gets truncated to this:
[Urgent] Submit a seller
I spent some time trying to get to the root cause of this bug and and appears to be related to how title_view_ inside NotificationView is sized. If I remove the right padding from it, i.e. replace this code in MakeTextBorder:
return MakeEmptyBorder(padding / 2 + top, kTextLeftPadding,
(padding + 1) / 2 + bottom, kTextRightPadding);
with this:
return MakeEmptyBorder(padding / 2 + top, kTextLeftPadding,
(padding + 1) / 2 + bottom, 0);
However, as I have no experience with the UI framework used by Chromium I don't know if this is a good solution. It may break something.
I hope this helps.
,
Jun 18 2018
It's also funny that if I use a slightly longer title the text is not truncated. From my experiments if the title length is between 26 and 33 characters it gets cut off, if it's shorter or longer than that it's rendered fine. I'm currently working on a website where notification titles can have dynamic length (i.e. their content is not static), sadly this workaround can't be applied. It would be really great if this bug was fixed.
,
Jul 4
Any news on this issue? Should I submit a patch or somebody is working on it?
,
Jul 4
It looks like Chrome 68 would switch to native notifications for Windows 10 which would not have this bug to my understanding. It was reported as not applicable to Mac 10.12.6 and Ubuntu 14.04, so I am not sure which OS versions would still have the bug at that point.
,
Jul 5
#20: This fix is not correct. This is a bug in message_center::BoundedLabel. #23: Win 7, some Linux distro, and Chrome OS still have this bug.
,
Oct 22
,
Nov 16
,
Nov 16
,
Nov 21
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b55473e5c6756e806b755b4994e5a1898da2105a commit b55473e5c6756e806b755b4994e5a1898da2105a Author: Richard Knoll <knollr@chromium.org> Date: Wed Nov 21 21:43:31 2018 fix: do not crop notification titles If a notification title is between 22 and 26 characters long, it might get truncated in the view. This is because we calculate different line counts for a title in the layout and draw phases. This is related to crbug.com/682266. Instead of relying on the layout phase, we now just set a wider right-border on the first element in the view, to make space for the control buttons. Bug: 785589 Change-Id: I4c6e157d732065224612766dbe02a3f21f377b2f Reviewed-on: https://chromium-review.googlesource.com/c/1341924 Commit-Queue: Richard Knoll <knollr@chromium.org> Reviewed-by: Peter Beverloo <peter@chromium.org> Reviewed-by: Yoshiki Iguchi <yoshiki@chromium.org> Cr-Commit-Position: refs/heads/master@{#610225} [modify] https://crrev.com/b55473e5c6756e806b755b4994e5a1898da2105a/ui/message_center/views/bounded_label.cc [modify] https://crrev.com/b55473e5c6756e806b755b4994e5a1898da2105a/ui/message_center/views/bounded_label.h [modify] https://crrev.com/b55473e5c6756e806b755b4994e5a1898da2105a/ui/message_center/views/notification_view.cc [modify] https://crrev.com/b55473e5c6756e806b755b4994e5a1898da2105a/ui/message_center/views/notification_view.h [modify] https://crrev.com/b55473e5c6756e806b755b4994e5a1898da2105a/ui/message_center/views/notification_view_unittest.cc
,
Nov 22
|
||||||||||||||
►
Sign in to add a comment |
||||||||||||||
Comment 1 by nyerramilli@chromium.org
, Nov 16 2017