Closed Bug 1227711 Opened 9 years ago Closed 9 years ago

Add a box-shadow to the XUL alerts

Categories

(Toolkit :: Themes, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox43 --- wontfix
firefox44 --- affected
firefox45 --- fixed

People

(Reporter: jaws, Assigned: jaws)

References

Details

Attachments

(2 files, 1 obsolete file)

      No description provided.
Per the spec at https://mozilla.invisionapp.com/share/3A4A895XZ#/screens/104465677 we should have a 30px box-shadow on the notifications.

Unfortunately, I'm having trouble getting mouse events to pass through the box-shadow, and the shadows are overlapping other notifications, meaning that it blocks access to older notifications. As a result, I've set the shadow to have a 10px blur radius.
Attached patch Patch (obsolete) — Splinter Review
Attachment #8691543 - Flags: review?(MattN+bmo)
Comment on attachment 8691543 [details] [diff] [review]
Patch

Review of attachment 8691543 [details] [diff] [review]:
-----------------------------------------------------------------

::: toolkit/components/alerts/resources/content/alert.js
@@ +9,5 @@
>  const NS_ALERT_LEFT = 2;
>  const NS_ALERT_TOP = 4;
>  
> +const WINDOW_MARGIN = 0;
> +const WINDOW_SHADOW_SPREAD = 10;

Should WINDOW_SHADOW_SPREAD be 10 on non-Windows too?

::: toolkit/themes/windows/global/alerts/alert.css
@@ +20,5 @@
>    border: 1px solid ThreeDShadow;
>    border-radius: 1px;
>    background-color: -moz-Dialog;
>    color: -moz-DialogText;
> +  box-shadow: 0 2px 10px rgba(0,0,0,0.59);

I don't really want to churn on this if we're going to uplift it so I think we should get ui-review on 10px first.
Attachment #8691543 - Flags: review?(MattN+bmo)
Attached image Screenshot of patch
Stephen, can you give ui-r on the adjusted box-shadow here? (The alignment of the close button is handled by bug 1227717).
Attachment #8691595 - Flags: ui-review?(shorlander)
Comment on attachment 8691595 [details]
Screenshot of patch

Looks good to me. Thanks!
Attachment #8691595 - Flags: ui-review?(shorlander) → ui-review+
Attached patch Patch v2Splinter Review
Thanks for the ui-review shorlander. The patch now uses AppCosntants to only apply the shadow adjustments on Windows, and keeps the window margin on non-Windows.

I also fixed the positioning of the notification to have the correct offset from the corner of the screen as pointed out in today's status meeting. This places the first notification 10 pixels higher than what is shown in the already attached screenshot.
Attachment #8691543 - Attachment is obsolete: true
Attachment #8694415 - Flags: review?(MattN+bmo)
Comment on attachment 8694415 [details] [diff] [review]
Patch v2

Review of attachment 8694415 [details] [diff] [review]:
-----------------------------------------------------------------

Btw. notifications seems a little tight together (external vertical spacing) on OS X (not changed by this patch). I've asked phlsa to spec the spacing between notifications.

::: toolkit/themes/windows/global/alerts/alert.css
@@ +20,5 @@
>    border: 1px solid ThreeDShadow;
>    border-radius: 1px;
>    background-color: -moz-Dialog;
>    color: -moz-DialogText;
> +  box-shadow: 0 2px 10px rgba(0,0,0,0.59);

This is good in the Windows stylesheet since we get the shadow for free on OS X already and Linux doesn't have transparency yet to support this.
Attachment #8694415 - Flags: review?(MattN+bmo) → review+
https://hg.mozilla.org/mozilla-central/rev/10a9cf7c54fa
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: