Last modified: 2014-11-17 10:34:42 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 T21527, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 19527 - (Changed) element IDs and scripts
(Changed) element IDs and scripts
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
unspecified
All All
: Normal normal with 3 votes (vote)
: ---
Assigned To: Trevor Parscal
:
: 19502 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-05 04:01 UTC by Cacycle
Modified: 2014-11-17 10:34 UTC (History)
8 users (show)

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


Attachments

Description Cacycle 2009-07-05 04:01:28 UTC
In the current version of the vector skin several element id's have been changed from the parent monobook.js skin. Several of these changes were without any obvious technical need but are breaking the compatibility with existing user scripts and gadgets. 

As a workaround for this, people had to create "compatibility layers" that are now added as gadgets that unnecessarily clog the preference page (see http://en.wikipedia.org/wiki/Wikipedia_talk:Twinkle/Bugs#TW-B-305), script developers have to add additional code to their script just to keep their scripts compatible with monobook as well as vector, and user scripts that are no longer actively maintained have stopped working.

I kindly ask the skin developers to undo these (cosmetic and invisible) ID changes as long as this is possible and, in the future, keep the script developers in mind when improving the skin. Some of the affected elements are (from http://en.wikipedia.org/wiki/MediaWiki:Gadget-vectorskin-thunks.js):

p-cactions -> actions
p-personal -> personal
p-search -> p-navigation (?)
p-logo -> logo
column-one -> panel
column-content -> content
globalWrapper -> content (?)

Thanks in advance.
Comment 1 Amalthea 2009-07-05 08:54:00 UTC
FWIW, I endorse that. In addition to the ones above, others have been changed without apparent reason, for example the namespace pages:
* ca-nstab-main → ca-main
* ca-talk → ca-main_talk, ca-template_talk (this has some merit in my opinion,
    but you only went half the way since the captions are still all taken from
    the same msg:vector-namespace-talk)
* ca-nstab-project → ca-wikipedia (this one is very bad, the ids should always
    follow the canonical namespace names so that scripts and css are easily
    portable between all languages, and of course at e.g. ru-wiki you end up
    with the "ca-.D0.B2.D0.B8.D0.BA.D0.B8.D0.BF.D0.B5.D0.B4.D0.B8.D1.8F")
* ...?

For something related, is it really a good move to add skin-specific messages?
Comment 2 Derk-Jan Hartman 2009-07-05 09:39:37 UTC
I second this as well. Any such changes where these can be avoided, please avoid. The skins are too much of a mess already for most of the scripters.

The one change that i like is the namespaces change, but I would like to see the talk page tabs getting a class of their own (ca-talk?). That will make it easier to find the talkpages in the namespace area.
Comment 3 Phillip Patriakeas 2009-07-06 18:22:48 UTC
At the very least, would it be possible to get the older classes added as alternates to the new Vector ones?

E.g. <span class="ca-nstab-main ca-main">
Comment 4 Roan Kattouw 2009-07-06 21:36:36 UTC
(In reply to comment #3)
> At the very least, would it be possible to get the older classes added as
> alternates to the new Vector ones?
> 
> E.g. <span class="ca-nstab-main ca-main">
> 

We're not talking about classes, but about IDs. An element cannot have multiple IDs.

(In reply to comment #1)
> * ca-talk → ca-main_talk, ca-template_talk (this has some merit in my
> opinion,
>     but you only went half the way since the captions are still all taken from
>     the same msg:vector-namespace-talk)
> * ca-nstab-project → ca-wikipedia (this one is very bad, the ids should
> always
>     follow the canonical namespace names so that scripts and css are easily
>     portable between all languages, and of course at e.g. ru-wiki you end up
>     with the "ca-.D0.B2.D0.B8.D0.BA.D0.B8.D0.BF.D0.B5.D0.B4.D0.B8.D1.8F")
> * ...?
> 
All of these were fixed in r52806.

> For something related, is it really a good move to add skin-specific messages?
> 
Brion says it is...
Comment 5 Roan Kattouw 2009-07-06 23:41:40 UTC
*** Bug 19502 has been marked as a duplicate of this bug. ***
Comment 6 Trevor Parscal 2009-07-06 23:49:25 UTC
The following are working now, just as they were in monobook...
* p-personal
* p-search
* p-logo

The following will not work, because vector works fundamentally differently, and if we make these IDs the same, it will cause unwanted results anyways.

* p-cactions
* column-one
* column-content
* globalWrapper
Comment 7 Phillip Patriakeas 2009-07-07 00:58:15 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > At the very least, would it be possible to get the older classes added as
> > alternates to the new Vector ones?
> > 
> > E.g. <span class="ca-nstab-main ca-main">
> > 
> 
> We're not talking about classes, but about IDs. An element cannot have multiple
> IDs.
>
Aah, that would be my bad, then.
Comment 8 Derk-Jan Hartman 2009-07-07 20:57:23 UTC
actions -> p-cactions in r52855
Comment 9 Liangent 2009-07-21 04:19:21 UTC
i don't think changing #search to #p-search is a good idea.

some old scripts expect #p-search to be in the left column, but now, it is not there anymore. if it's named #search now, this can be a message telling script developers to change their method of using left column and search box.

if someone needs to locate the search box, he/she can use #searchform, both in monobook and vector. it's what i'm doing.
Comment 10 Liangent 2009-07-21 04:20:17 UTC
sorry for clicking on a wrong radio button.
Comment 11 Cacycle 2009-07-21 04:31:08 UTC
I do not see why you have to break scripts that might work perfectly fine just to tell a message to somebody who might even no longer be available.
Comment 12 Liangent 2009-07-21 05:15:08 UTC
it's not working properly, and it may make debugging more difficult.
also, if #p-search doesn't exist, we can make -thunks.js to "redirect" it. if it exists, then...
Comment 13 Trevor Parscal 2009-07-21 22:28:57 UTC
The change in r52816 is the desired functionality.

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


Navigation
Links