Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
Line 44: Line 44:
 
::: My IE8 didn't crash. Perhaps it's an extension, a faulty install of IE8, or a specific tooltip? <span style="font-size: 8pt; border: thin dashed; padding: 2px 3px">'''Posted by''': [[User:Egingell|<span class="ajaxttlink">EGingell</span>]] ([[User_talk:Egingell|T]]|[[Special:Contributions/Egingell|C]]|[[Special:Following/Egingell|F]]) [http://www.wowarmory.com/character-sheet.xml?r=Cenarion+Circle&n=Treader Treader of Cenarion Circle] 07:12, Jun 15, 2010 (UTC)</span>
 
::: My IE8 didn't crash. Perhaps it's an extension, a faulty install of IE8, or a specific tooltip? <span style="font-size: 8pt; border: thin dashed; padding: 2px 3px">'''Posted by''': [[User:Egingell|<span class="ajaxttlink">EGingell</span>]] ([[User_talk:Egingell|T]]|[[Special:Contributions/Egingell|C]]|[[Special:Following/Egingell|F]]) [http://www.wowarmory.com/character-sheet.xml?r=Cenarion+Circle&n=Treader Treader of Cenarion Circle] 07:12, Jun 15, 2010 (UTC)</span>
 
:::Yeah, IE8 is a bit slower than the others, not sure why since it's getting the same code... --{{User:Pcj/sig}} 12:01, June 15, 2010 (UTC)
 
:::Yeah, IE8 is a bit slower than the others, not sure why since it's getting the same code... --{{User:Pcj/sig}} 12:01, June 15, 2010 (UTC)
  +
::OK, I patched in something that I hope is temporary. Let me know if you still have issues. --{{User:Pcj/sig}} 02:02, June 16, 2010 (UTC)

Revision as of 02:02, 16 June 2010

Forums: Village pump → Tooltips overhaul

I've overhauled the hover tooltips to use jQuery, they are super-optimized now - performing the same functions in 1/10 the code length. Please let me know if you see any bugs. This means anyone who can edit the relevant "target page templates" can actually modify the layout of the tooltip. See my changes to the relevant templates if you have any questions about that. Also due to this, I have made it so now any user can create AJAX hover tooltips (non-AJAX tooltips could already be made with {{Quicktooltip}}) with any content (ok, there's probably some bug-inducing exceptions). Just use the following syntax on the calling page:

[[Example link|<span class="ajaxttlink">Link</span>]]

And on the target page just wrap whatever you want in:

<div class="tooltip-content">Example data</div>

Note that you can apply style="display:none;" to the target-page div (but you don't have to) and the JS will remove it when it puts it into the tooltip. Also note that multiple tooltips per target page seem to work, I haven't completely tested that "bonus feature" yet though.

A few things were removed:

  • The WoWWiki:Tooltips configuration page and retrieving cookie-based settings from there. The code to implement this was longer than the optimized tooltip generation code. Sorry. You can still customize it through JavaScript variables in your user JS. Ask me if you can't figure it out.
  • Along with that, granular control of what sort of tooltips are shown has been removed. With all the tooltips running through the same code it just doesn't make much sense anymore.
  • Category tooltips. The CategoryTree works pretty well now and I never used this feature, I don't know about anyone else. I can instruct you on how to implement this for yourself if you're going to miss this.
  • Code-handled caching. The browser does this pretty well anyway.
  • Really advanced error handling. I'm not sure the errors they covered even come up anymore but I'll be watching for them.
  • The loading tooltip. It's pretty fast, I'm not sure it needs it. Pretty sure I can implement it if anyone misses it.

Some quirks I've noticed:

  • Tooltip sizes aren't always consistent. It's not a huge deal to me - let me know if it messes up too bad though.
  • Tooltip moving/hide behavior isn't the same as before. As above, it's not huge, but probably could use a bit more tweaking.

Also the AJAX RC and the AJAX tables have been on jQuery for some time now, I haven't seen any bugs but here would be a good place to report those as well. Thanks. --PcjWowpedia wiki manager (TDrop me a line!C207,729 contributions and counting) 03:40, June 10, 2010 (UTC)

Nice work! Big thumbs up from me :) Kirkburn  talk  contr 18:31, June 10, 2010 (UTC)
Neat. Posted by: EGingell (T|C|F) Treader of Cenarion Circle 02:07, Jun 11, 2010 (UTC)

One more thing, since the code is now sub-4k in length I've moved it to MediaWiki:Common.js to further reduce page load time. --PcjWowpedia wiki manager (TDrop me a line!C207,729 contributions and counting) 01:12, June 12, 2010 (UTC)

Ability Template

The {{ability}} and {{item}} templates don't appear to be working right now. I don't know if it's because of this change or not (e.g. Ability hunter mendpet [Mend Pet], Ability hunter mendpet [Glyph of Mend Pet], etc.). Posted by: EGingell (T|C|F) Treader of Cenarion Circle 08:26, Jun 13, 2010 (UTC)

Sorry, fixed it. --PcjWowpedia wiki manager (TDrop me a line!C207,729 contributions and counting) 11:40, June 13, 2010 (UTC)

IE 8

Yeah, so it looks like since this change, on hovering over anything that would create a tooltip in IE8 I get an error that a script is unresponsive and to kill it. This is from several different computers (work and home) so I know it's not an internet/local issue or whatever. I figure I can't be the only one having this problem. I hope you guys test with IE and aren't just 'omg get Firefox!' people. --Windslice (talk) 16:22, June 14, 2010 (UTC)

<tabview>user:egingell/IE8_Errors|[For the record, the crappy IE8 error messages are here.] User:Egingell/Blank | [Hide]</tabview> Posted by: EGingell (T|C|F) Treader of Cenarion Circle 01:51, Jun 15, 2010 (UTC)

Those aren't directly related to my JavaScript (also incidentally I am not getting those errors). Rather, through my old error handling code, I was redirecting the errors from some of Wikia's script to code which only showed up for me, and now that's gone. I will see what I can do. --PcjWowpedia wiki manager (TDrop me a line!C207,729 contributions and counting) 02:08, June 15, 2010 (UTC)
I'm not getting those errors. Not visibly anyway. What I'm getting is more like JavaScript going into a loop. Windslice (talk) 04:58, June 15, 2010 (UTC)
My IE8 didn't crash. Perhaps it's an extension, a faulty install of IE8, or a specific tooltip? Posted by: EGingell (T|C|F) Treader of Cenarion Circle 07:12, Jun 15, 2010 (UTC)
Yeah, IE8 is a bit slower than the others, not sure why since it's getting the same code... --PcjWowpedia wiki manager (TDrop me a line!C207,729 contributions and counting) 12:01, June 15, 2010 (UTC)
OK, I patched in something that I hope is temporary. Let me know if you still have issues. --PcjWowpedia wiki manager (TDrop me a line!C207,729 contributions and counting) 02:02, June 16, 2010 (UTC)