Re: [Wikitech-l] Removing * {{msg}} support from MediaWiki:Sidebar

2011-08-28 Thread Daniel Friesen
- Horrible syntax becomes even more horrid
- i18n nearly goes out the window
- Accesskeys go out the window
- External links don't work the same in the sidebar as they  do in WikiText
- Sidebar markup differs between skins... because rightfully that's the
skin's decision to make on how it's laid out and styled
- The user's ability to reposition the toolbox and language box
disappears, search to if you're using monobook

Please spare the ml all these unhelpful comments you keep making.

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

On 11-08-28 06:44 PM, jida...@jidanni.org wrote:
> Why don't you guys just make MediaWiki:Sidebar just be (interpreted as)
> a standard wikitext file. OK, call it MediaWiki:SidebarII or
> MediaWiki:Snidebar etc., which if exists will be used instead of
> MediaWiki:Sidebar.

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] Removing * {{msg}} support from MediaWiki:Sidebar

2011-08-28 Thread jidanni
> "C" == Chad   writes:
C> Why on earth would we call it the snidebar?
OK, spudbar.

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] Removing * {{msg}} support from MediaWiki:Sidebar

2011-08-28 Thread Chad
Why on earth would we call it the snidebar?

-Chad
On Aug 28, 2011 9:45 PM,  wrote:
> Why don't you guys just make MediaWiki:Sidebar just be (interpreted as)
> a standard wikitext file. OK, call it MediaWiki:SidebarII or
> MediaWiki:Snidebar etc., which if exists will be used instead of
> MediaWiki:Sidebar.
>
> ___
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] Removing * {{msg}} support from MediaWiki:Sidebar

2011-08-28 Thread jidanni
Why don't you guys just make MediaWiki:Sidebar just be (interpreted as)
a standard wikitext file. OK, call it MediaWiki:SidebarII or
MediaWiki:Snidebar etc., which if exists will be used instead of
MediaWiki:Sidebar.

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] Removing * {{msg}} support from MediaWiki:Sidebar

2011-08-24 Thread Krinkle
2011/8/20 Ashar Voultoiz 

> The sidebar code is a hack and it is far from being user friendly.  User
> currently has to edit:
>  - [[MediaWiki:Sidebar]]
>  - a message for link
>  - a message for link name
>
>
Afaik that's not true. Those 3 steps are only needed if you need
internationalization, in which case it makes sense to have multiple
pages. If you just want a simple link and link name you can just use:

*Some article|Click here!

In which case the magic sidebar code will indeed look if there's a
message by that name, but if there is not it will output that text raw.
So there is no requirement to create two separate messages.

 2011/8/20 Ashar Voultoiz 

> We should just rewrite it from scratch, using some Special page to
> easily add / remove links. Save them to the database and the cache system.
>
>
Yes,  definitely! This has been brought up a few times before and I think
it's an obvious thing to do.

It was brought up as a project for GSoC:

> "Sidebar/toolbar customization GUI"

Regarding the maintainability and automation from one wiki to another,
I a shared table solves that easily if it needs to be synchronized across
a wiki farm. And if only needed once or twice (export / import) one can
use database table export/import from phpMyAdmin even. That's
no different from any other database (ie. interwiki).

The Sidebar feature could have an API module or SpecialPage-action
that allows exporting to, for example, JSON. Which an then be imported
on another wiki through the API or a SpecialPage-action.

(eg. api.php?action=sidebar&op=export or Special:Sidebar/export).

--
Krinkle
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] Removing * {{msg}} support from MediaWiki:Sidebar

2011-08-23 Thread Daniel Friesen

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


On 11-08-23 02:40 PM, Platonides wrote:
> Daniel Friesen wrote:
>> The current implementation of MediaWiki:Sidebar supports a completely
>> undocumented * {{msg}} syntax.
> My fault.
>
>> This feature didn't exist in 1.16, was introduced but was seemingly
>> completely broken in 1.17 and finally made to work in 1.18.
>>
>> However I have a number of issues with it:
>> Conceptually:
>> * The concept makes little sense, it uses the {{}} template syntax, but
>> actually takes a message from the MediaWiki namespace, and it of course
>> doesn't support any real transclusion syntax
> People was *hacking* the code to include arbitrary wikitext [1].
How about we re-educate them on how to use the hook we have to introduce
new wikitext blocks to the sidebar?
Or perhaps something outside of mw:sidebar that lets us say to embed
things like MediaWiki:Sidebar/foo's WikiText into the sidebar.
Though, if someone is already modifying core, then telling them to put a
hook into their LocalSettings.php isn't any worse since they already
need php access to do the hack in the first place.

> What kind of transclusion syntax would you want? Template parameters???
Just saying that it's using transclusion syntax, but it doesn't behave
like transclusion syntax. It doesn't come from Template: by default, in
fact you can't even tell it to come from anywhere but a message, and yes
of course, if you tried to use parameters it wouldn't work.
>> Implementation:
>> * The implementation is a mess, with successive {{msgname}} calls in the
>> same header replacing rather than appending to,
> Several "{{msgname}} calls" were never really expected. You are right in 
> that appending would make more sense.
>
>> and using a mess of a
>> setup where these blocks are actually put into a separate array which is
>> array_merged into the real sidebar array at the end.
> I think there was some reason for doing it that way...
>
>> But mostly I have a problem with the fact that it's getting in my way.
>> I'm currently trying to fix up the limitation in our skin system that
>> only allows us to sanely have one type of navigation (the sidebar). With
>> the implementation of a new navigation message parser that can handle
>> varying formats of messages. However {{msgname}} is not something that
>> can see be cleanly implemented in it.
> I donn't understand what you are trying to do there, or why {{msgname}} 
> is a problem...
I'm trying to expand support from our limited support for:
MediaWiki:Sidebar with the format:
* section
** link|text

To support additional navigation such as:
A single level header with the format:
* link|text
* link|text

A recursive navigation menu with the format:
* link|text
** link|text
*** link|text
 link|text
*** link|text

And any other navigation that a skin wants to insert.
The fact that we ONLY support MediaWiki:Sidebar and if a skin designer
wants ANY other type of navigation they either have to hardcode it or
completely re-implement navigation parsing in their skin is a flawed
limitation in our skin system I'm trying to fix.

I implemented a NavigationMessageParser that can parse
MediaWiki:Sidebar's syntax and also the other variances like infinite
depth, levels that support links and levels that don't, etc... But right
now I can't see {{msgname}} being worked into that parser without a huge
hack.

> 1- http://www.mediawiki.org/wiki/Manual:Sidebar#Allow_wiki_markup_.28PHP.29

To be fair though. A comment in the commit, and also one of the replies
here have both brought up how flawed MediaWiki:Sidebar is from the start
and the whole idea of replacing it with a special page interface.
I do admit there that such a thing could handle wikitext blocks much
better than any MediaWiki:Sidebar syntax we could come up with or any hook.

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


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] Removing * {{msg}} support from MediaWiki:Sidebar

2011-08-23 Thread Platonides
Daniel Friesen wrote:
> The current implementation of MediaWiki:Sidebar supports a completely
> undocumented * {{msg}} syntax.

My fault.

> This feature didn't exist in 1.16, was introduced but was seemingly
> completely broken in 1.17 and finally made to work in 1.18.
>
> However I have a number of issues with it:
> Conceptually:
> * The concept makes little sense, it uses the {{}} template syntax, but
> actually takes a message from the MediaWiki namespace, and it of course
> doesn't support any real transclusion syntax

People was *hacking* the code to include arbitrary wikitext [1].
What kind of transclusion syntax would you want? Template parameters???


> Implementation:
> * The implementation is a mess, with successive {{msgname}} calls in the
> same header replacing rather than appending to,

Several "{{msgname}} calls" were never really expected. You are right in 
that appending would make more sense.

> and using a mess of a
> setup where these blocks are actually put into a separate array which is
> array_merged into the real sidebar array at the end.

I think there was some reason for doing it that way...

> But mostly I have a problem with the fact that it's getting in my way.
> I'm currently trying to fix up the limitation in our skin system that
> only allows us to sanely have one type of navigation (the sidebar). With
> the implementation of a new navigation message parser that can handle
> varying formats of messages. However {{msgname}} is not something that
> can see be cleanly implemented in it.

I donn't understand what you are trying to do there, or why {{msgname}} 
is a problem...

1- http://www.mediawiki.org/wiki/Manual:Sidebar#Allow_wiki_markup_.28PHP.29


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] Removing * {{msg}} support from MediaWiki:Sidebar

2011-08-20 Thread Daniel Friesen
On 11-08-20 02:58 AM, Ashar Voultoiz wrote:
> On 20/08/11 01:50, Daniel Friesen wrote:
>> The current implementation of MediaWiki:Sidebar supports a completely
>> undocumented * {{msg}} syntax.
> 
>> Are there any objections to it being removed?
> The sidebar code is a hack and it is far from being user friendly.  User 
> currently has to edit:
>   - [[MediaWiki:Sidebar]]
>   - a message for link
>   - a message for link name
>
> We should just rewrite it from scratch, using some Special page to 
> easily add / remove links. Save them to the database and the cache system.
I didn't mention it, but with the navigation message parser I'm
building, instead of creating instances of NavigationMessageParser and
describing the format of the messages I actually use a $wg var with the
definitions of the navigation message formats.
The point there is actually so that if someone decides to build
something like a Special:EditNavigation page, Special:EditNavigation
will be able to list the navigation types, and
Special:EditNavigation/sidebar, Special:EditNavigation/header, etc...
will know what format the message is and be able to let the special page
give the user an interface
I should point out that the fact the {{msg}} syntax is there would also
be in the way of a navigation editing ui.

Though I suppose you do have a good point, completely dropping this
system of using MediaWiki: messages for configuration is something to
seriously consider.

> As for the {{msg}}, it might help if you list the revisions.
https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Special:Code/MediaWiki/66974

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


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] Removing * {{msg}} support from MediaWiki:Sidebar

2011-08-20 Thread Ashar Voultoiz
On 20/08/11 01:50, Daniel Friesen wrote:
> The current implementation of MediaWiki:Sidebar supports a completely
> undocumented * {{msg}} syntax.

> Are there any objections to it being removed?

The sidebar code is a hack and it is far from being user friendly.  User 
currently has to edit:
  - [[MediaWiki:Sidebar]]
  - a message for link
  - a message for link name

We should just rewrite it from scratch, using some Special page to 
easily add / remove links. Save them to the database and the cache system.

As for the {{msg}}, it might help if you list the revisions.
-- 
Ashar Voultoiz


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


[Wikitech-l] Removing * {{msg}} support from MediaWiki:Sidebar

2011-08-19 Thread Daniel Friesen
The current implementation of MediaWiki:Sidebar supports a completely
undocumented * {{msg}} syntax.

It works along the lines of:
* header
** {{msgname}}

And ends up with a 'header' section with the parsed contents of
MediaWiki:Msgname outputted into it.


This feature didn't exist in 1.16, was introduced but was seemingly
completely broken in 1.17 and finally made to work in 1.18.

However I have a number of issues with it:
Conceptually:
* The concept makes little sense, it uses the {{}} template syntax, but
actually takes a message from the MediaWiki namespace, and it of course
doesn't support any real transclusion syntax
Implementation:
* The implementation is a mess, with successive {{msgname}} calls in the
same header replacing rather than appending to, and using a mess of a
setup where these blocks are actually put into a separate array which is
array_merged into the real sidebar array at the end.

But mostly I have a problem with the fact that it's getting in my way.
I'm currently trying to fix up the limitation in our skin system that
only allows us to sanely have one type of navigation (the sidebar). With
the implementation of a new navigation message parser that can handle
varying formats of messages. However {{msgname}} is not something that
can see be cleanly implemented in it.

I'd like to remove this feature from 1.18 before it ends up released and
people actually start using this feature in production where we start
having to deal with backcompat.
Are there any objections to it being removed?

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


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l