Open Bug 974389 Opened 10 years ago Updated 9 months ago

Panels should orient towards the center of the window

Categories

(Firefox :: General, defect)

x86_64
Windows 7
defect

Tracking

()

People

(Reporter: gcp, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [Australis:P4+])

Attachments

(4 files)

When the bookmarks button is on the left side of the Firefox window, the bookmark menu now folds open outside and to the left of the Firefox window. This looks really awkward, see screenshot nr 1. This behavior changed between the Nightly of 12 February and now.

What's more, even if you keep the bookmarks menu in the default place, the behavior doesn't help anything: it will still cause the submenus to fold out to the left, despite the foldout buttons being right. i.e. if this restyle was to make more room to the right, it did not achieve it's purpose and that room is wasted.
It looks even worse with more bookmarks.
We do seem to do the right thing if the window is positioned such that folding out to the left would cause us to run off-screen. In that case the behavior reverts to the old style.

But folding menus outside of the main window is really really strange in Windows. I can't find any other application that does this. This includes Firefox itself: if you position it on the left side of the screen, the hamburger menu doesn't suddenly start folding out to the right!
Attachment #8378295 - Attachment description: Default placement still folds to the left instead of right. → Default placement still opens to the left instead of right.
>This includes Firefox itself: if you position it on the left side of the screen, the hamburger menu doesn't suddenly start folding out to the right!

To my shock and amazement, Firefox indeed doesn't, but Thunderbird *does*.
It's the default behaviour for panels. The bookmarks panel previous behaviour was inconsistent and it got corrected.
How was it inconsistent? As far as I can tell, the panel behavior *now* is different between the main menu and the bookmarks menu.
All widgets panels (History, Downloads, star panel, etc.) are oriented to the left unless the edge of the screen push them. Submenus open if possible to the right.
Would orienting to the center of the application window not make more sense? Note that this is what you get if the user doesn't customize the layout, because the default settings put everything right of center.
(In reply to Gian-Carlo Pascutto (:gcp) from comment #8)
> Would orienting to the center of the application window not make more sense?
> Note that this is what you get if the user doesn't customize the layout,
> because the default settings put everything right of center.

Yes, panels should orient themselves towards the center of the window.
(In reply to Gian-Carlo Pascutto (:gcp) from comment #8)
> Would orienting to the center of the application window not make more sense?
> Note that this is what you get if the user doesn't customize the layout,
> because the default settings put everything right of center.

Yeah I think that would be nice but I don't think it can be done in a near future.
Renaming bug given that we agree what the root problem is here.
Summary: Bookmarks menu folds outside Firefox window → Panels should orient towards the center of the window
Hmm, panel |position| options don't currently support "towards the window center", so moving widgets to the far-left can trigger this. A bit of a pre-existing problem (download panel, pre-Australis), it gets a bit worse because we have extra panel widgets now, and are generally prompting customization. Still, you often need the window a fair distance from the left side of the screen to give them space to show there.

Enn, is this something that might be straightforward to fix?
Flags: needinfo?(enndeakin)
Whiteboard: [Australis:P4]
Quite simple to add an extra position flag to do this.
Flags: needinfo?(enndeakin)
Attached patch PatchSplinter Review
This patch adds an 'inward' flag to make the panel open towards the middle of the screen. Some minor polish is still to be done as well as tests.
Assignee: nobody → enndeakin
Status: NEW → ASSIGNED
Whiteboard: [Australis:P4] → [Australis:P4+]
Wouldn't this flag mean that if you drag the window to the right of the screen's center, the menu would still open to the left?
(In reply to :Gijs Kruitbosch from comment #15)
> Wouldn't this flag mean that if you drag the window to the right of the
> screen's center, the menu would still open to the left?

(hrm, it looks like the code does open to the center of the window, instead of the center of the screen - nevermind me!)
Component: Theme → General
Flags: firefox-backlog+
Neil, did you forget to request review on this patch?
Flags: needinfo?(enndeakin)
No, I believe it didn't work correctly in all cases. The logic in nsMenuPopupFrame::AdjustPositionForAnchorAlign is wrong.
Flags: needinfo?(enndeakin)
I'm not working on this right now. The patch isn't quite correct as described in the previous comment.
Assignee: enndeakin → nobody
Status: ASSIGNED → NEW
Severity: normal → S3

The severity field for this bug is relatively low, S3. However, the bug has 4 duplicates.
:mossop, could you consider increasing the bug severity?

For more information, please visit auto_nag documentation.

Flags: needinfo?(dtownsend)

The last needinfo from me was triggered in error by recent activity on the bug. I'm clearing the needinfo since this is a very old bug and I don't know if it's still relevant.

Flags: needinfo?(dtownsend)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: