MediaWiki talk:Common.js/Archive 4: Difference between revisions
Content deleted Content added
Shadowbot3 (talk | contribs) m Automated archival of 1 sections from MediaWiki talk:Common.js |
Shadowbot3 (talk | contribs) m Automated archival of 2 sections from MediaWiki talk:Common.js |
||
Line 35:
::::You're correct that it avoids an HTTP redirect. I just tested it. [[User talk:Mike Dillon|Mike Dillon]] 17:28, 5 March 2007 (UTC)
<span id="63298753350" />
== Collapsible tables ==
Some times I have an error from that function:
Error: Header has no properties
Source File: http://en.wikipedia.org/w/index.php?title=-&action=raw&smaxage=0&gen=js
Line: 240
Perhpas add a test if Header exist. <sub>→[[User:AzaToth|<span style="color:#773">Aza</span>]][[User_talk:AzaToth|<span style="color:#359">Toth</span>]]</sub> 17:11, 6 February 2007 (UTC)
: On which page does this happen? —''[[User:R._Koot|Ruud]]'' 17:37, 6 February 2007 (UTC)
: Tables without a header shouldn't have the class "collapsible" as this is where the show/hide button is placed. —''[[User:R._Koot|Ruud]]'' 19:38, 6 February 2007 (UTC)
::I have added a test for whether any header row exists: HTH HAND —[[User:Phil Boswell|Phil]] | [[User talk:Phil Boswell|Talk]] 11:02, 9 March 2007 (UTC)
<span id="63298677990" />
== Optimizing [[Mediawiki:Edittools]] ==
Please revert [http://en.wikipedia.org/w/index.php?title=MediaWiki:Common.js&curid=763577&diff=113147951&oldid=112423294 «optimization»] and let's discuss it first. And most importantly, let's ''test'' new solutions in ''different'' browsers. — [[User:Alex Smotrov|Alex Smotrov]] 21:21, 6 March 2007 (UTC)
:Second. It's pretty uncool to simply add this with no discussion. [[User talk:Mike Dillon|Mike Dillon]] 21:23, 6 March 2007 (UTC)
I reverted it because of the discussion above and discussion at the [[Wikipedia:Village_pump_%28technical%29#Please_enable_JavaScript|village pump]]. It seems to cause issues in Firefox. I have also left a message with [[User:Misza13]] explaining my actions. If they weren't appropriate, another admin should feel free to revert me. --[[User:PS2pcGAMER|PS2pcGAMER]] ([[User talk:PS2pcGAMER|talk]]) 21:32, 6 March 2007 (UTC)
:Also you have to revert: [[MediaWiki:Edittools]]. And btw that's where the discussion happened in the 1st place, guess I should have watched that page as well. — [[User:Alex Smotrov|Alex Smotrov]] 21:36, 6 March 2007 (UTC)
::Got it. I'll let Misza13 sort out where s/he wants to go from here. At least the edit box is there now for everyone. --[[User:PS2pcGAMER|PS2pcGAMER]] ([[User talk:PS2pcGAMER|talk]]) 21:53, 6 March 2007 (UTC)
:From a usability standpoint, I think this is a step backwards. Now in order to use the edit box, two clicks are required -- Open editing toolbox; click on desired symbol. Plus, there's a wait/lag in the middle. To me, this is a bad (mis-)use of AJAX. Plus, doesn't it bypass the "Show edit toolbar (JavaScript)" option in Preferences/Editing? –[[User:Dvandersluis|Dvandersluis]] 21:48, 6 March 2007 (UTC)
::It was working, so I didn't want to revert this page back again. Although [[User:Ruud Koot]] has since reverted everything back to its original state. --[[User:PS2pcGAMER|PS2pcGAMER]] ([[User talk:PS2pcGAMER|talk]]) 22:01, 6 March 2007 (UTC)
::For start, many people (like myself) don't use the tools at all. Now if you scan the traffic between the server and your browser, you'll notice that the edit tools actually form the '''majority''' of traffic of edit pages, which is unacceptable, because the code doesn't get cached (with my solution, it would). Second, this generates a lot of objects with attached JS events, which causes '''major''' problems in Firefox, known for leaks in this department. Third, the option in Prefs is about the editing toolbar (above the edit box), not the editing tools below - the devs were for some reason reluctant to add a new option to the preferences (which would be a near-ideal solution). [[User:Misza13|Миша]][[User talk:Misza13|<span style="color:green">'''13'''</span>]] 22:05, 6 March 2007 (UTC)
::: Okay, I misunderstood the distinction (or even the fact that there was one) between the two elements. I guess it's not (easily) possible to just get a new checkbox in there, rather than go through this process? Is finding a solution through javascript the only option there is (save for an update by the devs)?
::: Do you understand my usability concern, though? If there is a low percentage of usage of this to begin with, adding in an extraneous action will further reduce the number.
::: –[[User:Dvandersluis|Dvandersluis]] 22:13, 6 March 2007 (UTC)
::::Yes, I do understand, but here's a clash of a usability problem of my own (as outlined in my reply below) where my Firefox doesn't handle so much JS leaks and needs a restart every like 10 pages edited (or less if preview is used), because memory usage becomes sky-high. [[User:Misza13|Миша]][[User talk:Misza13|<span style="color:green">'''13'''</span>]] 22:36, 6 March 2007 (UTC)
=== Reverted ===
I reverted the changes for several good reasons:
# A similar solution has been rejected in the past.
# The code was undiscussed, badly written, undocumented and untested. ''If'' we want to have this stuff a small multi-purpose and well-tested and documented AJAX framework should be written first.
# I do not believe the usability problems caused by this particular solution to the problem described at [[User:Cyde/Saving bandwidth]] are an acceptable trade off. In fact, I believe the edit pages are sent in compressed form, so there might not be a problem at all.
—''[[User:Ruud Koot|Ruud]]'' 22:12, 6 March 2007 (UTC)
:For the record, I reverted because of usability issues. People reported (and I also experienced) error messages that said something to the effect of "Javascript is not enabled" which confused a lot of people, especially since they knew that they had JS enabled. I didn't see an urgency in leaving the code in place so I reverted until things could be clarified. --[[User:PS2pcGAMER|PS2pcGAMER]] ([[User talk:PS2pcGAMER|talk]]) 22:24, 6 March 2007 (UTC)
:For the record, the code '''was''' tested, works fine on Firefox and I also saw it working on IE (it failed on my PC tho). Also, whether or not the code is compressed (not all browsers support compression), it generates lots of objects with attached JS and causes severe memory leaks on Firefox. That's verified: as long as one only browses articles, it's fine, but whenever a few pages get edited (God forbid to use "preview"!), the whole thing gets bogged down, memory exhausted and further browsing impossible. In that aspect, I have a '''serious''' usability problem with the '''current''' implementation and am desperate to find a solution. [[User:Misza13|Миша]][[User talk:Misza13|<span style="color:green">'''13'''</span>]] 22:33, 6 March 2007 (UTC)
:: I believe there are other, better, solutions are possible which need to be carefully considered first. I have not experience any problem with Firefox and editing pages myself? Are there any other users who are experiencing this? —''[[User:Ruud Koot|Ruud]]'' 22:42, 6 March 2007 (UTC)
:: Also on the bandwidth side: I suspect common.js is load 100 times or more often than edit pages are, meaing that adding 1kb of code here would much worse than the 20kb saved on the edit paged. —''[[User:Ruud Koot|Ruud]]'' 22:42, 6 March 2007 (UTC)
:::I think Edittools is more like 38 kbytes. Common.js could call a ''separate'' javascript file only for edit pages. — [[User:Alex Smotrov|Alex Smotrov]] 22:56, 6 March 2007 (UTC)
:: I use firefox (and wikipedia) extensively, and have never experienced any sort of slowdown related to the edit box. If there actually is a problem, what if the event was set on a parent element, and [http://www.quirksmode.org/js/events_order.html event capturing] was used? —[[User:Dvandersluis|Daniel Vandersluis]]<sup>([[User talk:Dvandersluis|talk]])</sup> 00:53, 7 March 2007 (UTC)
=== An older proposal ===
I guess it's a good time to point to an older proposal of mine, [[MediaWiki talk:Edittools/Archive 3#Replacing charinsert with dynamic JavaScript]]. It does not use [[AJAX]]; instead, the list of characters is inlined on the Javascript file itself, which should be much more compatible (and after being loaded behaves exactly like the old implementation; the only disadvantage is a small amount of flicker). It was not accepted because there was no [[MediaWiki:Common.js]] at the time, which would be needed to make it work on all skins. --[[User:CesarB|cesarb]] 22:27, 6 March 2007 (UTC)
:I second dynamic Javascript proposal. I've been having this idea myself for some time.
:For the reference: today's AJAX code could use functionality in [{{SERVER}}/skins-1.5/common/ajax.js ajax.js] and use <code>&action=<s>raw</s>render</code> ''(corrected later)'' instead of downloading the whole Edittools page.
:Btw, any other comments on page compression?
: — [[User:Alex Smotrov|Alex Smotrov]] 22:37, 6 March 2007 (UTC)
:: See http://lists.wikimedia.org/pipermail/wikitech-l/2007-February/thread.html#29440. —''[[User:Ruud Koot|Ruud]]'' 22:55, 6 March 2007 (UTC)
===Fallback? ===
What are your proposals for fallback for those with JS disabled, or even for browsers without JS at all?
Any solution without such plans is unacceptable.
HTH HAND —[[User:Phil Boswell|Phil]] | [[User talk:Phil Boswell|Talk]] 07:05, 8 March 2007 (UTC)
: Charinsert doesn't work without JS anyway. —''[[User:Ruud Koot|Ruud]]'' 10:57, 8 March 2007 (UTC)
:As Ruud just said, there is no need for a fallback, since the edit tools already do not work (and cannot work) without Javascript. --[[User:CesarB|cesarb]] 14:06, 8 March 2007 (UTC)
|