Update [08/08]
Originally in this tasks we had not considered subsections. Subsection issues required writing code to identify which section contents belongs to - much trickier than a 3 pointer. Some nitpicks on patches remain.
---------------------------------------
== Background
In {T191303} we noted that there are some issues with displaying section issues. This task is to clarify and apply the expected behavior
== Acceptance criteria
[] Continue displaying section issues on the page
[] When a section issue is selected, only display issues from the given section in the page issues modal
[] Perform full QA for section issues
[] for the existing treatment, we should ensure we do not show section issues and do not show them inside the issues overlay when open (i.e. keep existing behaviour)
= Testing steps
**Group B**
Ensure you have been bucketed in test group B (banner visible at top of Equity_release)
* Visit http://reading-web-staging.wmflabs.org/wiki/Rh_blood_group_system and scroll to the "Origin of RHD polymorphism" section
* Clicking the issue banner at the top of the section should lead to a modal with the full issue description
* Likewise navigate to http://reading-web-staging.wmflabs.org/wiki/Alabama. The "Media" and "Culture" sections should each have issues at the top. Clicking these should lead to a modal with the full issue description
* Visit page http://reading-web-staging.wmflabs.org/wiki/Equity_release. This page has both a page issue and a section issue (in the "United States" section). Clicking the page issue at the top of the page should lead to a modal with only a description of that issue. Likewise for the section issue. Neither of the modals should contain descriptions of both issues.
* Visit http://reading-web-staging.wmflabs.org/wiki/Pharmacovigilance. This page has multiple page issues (3) as well as section issues (the first five sections each have an issue). Again click the issues and check the modal to make sure that only the issue descriptions pertaining to the respective issues are appearing. So each of the section issues should only display one issue in their modals.
* Check "http://reading-web-staging.wmflabs.org/wiki/Category:Use_American_English_from_January_2014" and "http://reading-web-staging.wmflabs.org/wiki/Talk:Pharmacovigilance" show a link under the title
**Group A**
* On Alabama and Rh blood system "This page has issues" banner should NOT show (current issues only displays for lead section).
* On Equity_release ensure or Pharmacovigilance "This page has issues" banner shows at top and only contains one issue relating to citations
* Check "Category:Use_American_English_from_January_2014" and "Talk:Pharmacovigilance" show a link under the title
= developer notes
Right now we only extract issues from the first section. We will need to run this code on every section when the user is in the new treatment.
Right now the issues overlay is tied to the route #/issues. We will need to expand the route to #/issues/《sectionNum》to link overlays to their corresponding section. Should be relatively straightforward but may require storing an object which links section id to list of issues (right now we store section 0s issues in a local one dimensional array).
Note on desktop there is currently no concept of sections. Here it's probably best to show all issues inside a single overlay linked to from all issues in page. Dont worry too much about desktop Minerva. Long term the parser will have sections and this problem will go away.