Last modified: 2013-04-22 16:15:55 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T46091, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 44091 - Ensure accurate placement of tooltips pointing to page elements
Ensure accurate placement of tooltips pointing to page elements
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
GuidedTour (Other open bugs)
unspecified
All All
: High normal (vote)
: ---
Assigned To: Matthew Flaschen
: patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-18 06:42 UTC by Steven Walling
Modified: 2013-04-22 16:15 UTC (History)
9 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Save (225.14 KB, image/png)
2013-01-18 06:43 UTC, Steven Walling
Details
Preview (246.32 KB, image/png)
2013-01-18 06:44 UTC, Steven Walling
Details
Edit (214.47 KB, image/png)
2013-01-18 06:44 UTC, Steven Walling
Details

Description Steven Walling 2013-01-18 06:42:37 UTC
We often want to point guiders to elements such as save buttons (wpSave) and the like. However, in tours such as http://piramido.wmflabs.org/wiki/List_of_Google_Stuff?tour=gettingstarted the tooltip is off by quite a bit for save and preview, and slightly for edit. JS adding things like editing toolbars etc. may account for some shift in the placement of the associated elements after the tooltip is loaded.
Comment 1 Steven Walling 2013-01-18 06:43:47 UTC
Created attachment 11646 [details]
Save
Comment 2 Steven Walling 2013-01-18 06:44:07 UTC
Created attachment 11647 [details]
Preview
Comment 3 Steven Walling 2013-01-18 06:44:41 UTC
Created attachment 11648 [details]
Edit
Comment 4 Matthew Flaschen 2013-01-18 06:50:19 UTC
Ori suggested binding to resize or scroll.  It looks like the height of the overall document changes, so resize might work.
Comment 5 Matthew Flaschen 2013-01-23 05:31:44 UTC
There's actually already resize code in upstream (which isn't working for this reflow), so it's going to be a little more complicated:

https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/GuidedTour/guiders.git;a=blob;f=guiders-1.2.8.js;h=92c5f673bd3337a19bf1cf1b820d35d91db439b9;hb=refs/heads/master#l804
Comment 6 Ori Livneh 2013-01-23 09:24:57 UTC
You need to fire on .ready():

$( function () {
    $( window ).trigger( 'resize' );
} );
Comment 7 Steven Walling 2013-01-24 21:44:11 UTC
Just to confirm: still seeing this error in latest version on piramido.
Comment 8 Matthew Flaschen 2013-01-24 22:18:11 UTC
I tested Ori's patch, and it looks good so far:

https://gerrit.wikimedia.org/r/#/c/45671/
Comment 9 Matthew Flaschen 2013-01-29 04:24:15 UTC
Unfortunately, that didn't quite work.  WikiEditor is using $.eachAsync (from jquery.async.js in core) to build the toolbar.  That uses setTimeout internally, so even if our document.ready is registered after theirs, the toolbar setup could finish any time after.

I've made a one-line Gerrit to WikiEditor (pending review) at https://gerrit.wikimedia.org/r/#/c/46490/ .  It simply triggers an event to let other code know when it's done asynchronously building the initial toolbar sections (which shift the vertical layout).

I have a Gerrit change to have GuidedTour listen to the new event (we should keep the document.ready in Guiders proper, for other situations). https://gerrit.wikimedia.org/r/#/c/46491/
Comment 10 Matthew Flaschen 2013-01-30 07:42:20 UTC
Both merged.  Until the change to WikiEditor is deployed, GuidedTour won't be get this signal/event.

There won't be a runtime error either way, but it's still best we deploy WikiEditor with this change Thursday if possible.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links