Closed Bug 871204 Opened 12 years ago Closed 11 years ago

Auto fit panel height after exiting customization mode

Categories

(Firefox :: Theme, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 28

People

(Reporter: Alopepeo, Assigned: mconley)

References

(Blocks 1 open bug)

Details

(Whiteboard: [Australis:M7][User Research Build+])

Attachments

(2 files, 1 obsolete file)

Attached image Auto fit issue (deleted) —
1. Enter customization mode. 2. Drag and drop three items of the panel back to the palette. 3. Exit customization mode. 4. Open the panel. Result: The space that was previously used by the removed items is still there. It will not fit until you restart jamun.
Blocks: 770135
No longer blocks: 770135
Whiteboard: [Australis:M7]
Assignee: nobody → mdeboer
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Whiteboard: [Australis:M7] → [Australis:M7][User Research Build+]
Going to steal this - hopefully you hadn't already started on this, Mike!
Assignee: mdeboer → mconley
I did start on it, but I was only investigating atm. So far I didn't come to any conclusions worth sharing here.
Attached patch Patch v1 (obsolete) (deleted) — Splinter Review
Trial and error gave me this. Then again, trial and error gave me the whole panelmultiview implementation in the first place, so I guess it's fitting. Anyhow, this seems to do the job - we hide the main view spring and remove the flex on the main view when the panelmultiview has view="main". That shrinks down the main view to the right height, and then _syncContainerToMainView does the right thing. Bonus, we stop animating the height of the panel unless the panelmultiview has view="subview". This should stop those short instances where the panel seems to expand when it's first deployed.
The only regression I see from this patch is that when the History widget is put into the toolbar, at least on Ubuntu, the "Show All History" button is getting slightly cut off on the bottom. But I'm willing to take that for now and fix down the road.
Attachment #762970 - Flags: review?(jaws)
Bonus - this also appears to fix the bug on Retina displays where the menu panel would sometimes "run away" as you moved your mouse over it after customizing.
Though I can still reproduce it when opening the History subview. :/
Comment on attachment 762970 [details] [diff] [review] Patch v1 Review of attachment 762970 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/components/customizableui/content/panelUI.xml @@ +132,5 @@ > > if (this._mainView) { > this.setMainView(this._mainView); > } > + this.setAttribute("view", "main"); nit, can we change this to "viewType"? I think view= might imply that the value will define which view is actually being shown, {main, historysubview, bookmarkssubview, ...}.
Attachment #762970 - Flags: review?(jaws) → review+
(In reply to Jared Wein [:jaws] from comment #7) > Comment on attachment 762970 [details] [diff] [review] > Patch v1 > > Review of attachment 762970 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: browser/components/customizableui/content/panelUI.xml > @@ +132,5 @@ > > > > if (this._mainView) { > > this.setMainView(this._mainView); > > } > > + this.setAttribute("view", "main"); > > nit, can we change this to "viewType"? I think view= might imply that the > value will define which view is actually being shown, {main, historysubview, > bookmarkssubview, ...}. Sure - gonna go with the monocased "viewtype" though, to stick with convention.
Attached patch Patch v1.1 (r+'d by jaws) (deleted) — Splinter Review
Switched to viewtype. Also, I just noticed that my old patch was causing the height to snap and not transition when switching from the subview back to the main view. I've added a transitioning attribute and modified the transition rule to compensate.
Attachment #762970 - Attachment is obsolete: true
Attachment #763656 - Flags: review+
Whiteboard: [Australis:M7][User Research Build+] → [Australis:M7][User Research Build+][fixed-in-ux]
Mike, when watching the resizing behavior on OSX - of course, for me, but I'm sure it's noticeable on the other platforms as well - I noticed it causes the height of the panel to yank when 1. Entering & leaving customization mode 2. Opening the panel the first time after I made changes to the panel layout in customization mode Is that something to address as part of this bug, or should another bug be filed?
Flags: needinfo?(mconley)
(In reply to Mike de Boer [:mikedeboer] from comment #11) > Mike, when watching the resizing behavior on OSX - of course, for me, but > I'm sure it's noticeable on the other platforms as well - I noticed it > causes the height of the panel to yank when > > 1. Entering & leaving customization mode > 2. Opening the panel the first time after I made changes to the panel layout > in customization mode > > Is that something to address as part of this bug, or should another bug be > filed? This is *after* this patch has been applied? This patch was supposed to make the height not animate unless the panel was already open.
Flags: needinfo?(mconley)
Weird, now I don't see it anymore after a rebuild... me very happy! :)
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [Australis:M7][User Research Build+][fixed-in-ux] → [Australis:M7][User Research Build+]
Target Milestone: --- → Firefox 28
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: