Page MenuHomePhabricator

MFA: Add TopicTitleList component
Closed, DeclinedPublic2 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

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 added a subscriber: Niedzielski.

@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 Normal.Feb 12 2019, 10:42 PM
Jdlrobson updated the task description. (Show Details)Feb 12 2019, 10:46 PM

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 raised the priority of this task from Normal to Needs Triage.Mar 8 2019, 8:03 PM
Jdlrobson triaged this task as Normal priority.Mar 15 2019, 7:44 PM
Jdlrobson lowered the priority of this task from Normal to Low.Apr 9 2019, 4:15 PM
Jdlrobson closed this task as Declined.Wed, Oct 2, 10:51 PM

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