Right now in the skins system (if you consider vector part of the skins 
system) we have two parallel methods of adding tabs to the page:
- Into content_actions via SkinTemplateTabs, 
SkinTemplateBuildContentActionUrlsAfterSpecialPage, and 
SkinTemplateContentActions,
- Into vector's navigation_urls via SkinTemplateNavigation (the missing 
two hooks should be added)

The only important difference between these (besides some vector 
specific stuff that can stay in vector) is that content_actions is a 
flat array, and navigation_urls is an array of arrays organized into 
categories. Besides that, they are basically mirrors of each other with 
the same functional purpose, but you need to add tabs to both of them to 
avoid something not showing up in vector. There's also the misfortune 
that other skins can't take advantage of the organized navigation_urls 
because the actual implementation (which is basically a reimplementation 
of buildContentActionUrls with code duplication) without being a vector 
subskin because the code in question is inside of vector.

Right now we have extensions using both methods of adding tabs to the 
page, code duplication on their part. And a few extensions that are 
broken in vector because they haven't added the hooks.
Doing a quick grep, it appears the following extensions are missing 
vector support: Oversight, CommentPages, Todo, WikiTrust, Tasks, 
CategoryTree, DeleteQueue, Wikidata, Imagetabs, purgetab, Tab0, 
AuthorProtect, TidyTab, Purge, SpecialTalk

Shouldn't be to hard to fix, especially if we fix the bug of missing 
hooks for navigation_urls.


Now onto my focal point. As I've been improving the skin system trying 
to pull out the thorns that make building skins troublesome and mesh in 
new features and helpers which are missing, I'd like to remove the 
content_actions hooks and deprecate content_actions in 1.18 and start 
using navigation_urls style data everywhere.
Since content_actions and navigation_urls are the same, content_actions 
can be built by having SkinTemplate take the navigation_urls data and 
flatten it into a single array. Similarly to how I already have 
$wgFooterIcons work and fold it for some skins like Monobook which don't 
organize it the way vector does.

The effects will be like this:
- The three content_actions related hooks will no longer work in 1.18, 
thus extensions that haven't started supporting vector tabs will also 
stop showing tabs in other skins
- In their place extensions will use 3 navigation_urls related hooks 
(most extensions are already using the one hook available)
- Extension code for those already using both forms of hooks will stay 
the same, the only difference being that 1.18 will use the 
navigation_urls related hooks and the content_actions related ones will 
become redundant code which the extensions can keep for back compat but 
drop once they stop supporting pre-1.18 installations
- All standard skins will be using navigation_url based data and 
content_actions will be available but deprecated
- 3rd party skins will still function using content_actions but it would 
be preferred for them to be updated to use the new BaseTemplate and use 
the helpers in there (a navigation_urls related one would be added) once 
they don't need to support pre-1.18
- SkinTemplatePreventOtherActiveTabs will probably still work, though I 
may want to find a cleaner method to transition to (ie: one that says 
"this is the active tab" rather than "don't make other tabs active").


Any comments, rejections?

-- 
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]


_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to