Page MenuHomePhabricator

MFA: Add TopicTitleList component
Closed, DeclinedPublic2 Estimated Story Points

Description

Category, Language and Talk Overlay's render sub-components (list items) that look identical but are built differently. Building these the same way should improve consistency and remove the need for template partials.

LanguageTalkCategory
Screen Shot 2019-02-12 at 2.44.59 PM.png (158×527 px, 13 KB)
Screen Shot 2019-02-12 at 2.45.14 PM.png (158×525 px, 18 KB)
Screen Shot 2019-02-12 at 2.45.07 PM.png (118×530 px, 16 KB)

Developer notes

topic-title-list is use in category, language and talk overlay.
Rather than relying on jQuery selectors to update these, it might be better to think of this as a component that's included inside the TalkOverlay and CategoryOverlay.

This task encompasses the work to:

  • Create a TopicTitleList unordered list component. The component should supply a trim API that supports existing use cases including clear() and add().
  • Replace inline <ul class=topic-title-list> usages with new TopicTitleList component.
docfix x ~/git/core/extensions/MobileFrontend $ ag "topic-title-list" resources/
resources/mobile.categories.overlays/CategoryOverlay.hogan
12:	<ul class="topic-title-list normal-catlist"></ul>
13:	<ul class="topic-title-list hidden hidden-catlist"></ul>

resources/mobile.categories.overlays/CategoryOverlay.js
148:			this.$( '.topic-title-list' ).toggleClass( 'hidden' );

resources/mobile.pagelist.styles/pagelist.less
36:.topic-title-list,
150:	.topic-title-list,

resources/mobile.talk.overlays/content.hogan
5:	<ul class="topic-title-list">

resources/mobile.talk.overlays/TalkOverlay.js
97:			this.$( '.topic-title-list' ).empty();

Event Timeline

Niedzielski subscribed.

@Jdlrobson, I've tried to clarify the requirements for this task. Please revert / edit if I've botched it!

ovasileva set the point value for this task to 2.Feb 14 2018, 5:46 PM

Change 469537 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] New component: Add TopicTitleList component

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

Jdlrobson renamed this task from Add TopicTitleList component to MFA: Add TopicTitleList component.Nov 15 2018, 6:54 PM
Jdlrobson raised the priority of this task from Low to Medium.Feb 12 2019, 10:42 PM
Jdlrobson edited projects, added Web-Team-Backlog; removed Web-Team-Backlog (Tracking).

Change 469537 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] New components: PromisedView and TopicTitleList component

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

Change 490264 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] New component: TopicTitleList component

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

Change 490264 abandoned by Jdlrobson:
New component: TopicTitleList component

Reason:
Not actively working on this right now and it needs to be expanded to include TalkOverlay when https://gerrit.wikimedia.org/r/471334 lands.

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

Jdlrobson triaged this task as Medium priority.Mar 15 2019, 7:44 PM
Jdlrobson lowered the priority of this task from Medium to Low.Apr 9 2019, 4:15 PM

applying YAGNI since this is a 2 year old bug and a component library seems to be an important precursor.