On Tue, Sep 30, 2014 at 3:11 PM, Subramanya Sastry <[email protected]>
wrote:

> My summary based on reading and looking at discussions:
>
> Options are:
>
> (a) use a regexp to identify sigs -- dirty, but can apply to old
> discussions
>

This was written[1] for Echo a couple years ago at the beginning of the
project.  This particular implementation is far from perfect, but here are
a couple of the complexities involved:

* a single regexp doesn't currently match timestamps in different
languages, so a timestamp regex is generated based on the $wgContLang
timestamp output.
* wiki's each control their own signature[2]. Changing the signature
exposed a bug[3] in Echo which caused it to stop sending mention
notifications.
* The fix[4] for above basically switches the code around to extract
wikilinks from the wikitext and run their content through Title to
determine if a link is to NS_USER, NS_USER_TALK, or the Contributions page
of NS_SPECIAL, all of which appear in signatures.

From the standpoint of programmatically detecting a signature, the above
could be cleaned up and work well enough.

Erik B.

[1]
https://github.com/wikimedia/mediawiki-extensions-Echo/blob/master/includes/DiscussionParser.php#L550

[2] https://ru.wikipedia.org/wiki/MediaWiki:Signature
[3] https://bugzilla.wikimedia.org/show_bug.cgi?id=71353
[4] https://gerrit.wikimedia.org/r/#/c/163651/

(b) new markup <span>/<sig>/{{#sig:..}} added via PST -se- cleaner, but
> applies only to new discussions, but new wikitext markup
> (c) don't do it and leave it for discussion systems to handle signatures
>
> As for what direction to go with (a)/(b)/(c), that is a different issue.
>
> If (b), I think parsoid folks (and jackmcbarn) are advocating for a markup
> like <sig>..</sig> rather than inline <span> as in the patch or a parser
> function. The <sig> allows for rendering to be semantic, html to be tweaked
> as needs change (with the same markup), etc.
>
> Subbu.
>
>
> On 09/30/2014 05:00 PM, Brion Vibber wrote:
>
>> Some folks in #wikimedia-parsoid are still real excited about the idea
>> though, so a couple more notes should people decide they like it anyway.
>> :)
>>
>> * Consider either a wikitext wrapper like {{#sig:Username}} (my
>> preference)
>> or a markup tag like <sig>Username</sig> (Gabriel's preference I think?)
>> to
>> go in the wikitext; this will make the resulting sigs look less crufty in
>> talk and vote pages (which do still exist, alas!)
>>
>> * Use a span as the actual HTML rendering that can be parsoid-friendly and
>> thus VisualEditor-friendly.
>>
>> * Consider though whether the HTML should be "spoofable" and what happens
>> if you do.
>>
>> * Consider that old revisions and archived talk pages will not have this
>> markup, so there could be inconsistency. Beware what you use it for etc.
>>
>> -- brion
>>
>> On Tue, Sep 30, 2014 at 2:28 PM, Brion Vibber <[email protected]>
>> wrote:
>>
>>  Please don't; signatures belong as a feature of the discussion and voting
>>> systems and don't belong in wikitext. They're crufty enough as is and I'd
>>> recommend against making them cruftier.
>>>
>>> -- brion
>>>
>>> On Tue, Sep 30, 2014 at 1:57 PM, Erik Bernhardson <
>>> [email protected]> wrote:
>>>
>>>  There is currently a patch in gerrit,
>>>> https://gerrit.wikimedia.org/r/#/c/130094/ , that has been hanging
>>>> around
>>>> for a few months.  To me it seems like an easy patch with some obvious
>>>> benefits.
>>>>
>>>> JackMcbarn suggested this might need wider discussion/notice so putting
>>>> it
>>>> up here to get a little more visibility.
>>>>
>>>> Erik B.
>>>> _______________________________________________
>>>> Wikitech-l mailing list
>>>> [email protected]
>>>> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>>>>
>>>
>>>
>>>  _______________________________________________
>> Wikitech-l mailing list
>> [email protected]
>> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>>
>
>
> _______________________________________________
> Wikitech-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to