Page MenuHomePhabricator

Convert Newsletter to use ContentHandler
Closed, ResolvedPublic

Description

While talking with maintaining edit logs and etc for description and etc, @Legoktm asked why were not using Wikitext for anything, and it seems like the best thing to do!

https://www.mediawiki.org/wiki/Manual:ContentHandler

Details

Related Gerrit Patches:
mediawiki/extensions/Newsletter : masterRemove unused $user passed to NewsletterEditPage
mediawiki/extensions/Newsletter : masterAdd in NewsletterDiffEngine to explore history
mediawiki/extensions/Newsletter : masterShow up NewsletterEditPage for editing Newsletter content
mediawiki/extensions/Newsletter : masterIntroduce ContentHandler on the Newsletter CustomEditpage
mediawiki/extensions/Newsletter : masterConvert Newsletter to use contenthandler
mediawiki/extensions/Newsletter : masterIntroduce NewsletterEditorPage

Related Objects

StatusSubtypeAssignedTask
DuplicateQgil
ResolvedQgil
ResolvedQgil
DeclinedNone
ResolvedAddshore
DuplicateNone
Resolvedori
ResolvedBawolff
ResolvedGlaisher
ResolvedTinaj1234
DeclinedNone
ResolvedGlaisher
Resolved01tonythomas
ResolvedGlaisher
Resolved01tonythomas
OpenNone
OpenDaimona
OpenDaimona
Resolved01tonythomas
ResolvedQgil
ResolvedFilip
ResolvedD3r1ck01
ResolvedNone
Resolved01tonythomas
Resolved01tonythomas
Resolved01tonythomas
Resolved01tonythomas
Resolvednikitavbv
InvalidNone
ResolvedFilip
DuplicateNone
Resolved01tonythomas
ResolvedFilip
ResolvedMtDu
ResolvedMtDu
ResolvedGeorggi199
ResolvedFilip
ResolvedPppery
ResolvedFilip
ResolvedPppery
ResolvedPppery

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJun 23 2016, 7:50 AM

Change 295670 had a related patch set uploaded (by 01tonythomas):
[WIP] Convert Newsletter to use contenthandler

https://gerrit.wikimedia.org/r/295670

Aklapper renamed this task from Convert Newlsetter to use ContentHandler to Convert Newsletter to use ContentHandler.Jun 24 2016, 11:34 AM

From what I can understand about Contenthandler, we might need the following things:

  1. You cannot just rename a newsletter (but can change its main page) from the manage page, but to rename a newsletter, it would mean to move it using the move dropdown on the right corner. So I will remove the input box from the code from there, and this will be logged (just like a wiki page)
  2. Delete button would not be needed anymore, and this will happen pure wiki way too, logged in the proper way!

From what I can understand about Contenthandler, we might need the following things:

  1. You cannot just rename a newsletter (but can change its main page) from the manage page, but to rename a newsletter, it would mean to move it using the move dropdown on the right corner. So I will remove the input box from the code from there, and this will be logged (just like a wiki page)
  2. Delete button would not be needed anymore, and this will happen pure wiki way too, logged in the proper way!

Done these, and I think the wiki way is making the Newsletter look more solid! I have added an additional box called 'Edit Summary' to the Special:Newsletter/manage form so that it would store the summary for the log.

Right now we can delete and later restore a Newsletter too, via Special:Undelete!

Qgil added a comment.Jun 26 2016, 11:25 AM

Tony, thank you for all this work! The whole logging problem is a lot more solid now, and we even got some features for free.

Thank you @Qgil . Looks like its still lacking review. I think we will have to post this to the mailing list to get someone's attention :(

Qgil added a comment.Jul 29 2016, 2:50 PM

Still unreviewed? Any idea of who has the skills to review this patch? In short, this is the patch that is stopping the Newsletter extension from being deployed in Wikimedia.

Still unreviewed? Any idea of who has the skills to review this patch? In short, this is the patch that is stopping the Newsletter extension from being deployed in Wikimedia.

The names that come into my mind are @Legoktm , @hoo, @Glaisher, @Addshore !

Change 303984 had a related patch set uploaded (by 01tonythomas):
Make action=edit in a Newsletter namespace invoke Special:Newsletter

https://gerrit.wikimedia.org/r/303984

Change 304692 had a related patch set uploaded (by 01tonythomas):
Introduce ContentHandler on the Newsletter CustomEditpage

https://gerrit.wikimedia.org/r/304692

Change 309849 had a related patch set uploaded (by 01tonythomas):
Show up NewsletterEditPage for editing Newsletter contet

https://gerrit.wikimedia.org/r/309849

Qgil triaged this task as Medium priority.Sep 12 2016, 9:07 AM

Change 303984 merged by jenkins-bot:
Introduce NewsletterEditorPage

https://gerrit.wikimedia.org/r/303984

Change 295670 abandoned by 01tonythomas:
Convert Newsletter to use contenthandler

Reason:
We have split the same to multiple other commits. This one is technically, deprecated!

https://gerrit.wikimedia.org/r/295670

Qgil added a comment.Oct 14 2016, 9:36 AM

Interesting! @01tonythomas could you share a short update about he status of this task? Is it progressing, are you optimistic, any estimate about when you think this might be completed?

I must tell you that almost every week I get one person or another asking about the Newsletter extension, whether it is still a thing and whether it will be available in Wikimedia. :)

Interesting! @01tonythomas could you share a short update about he status of this task? Is it progressing, are you optimistic, any estimate about when you think this might be completed?
I must tell you that almost every week I get one person or another asking about the Newsletter extension, whether it is still a thing and whether it will be available in Wikimedia. :)

I am really optimistic it gets finished soon, as we have only 2/3 left now in https://gerrit.wikimedia.org/r/#/q/topic:shiftToContentHandler for review. If I can get say 10 minutes of @Legoktm or @Addshore, this can be even complted then and there.

Btw, I am stuck at one of legoktms comment here https://gerrit.wikimedia.org/r/#/c/304692/17/includes/NewsletterStore.php. If I do not get a reply today, maybe I will have to open a task, asking for help :-(.

I am also sad that this never made it into production (but we had drastic changes in between).-

Change 304692 merged by jenkins-bot:
Introduce ContentHandler on the Newsletter CustomEditpage

https://gerrit.wikimedia.org/r/304692

Qgil awarded a token.Oct 27 2016, 1:45 AM
Qgil added a comment.Oct 27 2016, 12:57 PM

@01tonythomas is there any work left here? Has the latest version be deployed to our Labs instance and/or Beta for testing?

@01tonythomas is there any work left here? Has the latest version be deployed to our Labs instance and/or Beta for testing?

Not yet :-( I am stuck in a rebase loop at https://gerrit.wikimedia.org/r/#/c/309849/ Let me see if I can get that resolved today.

Not yet :-( I am stuck in a rebase loop at https://gerrit.wikimedia.org/r/#/c/309849/ Let me see if I can get that resolved today.

I just fixed the rebase issue btw. Looks like there are more issues to be fixed. Will update the task once done.

Not yet :-( I am stuck in a rebase loop at https://gerrit.wikimedia.org/r/#/c/309849/ Let me see if I can get that resolved today.

I just fixed the rebase issue btw. Looks like there are more issues to be fixed. Will update the task once done.

I see things are working, and I am going to merge the same. I will come up with more tasks which might be blockers, and easy for people to fix post the merge.

Change 309849 merged by jenkins-bot:
Show up NewsletterEditPage for editing Newsletter content

https://gerrit.wikimedia.org/r/309849

Change 319007 had a related patch set uploaded (by 01tonythomas):
Add in NewsletterDiffEngine to explore history

https://gerrit.wikimedia.org/r/319007

Change 319007 merged by jenkins-bot:
Add in NewsletterDiffEngine to explore history

https://gerrit.wikimedia.org/r/319007

Alright. So I think we can have all those tasks in the list as Google-Code-In-2016 tasks, we will have loads more, and this would be the bets program to fix them up.

I will pulled the changes to http://newsletter-test.wmflabs.org/wiki/Main_Page, and things are live there.

I will have to open up some other task to clear the tables, so that the new system works.

Qgil added a comment.Nov 2 2016, 1:50 PM

Good idea!

Change 319998 had a related patch set uploaded (by 01tonythomas):
Remove unused $user passed to NewsletterEditPage

https://gerrit.wikimedia.org/r/319998

Change 319998 merged by jenkins-bot:
Remove unused $user passed to NewsletterEditPage

https://gerrit.wikimedia.org/r/319998

01tonythomas closed this task as Resolved.Dec 26 2016, 12:33 PM
01tonythomas added a subscriber: Reedy.

Alright. Thanks to Google-Code-In-2016, we are left with no more blockers for this. At this point, the newsletter extension stores relevant things with ContentHandler, and you can see it in action here - http://newsletter-test.wmflabs.org/wiki/Newsletter:CustomOne.

We got the advantage of better logging, more wiki way page editing, deletion and undeletion, moving of newsletter names etc possible due to the shift, and thanks to @Legoktm for the idea. @Glaisher and @Addshore @Reedy @Qgil for your contributions and patience :D

Qgil added a comment.Dec 28 2016, 10:41 AM

Thank you for *your* partience, @01tonythomas!

01tonythomas reopened this task as Open.Dec 30 2016, 11:33 PM

Heh. Flippiing it open agian!