Closed Bug 786477 Opened 12 years ago Closed 12 years ago

collapsing chatboxes on overflow is wonkey

Categories

(Firefox Graveyard :: SocialAPI, defect)

x86
macOS
defect
Not set
normal

Tracking

(firefox17 fixed)

RESOLVED FIXED
Firefox 18
Tracking Status
firefox17 --- fixed

People

(Reporter: mixedpuppy, Assigned: mixedpuppy)

Details

(Whiteboard: [Fx17][qa?])

Attachments

(1 file, 2 obsolete files)

after css changes in bug 785593 and bug 784272, collapsing chatboxes during overflow doesn't always work right.
Attached patch overflow width.patch (obsolete) — Splinter Review
Assignee: nobody → mixedpuppy
Attachment #656248 - Flags: review?(jaws)
is it possible to find an alternative to not have to use this hardcoded value? otherwise every style change we make will end up breaking this again
(In reply to Jared Wein [:jaws] from comment #3)
> Shane, can you use the XUL overflow event?
> https://developer.mozilla.org/en-US/docs/XUL/Events

we do use overflow.  what doesn't work is using underflow to decide whether to show one of the collapsed chats.  underflow only happens the first underflow, we need to continue checking
An idea: when we collapse a chat due to overflow, we could store its size as an attribute and then use it here.
(In reply to :Felipe Gomes from comment #5)
> An idea: when we collapse a chat due to overflow, we could store its size as
> an attribute and then use it here.

I was trying to avoid that, but it looks like boxObject.width == 0 when collapsed, so we may have to do that.
slightly cleaner would be to assume all chatboxes are the same size and store the size in a field in the chatbar rather than on each chatbox
How does this patch handle minimized chats? They have a different width (160px + 4px margin start).
Attached patch overflow width.patch (obsolete) — Splinter Review
revised patch handles dynamic widths, works well with collapsed chats also.
Attachment #656248 - Attachment is obsolete: true
Attachment #656248 - Flags: review?(jaws)
Attachment #656661 - Flags: review?(jaws)
Attachment #656661 - Flags: review?(felipc)
Attachment #656661 - Flags: review?(felipc) → review+
Comment on attachment 656661 [details] [diff] [review]
overflow width.patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 785593, 784272
User impact if declined: bad ux in socialapi chat boxes
Testing completed (on m-c, etc.): on m-c
Risk to taking this patch (and alternatives if risky): 
String or UUID changes made by this patch: none
Attachment #656661 - Flags: review?(jaws) → approval-mozilla-aurora?
I think you're not supposed to use boxObject.width and use getBoundingClientRect().width instead.
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #12)
> I think you're not supposed to use boxObject.width and use
> getBoundingClientRect().width instead.

That's correct. boxObject.x/y/width/height are deprecated. They both should return the same value for width though, although the latter accounts for applied transforms.
[Approval Request Comment]
fixes poor overflow handling of chat windows
Attachment #656661 - Attachment is obsolete: true
Attachment #656661 - Flags: approval-mozilla-aurora?
Attachment #657363 - Flags: review?(gavin.sharp)
Attachment #657363 - Flags: approval-mozilla-aurora?
Keywords: checkin-needed
Comment on attachment 657363 [details] [diff] [review]
overflow width.patch

No need to ask for re-review for that kind of tweak.
Attachment #657363 - Flags: review?(gavin.sharp)
Attachment #657363 - Flags: approval-mozilla-aurora?
Attachment #657363 - Flags: approval-mozilla-aurora+
checkin-needed for aurora, too
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/b449366e9663
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Can I please get a better definition of "wonky" so I can verify this fixed? Thanks
Whiteboard: [Fx17] → [Fx17][qa?]
(In reply to Anthony Hughes, Mozilla QA (:ashughes) from comment #20)
> Can I please get a better definition of "wonky" so I can verify this fixed?
> Thanks

IIRC you could reproduce by:

open 3 chat windows then resize the window, smaller then larger.  One of the chat windows will overflow off the edge of the browser window rather than collapsing into the button.
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: