[Bug 62971] Hovercards: cards not visible for links below the fold OR close to browser window edges

2014-05-22 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=62971

--- Comment #19 from kipod fur.hew...@gmail.com ---
please see bug 65433 for a demonstration of the effect i was referring to:
calculating top can be slightly off. when flippedY is true, it is much better
to use bottom.

peace.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 62971] Hovercards: cards not visible for links below the fold OR close to browser window edges

2014-05-09 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=62971

--- Comment #16 from Gerrit Notification Bot gerritad...@wikimedia.org ---
Change 130585 merged by jenkins-bot:
render.article: Flip popups on X and Y axis so that they don't render outside
the viewport

https://gerrit.wikimedia.org/r/130585

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 62971] Hovercards: cards not visible for links below the fold OR close to browser window edges

2014-05-09 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=62971

--- Comment #17 from kipod fur.hew...@gmail.com ---
(In reply to Gerrit Notification Bot from comment #16)
 Change 130585 merged by jenkins-bot:
 render.article: Flip popups on X and Y axis so that they don't render
 outside the viewport
 
 https://gerrit.wikimedia.org/r/130585

this patch still uses $( window ).width() instead of height() to calculate
flippedY. (file resources/ext.popups.renderer.article.js, line 294)

peace.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 62971] Hovercards: cards not visible for links below the fold OR close to browser window edges

2014-05-09 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=62971

Prateek Saxena psax...@wikimedia.org changed:

   What|Removed |Added

 Status|PATCH_TO_REVIEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #18 from Prateek Saxena psax...@wikimedia.org ---
(In reply to kipod from comment #17)

Sorry for the confusion. I accidentally fixed this in another unrelated commit.
Its using `.height()` in the final version. Here is the link to the commit that
fixes it -
https://gerrit.wikimedia.org/r/#/c/130629/3/resources/ext.popups.renderer.article.js

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 62971] Hovercards: cards not visible for links below the fold OR close to browser window edges

2014-05-01 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=62971

--- Comment #14 from kipod fur.hew...@gmail.com ---
(In reply to Prateek Saxena from comment #13)
 Thanks for the review kipod! Could you please review and/or +1 the patch on
 Gerrit too?

unfortunately, though i have a gerrit account, i did not yet learn to actually
use it. tried a couple of times, but did not persist. i am probably doing
something wrong, and haven't been able to review or +1 using gerrit yet.

as to your comment about style guide: i did not see there anything that says
that 

boolvar = boolean expression ;

is bad, and we should instead use

if (boolean expression) {
boolvar = true;
}

if style guild indeed says that (and i doubt it), then it's a bug in the guide.

as to using bottom and right instead of top and left when appropriate:
this is something i learned when i developed [[Module:Chart]] for drawing pie
charts. 
it uses a dirty css trick with border bevels, and requires absolutely precise
placement of one corner of the elements, where the corner can be ne, nw, se or
sw.
i could not make this work correctly with enough precision for any corner other
than nw, by calculating top and left, even though i had the exact
dimensions of the elemnt. 
when i switched to setting bottom or right in those cases, it works
precisely as prescribed. i think browsers take some liberties with the
dimensions of the elements, so when you query it in the script to calculate top
and left, you may get somewhat different answers than the actual dimensions
turn out to be. by setting bottom and/or right when appropriate, you avoid
those problems.

peace.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 62971] Hovercards: cards not visible for links below the fold OR close to browser window edges

2014-05-01 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=62971

--- Comment #15 from Andre Klapper aklap...@wikimedia.org ---
(In reply to kipod from comment #14)
 unfortunately, though i have a gerrit account, i did not yet learn to
 actually use it. tried a couple of times, but did not persist. i am probably
 doing something wrong, and haven't been able to review or +1 using gerrit
 yet.

kipod: If you're logged in (username in upper right corner in RTL languages),
https://gerrit.wikimedia.org/r/#/c/130585/ should offer a Review button where
you can set +2 to -2 under Code-Review.
Also see https://www.mediawiki.org/wiki/Gerrit/Tutorial#How_we_review_code

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 62971] Hovercards: cards not visible for links below the fold OR close to browser window edges

2014-04-30 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=62971

--- Comment #11 from Gerrit Notification Bot gerritad...@wikimedia.org ---
Change 130585 had a related patch set uploaded by Prtksxna:
Flip popups on X and Y axis so that they don't render below the fold

https://gerrit.wikimedia.org/r/130585

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 62971] Hovercards: cards not visible for links below the fold OR close to browser window edges

2014-04-30 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=62971

Gerrit Notification Bot gerritad...@wikimedia.org changed:

   What|Removed |Added

 Status|NEW |PATCH_TO_REVIEW

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 62971] Hovercards: cards not visible for links below the fold OR close to browser window edges

2014-04-30 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=62971

--- Comment #12 from kipod fur.hew...@gmail.com ---
(In reply to Gerrit Notification Bot from comment #11)
 Change 130585 had a related patch set uploaded by Prtksxna:
 Flip popups on X and Y axis so that they don't render below the fold
 
 https://gerrit.wikimedia.org/r/130585

2 comments:
// Y Flip
if ( event.clientY  ( $( window ).width() / 2 ) ) {
flippedY = true;
}

clearly, this is an error: we should look at $window.height(), not width.

2nd comment is stylistic: in JS, writing if (condition) { boolvar = true; } is
both ugly and redundant. write boolvar = condition instead.

so the above 3 lines shrink to: 

flippedY = clientTop  $( window ).height() / 2;

more concise, simpler and clearer (and, of course, more correct, by virtue of
using height instead of width...)

also, this:
if ( flippedY ) {
popup.css( {
top: popup.offset().top - ( popup.outerHeight() + 50 )
} );
}

i found that more elegant way to do flipY is to set the bottom of the element
instead of the top. this way, you don't have to worry about the element's
height - e.g., in case the outer height at the point you calculate it changes
later. basically in article.getOffset(), instead of
return {
top: offsetTop + 'px',
left: offsetLeft + 'px'
};
do
offsetTop -= (flippedY ? 50 : 0);
return {
(flippedY ? bottom : top) : offsetTop + 'px',
left: offsetLeft + 'px'
};


and remove the piece i quoted above.

if you use the same logic of setting right instead of left in case of
flippedX, the code will become significantly simpler.


peace.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 62971] Hovercards: cards not visible for links below the fold OR close to browser window edges

2014-04-30 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=62971

--- Comment #13 from Prateek Saxena psax...@wikimedia.org ---
(In reply to kipod from comment #12)
 clearly, this is an error: we should look at $window.height(), not width.

Fixed.

 more concise, simpler and clearer (and, of course, more correct, by virtue 
 of using height instead of width...)

Agreed on use of height, style guide to be followed -
https://www.mediawiki.org/wiki/CC/JS

 in case the outer height at the point you calculate it changes later

I get the height after its rendered so it can't change

 if you use the same logic of setting right instead of left in case of
 flippedX, the code will become significantly simpler.

Hmm. It *might* not be that simple. With calculations to adjust the size of the
triangle and to acutally position it above or below the link, there will be
enough calculations there as well. 


Thanks for the review kipod! Could you please review and/or +1 the patch on
Gerrit too?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 62971] Hovercards: cards not visible for links below the fold OR close to browser window edges

2014-04-14 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=62971

--- Comment #10 from Vibha Bamba vba...@wikimedia.org ---
Prateek, I discussed some alternate solutions with Jared. 
We think that the proposals attached to this bug are better suited to solving
the problem. I'm assigning this bug to you so you can comment on complexity and
perhaps think about the patch?

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 62971] Hovercards: cards not visible for links below the fold OR close to browser window edges

2014-04-14 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=62971

Vibha Bamba vba...@wikimedia.org changed:

   What|Removed |Added

   Assignee|wikibugs-l@lists.wikimedia. |psax...@wikimedia.org
   |org |

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 62971] Hovercards: cards not visible for links below the fold OR close to browser window edges

2014-04-08 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=62971

--- Comment #8 from Vibha Bamba vba...@wikimedia.org ---
Created attachment 15059
  -- https://bugzilla.wikimedia.org/attachment.cgi?id=15059action=edit
Proposed Solution for cards with images

If the link is close to the fold, the popup can horizontally flip.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 62971] Hovercards: cards not visible for links below the fold OR close to browser window edges

2014-04-08 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=62971

--- Comment #9 from Vibha Bamba vba...@wikimedia.org ---
Created attachment 15060
  -- https://bugzilla.wikimedia.org/attachment.cgi?id=15060action=edit
Proposed Solution for cards without images

Popups can horizontally flip.
We can define a margin if the link are on the corner of the screen, although
its dependent on the way the code has been set up.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 62971] Hovercards: cards not visible for links below the fold OR close to browser window edges

2014-04-02 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=62971

kipod fur.hew...@gmail.com changed:

   What|Removed |Added

 CC||fur.hew...@gmail.com

--- Comment #7 from kipod fur.hew...@gmail.com ---
(In reply to Prateek Saxena from comment #4)
 I can think of two possible solutions:
  1. Flip the popup–show it above the link
  2. Auto-scroll the page (ewww)

autoscrolling is of course not an option. hover action can't change the display
of the page (with possible exception change to the element above which you are
hovering).

why not take a look at how the jquery plugin tipsy (already included with
mediawiki) does it? 

it has gravity setting to determine if the popup should be above,  below,
left or right of the element (they use n,s,e,w plus combinations like ne).

the interesting option and logic there is automatic gravity which allows you
to say popup below element, except at the bottom portion of the window, where
it's above, and similarly when location is too close to left or right edge.

as far as i remember, the auto options in tipsy costs maybe 2 or 4 JS lines.

peace.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 62971] Hovercards: cards not visible for links below the fold OR close to browser window edges

2014-03-30 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=62971

Prateek Saxena psax...@wikimedia.org changed:

   What|Removed |Added

   Priority|Unprioritized   |Normal

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 62971] Hovercards: cards not visible for links below the fold OR close to browser window edges

2014-03-27 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=62971

--- Comment #6 from Prateek Saxena psax...@wikimedia.org ---
So (1) from comment #4? Any other ideas?

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 62971] Hovercards: cards not visible for links below the fold OR close to browser window edges

2014-03-25 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=62971

--- Comment #5 from Vibha Bamba vba...@wikimedia.org ---
Tempting as it is, Autoscroll cannot be our option, we are better than that.
Its jarring for the reader and significantly changes read behavior.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 62971] Hovercards: cards not visible for links below the fold OR close to browser window edges

2014-03-24 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=62971

Dan Garry dga...@wikimedia.org changed:

   What|Removed |Added

Summary|Popups not visible for  |Hovercards: cards not
   |links below the fold OR |visible for links below the
   |close to browser window |fold OR close to browser
   |edges   |window edges

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 62971] Hovercards: cards not visible for links below the fold OR close to browser window edges

2014-03-24 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=62971

--- Comment #2 from Dan Garry dga...@wikimedia.org ---
I reproduced this by resizing my window so that the word samurai is near the
bottom of the screen. The card appears to still be actually generated and
displayed, it's just that it's being displayed in a non-visible portion of the
screen.

I can't reproduce this bug on the sides of the browser window; for the left and
right edges, the card always seems to place itself somewhere sensible.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 62971] Hovercards: cards not visible for links below the fold OR close to browser window edges

2014-03-24 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=62971

--- Comment #3 from Vibha Bamba vba...@wikimedia.org ---
Agree, We just need to address the issue for 'link is too close to the fold'
for now.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 62971] Hovercards: cards not visible for links below the fold OR close to browser window edges

2014-03-24 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=62971

--- Comment #4 from Prateek Saxena psax...@wikimedia.org ---
I can think of two possible solutions:
 1. Flip the popup–show it above the link
 2. Auto-scroll the page (ewww)

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l