Page MenuHomePhabricator

Refactoring Nearby: Remove messageBox template partial inside Nearby
Closed, ResolvedPublic2 Story Points

Description

The nearby View inside MobileFrontend manages a single template with 2 template partials "messageBox" and "pageList":

{{#errorOptions}}{{>messageBox}}{{/errorOptions}}
{{{spinner}}}
{{>pageList}}

Removing both of these template partials will simplify the component, and help remove inheritance (and eventually the need for the nearby.hogan template entirely!).

To start with we will look at the pageList template partial.

Acceptance criteria

  • The View.prototype.postRender method is used to prepend a new MessageBox using the contents of this.options.errorMEssage to this.$el
  • WatchstarPageList.prototype.templatePartials.messageBox is no longer defined
  • The line {{#errorOptions}}{{>messageBox}}{{/errorOptions}} is removed from nearby.hogan

Details

Related Gerrit Patches:
mediawiki/extensions/MobileFrontend : masterRemoves messageBox template partial from Nearby

Event Timeline

Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptMar 20 2019, 6:30 PM
Jdlrobson triaged this task as High priority.Mar 20 2019, 6:30 PM
Jdlrobson moved this task from Incoming to Upcoming on the Readers-Web-Backlog board.
Jdlrobson updated the task description. (Show Details)

Change 500551 had a related patch set uploaded (by Jdrewniak; owner: Jdrewniak):
[mediawiki/extensions/MobileFrontend@master] Removes messageBox template partial from Nearby

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

Change 500551 merged by Jdlrobson:
[mediawiki/extensions/MobileFrontend@master] Removes messageBox template partial from Nearby

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

Jdlrobson closed this task as Resolved.Apr 1 2019, 11:11 PM
Jdlrobson updated the task description. (Show Details)