Closed
Bug 510981
Opened 15 years ago
Closed 15 years ago
Clean up bookmark popup positioning code
Categories
(Firefox for Android Graveyard :: Bookmarks, defect)
Firefox for Android Graveyard
Bookmarks
Tracking
(fennec1.0+)
VERIFIED
FIXED
fennec1.0
Tracking | Status | |
---|---|---|
fennec | 1.0+ | --- |
People
(Reporter: Gavin, Assigned: vingtetun)
References
Details
(Whiteboard: [fennec l10n][polish])
Attachments
(2 files, 3 obsolete files)
4.32 KB,
patch
|
pavlov
:
review-
|
Details | Diff | Splinter Review |
3.06 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
Currently is positions the popup based on the position of the sidebar and screen width. Should probably be anchored to the right of the tile-container instead (see bug 494491 comment 7).
Updated•15 years ago
|
tracking-fennec: --- → 1.0+
Updated•15 years ago
|
Assignee: nobody → gavin.sharp
Reporter | ||
Comment 1•15 years ago
|
||
-change to using a hardcoded width/height
-position the popup on opening, and invalidate when the window is resized
-remove margin/padding on the box so that the positioning works better
Attachment #396250 -
Flags: review?(pavlov)
Updated•15 years ago
|
Attachment #396250 -
Flags: review?(pavlov) → review-
Comment 2•15 years ago
|
||
Comment on attachment 396250 [details] [diff] [review]
patch
getBoundingClientRect coords need to be rounded. in show top and left should both be wholly rounded
Reporter | ||
Comment 3•15 years ago
|
||
also don't want to be using hardcoded width/height. I have an updated patch in my tree, but it has some issues I need to sort out.
Updated•15 years ago
|
Whiteboard: [polish]
Assignee | ||
Comment 6•15 years ago
|
||
Attachment #414739 -
Flags: review?(gavin.sharp)
Assignee | ||
Updated•15 years ago
|
Assignee: gavin.sharp → 21
Reporter | ||
Comment 7•15 years ago
|
||
Comment on attachment 414739 [details] [diff] [review]
Patch
>diff -r 914a3f23bbb2 chrome/content/browser-ui.js
>- // bookmark popup
>- let bookmarkPopup = document.getElementById("bookmark-popup");
>- let bookmarkPopupW = windowW / 4;
>- bookmarkPopup.height = windowH / 4;
>- bookmarkPopup.width = bookmarkPopupW;
>- let starRect = this.starButton.getBoundingClientRect();
>- const popupMargin = 10;
>- bookmarkPopup.top = Math.round(starRect.top) + popupMargin;
>- bookmarkPopup.left = windowW - this.sidebarW - bookmarkPopupW - popupMargin;
>diff -r 914a3f23bbb2 chrome/content/browser.xul
>- <vbox id="bookmark-popup" hidden="true" class="dialog-dark" align="center">
>+ <vbox id="bookmark-popup" hidden="true" class="dialog-dark" align="center" top="78" left="0">
I think I'd rather keep the setting of .top in sizeControls rather than hardcoding it here. It can be changed to use BookmarkPopup.box rather than calling getElementById directly, though.
> show : function (aAutoClose) {
>+ let [,,,ritew] = Browser.computeSidebarVisibility();
>+ this.box.left = window.innerWidth - (this.box.getBoundingClientRect().width + ritew + margin);
Is it really necessary to do this calculation each time the popup is shown? Can't the popup only be displayed while the entire sidebar is visible, which means that a constant offset should work? I don't understand what causes the current misplacement issues, and I guess I'd like to before changing to use this technique.
Assignee | ||
Comment 8•15 years ago
|
||
(In reply to comment #7)
> >+ let [,,,ritew] = Browser.computeSidebarVisibility();
> >+ this.box.left = window.innerWidth - (this.box.getBoundingClientRect().width + ritew + margin);
>
> Is it really necessary to do this calculation each time the popup is shown?
> Can't the popup only be displayed while the entire sidebar is visible, which
> means that a constant offset should work? I don't understand what causes the
> current misplacement issues, and I guess I'd like to before changing to use
> this technique.
As said on IRC I'm a bit worried that extensions developers want to call it from extensions even if the right sidebars is hidden.
Comment 9•15 years ago
|
||
This is solving problems we have in at least one localization with the text not fitting 1/4 of the screen width in bookmark-popup.
Whiteboard: [polish] → [fennec l10n][polish]
Reporter | ||
Comment 10•15 years ago
|
||
(In reply to comment #8)
> As said on IRC I'm a bit worried that extensions developers want to call it
> from extensions even if the right sidebars is hidden.
OK, let's leave that part as is then.
Assignee | ||
Comment 11•15 years ago
|
||
Adressed comments
Attachment #414739 -
Attachment is obsolete: true
Attachment #415353 -
Flags: review?(gavin.sharp)
Attachment #414739 -
Flags: review?(gavin.sharp)
Assignee | ||
Comment 12•15 years ago
|
||
really adressed comments
Attachment #415353 -
Attachment is obsolete: true
Attachment #415388 -
Flags: review?(mark.finkle)
Attachment #415353 -
Flags: review?(gavin.sharp)
Updated•15 years ago
|
Attachment #415388 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 13•15 years ago
|
||
Oups. I've forgot to include this change in my patch.
Attachment #415388 -
Attachment is obsolete: true
Attachment #415408 -
Flags: review?(gavin.sharp)
Updated•15 years ago
|
Attachment #415408 -
Flags: review?(gavin.sharp) → review+
Comment 14•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → Post-B5
Comment 15•15 years ago
|
||
verified FIXED (used ru and es-**) on builds:
Mozilla/5.0 (X11; U; Linux armv7l; Nokia N900; en-US; rv:1.9.2b5pre) Gecko/20091202 Firefox/3.6b5pre Fennec/1.0b6pre
and
Mozilla/5.0 (X11; U; Linux armv6l; Nokia N8xx; en-US; rv:1.9.3a1pre) Gecko/20091202 Firefox/3.7a1pre Fennec/1.0b5
Status: RESOLVED → VERIFIED
Updated•15 years ago
|
Component: General → Bookmarks
You need to log in
before you can comment on or make changes to this bug.
Description
•