Page MenuHomePhabricator

Make MobileContext modular by creating the Blacklist service
Closed, DeclinedPublic5 Estimated Story Points

Description

Blacklist is a provisional name.


MobileContext#isBlacklistedPage and #isBlacklistedPageInternal are the part of the
MobileFrontend codebase that allows wiki administrators to disable displaying the mobile view for a set of
pages and/or a category.

AC

  • The MobileContext class no longer bears responsibility for dealing with blacklisting
  • The exists a MobileFrontend.Blacklist service that is responsible for blacklisting

Proposed Plan (YMMV)

  • Find out if MediaWiki has a cleaner way of testing whether a page is in a category
  • Create the CategoryService class, which answers the following question: is this page in that category?
  • Create the MobileFrontend.Blacklist service class, which depends on the CategoryRepository class
  • Make MobileContext depend on the service class and delegate to it when dealing with blacklisting

Event Timeline

phuedx updated the task description. (Show Details)
jhobs triaged this task as Medium priority.Aug 29 2016, 5:13 PM
jhobs moved this task from Incoming to Triaged but Future on the Web-Team-Backlog board.
ovasileva set the point value for this task to 5.Oct 19 2016, 4:29 PM
Jdlrobson added subscribers: pmiazga, Jdlrobson.

@pmiazga can you take a look at this and see what you think? Let's chat later in the week, but I want to start thinking about improving our MobileContext and MobileFormatter code so I think it's worth spending some time here.

Separating code by responsibilities is always a good idea. I think it's ready to work on, moving to "triaged but future".

Jdlrobson lowered the priority of this task from Medium to Low.Jun 6 2017, 5:21 PM
Jdlrobson raised the priority of this task from Low to Medium.Feb 14 2018, 11:48 PM

I'm interesting in us refactoring MobileContext given the good work we've done inside MobileFormatter.

Jdlrobson lowered the priority of this task from Medium to Low.Apr 9 2019, 4:14 PM

Reflecting reality

Jdlrobson closed this task as Declined.EditedApr 27 2021, 9:49 PM

I looked into this today as part of T277951 and I believe the service for disabling mobile view on certain pages can be removed altogether. According to our configuration we only use this on foundationwiki and that is no longer using these features in practice.