InternationalScratchWiki / mw-scratchsig3

The MediaWiki parser tag to render a signature that includes a user's Scratch avatar
2 stars 1 forks source link

scratchsig doesn't work with echo #16

Open mrsrec opened 9 months ago

mrsrec commented 9 months ago

Making a talk page post and signing it with scratchsig won't trigger an Echo notification.

Echo works by "expanding" the wikitext including templates and such into the actual formatting that would be rendered into HTML, and scanning that for an appropriate link. A link to your userpage, talk page, or contributions page is required for a notification to be sent.

Unfortunately, because scratchsig isn't a template or module, and is an actual tag, that's as far as the "expanding" process would go--because that tag spits out HTML, even if it does so via wikitext. This means that in its current state, scratchsig won't work with Echo.

@jacob-g has created a short-term mitigation for this issue by hacking the Echo core to look for the scratchsig tags, but this isn't a good long-term solution.

Other ideas suggested include:

This issue is a good place to track the long-term Echo issue

mrsrec commented 9 months ago

My idea based on Kenny2github's idea: https://discord.com/channels/328938947717890058/764646854343655464/1185315307112374382


OK, thinking about this some more I have some new ideas.

PFPs can work via user ID, and they can be put in "in-plae" at time of editing, this saves recursive calls.

For legacy tag, archive pages can be edited. This means that history diffs will break, but maybe there can be a tag there that doesn't use lookups or something

So something like:

<scratchpfp id="661830" />

And a magic tag like {{subst:GETSCRATCHUSERID#mrsrec}} which would be replaced with 661830 when the page saves.

Then, the default signature is:

<scratchpfp id="{{subst:GETSCRATCHUSERID#{{subst:REVISIONUSER}}" /> [[User:{{subst:REVISIONUSER}}|{{subst:REVISIONUSER}}]] ([[User_talk:{{subst:REVISIONUSER}}|talk]]) Thoughts?

Kenny2github commented 9 months ago

My opinion is that you should consider the original <scratchsig> tag immutable. The user-facing behavior of that must not change - we are not going to go back and edit archives. Either we get that tag working with Echo (ideally) or we keep <scratchsig> as is and find some other solution.

mrsrec commented 9 months ago

My opinion is that you should consider the original <scratchsig> tag immutable. The user-facing behavior of that must not change - we are not going to go back and edit archives. Either we get that tag working with Echo (ideally) or we keep <scratchsig> as is and find some other solution.

Hmmm.. OK, but this confuses me, because changing how signatures work and moving avatars to a different tag was your idea in the first place. Did I misunderstand you or did you change your mind? Either way please let me know, thank you.

Kenny2github commented 9 months ago

My idea was to add a different tag for the new kind of signature and use that going forward. In all cases my intent was for <scratchsig> to either work or be kept in perpetuity for backwards compatibility.

mrsrec commented 9 months ago

OK. That's what I meant as well. The external calls could probably go away but other than that there's no need to change it. These are proposals for new tags and usage from now on--old edits wouldn't need to be changed since only new ones would generate notifications.

Which of them does everyone think is best?