The default bug view has changed. See this FAQ.

Create panels with more appropriate default width to avoid mis-aligned anchor

RESOLVED FIXED in Firefox 17

Status

()

Firefox
SocialAPI
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: markh, Assigned: markh)

Tracking

unspecified
Firefox 18
Points:
---

Firefox Tracking Flags

(firefox17+ fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
The panels we create seem to have a default width of around 100x100, before we then resize the panel to fit the content - but still use a fixed width of 330px.  This resize behaviour causes the panel anchor to be in the wrong position when first displayed (see bug 793057).

We can work around that issue by arranging for the panels to always be created with an initial width of 330px.
I think we should kill the max-width while we're at it, either that or make max-width = min(600, screen.width / 2);
(Assignee)

Comment 2

5 years ago
Actually, we don't have a max-width at all - we have a totally fixed width.  The CSS from the amigo currently don't offer any clues we can use at all - if we try and use the offsetWidth, for example, we will end up with all panels being exactly 100px wide (as that is what the CSS says).  I'm hoping to chat with them today about this.

Updated

5 years ago
tracking-firefox17: ? → +
(Assignee)

Comment 3

5 years ago
Created attachment 667818 [details] [diff] [review]
Set the width of the iframe on creation to the panel default width
Assignee: nobody → mhammond
Attachment #667818 - Flags: review?(jaws)
Comment on attachment 667818 [details] [diff] [review]
Set the width of the iframe on creation to the panel default width

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

::: browser/base/content/browser-social.js
@@ +612,5 @@
>          notificationFrame.setAttribute("id", notificationFrameId);
>          notificationFrame.setAttribute("mozbrowser", "true");
> +        // work around bug 793057 - by making the panel roughly the final size
> +        // we are more likely to have the anchor in the correct position.
> +        notificationFrame.style.width = "330px";

Can we set this width in a CSS rule for .social-panel-frame ?
Comment on attachment 667818 [details] [diff] [review]
Set the width of the iframe on creation to the panel default width

Discussed this on IRC and the solution of setting this value in external CSS will propagate a value among various files, removing the containment of a current workaround (the 330px seen elsewhere in browser-social.js).
Attachment #667818 - Flags: review?(jaws) → review+
(Assignee)

Comment 6

5 years ago
As discussed on IRC with Jaws, we are keeping the code where it is, but using the constant PANEL_MIN_WIDTH introduced with bug 797716.

https://hg.mozilla.org/integration/mozilla-inbound/rev/5b5981c2106b
https://hg.mozilla.org/mozilla-central/rev/5b5981c2106b
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 18
Attachment #667818 - Flags: approval-mozilla-aurora+
https://hg.mozilla.org/releases/mozilla-aurora/rev/52b3f1c7ca9a
status-firefox17: --- → fixed
You need to log in before you can comment on or make changes to this bug.