The page issues work has accumulated a lot of technical debt.
If the A/B test shows we need to keep this code and maintain it, it's essential that we make changes to accommodate this change as being permanent.
We will make changes to user edited templates to clarify an expected structure that issues should adhere to for display in mobile.
- Implement a generic solution for all projects per T201975
- Simplify resources/skins.minerva.scripts/pageIssueParser.js by making changes in associated templates and simplify our code. T206177
- Simplify icon generation - rather than removing the desktop icon and injecting a new icon for mobile, add the mobile icon in the template T206177
- Migrate any styles from Minerva via TemplateStyles. (Tracked in T212263.)
- There is per issue parsing logic in pageIssuesParser.js and group parsing in pageIssues.js. The latter should be separated into pageIssuesParser.js or a new file. There's some related discussion in this patch. (Tracked in T212371)
- There is view creation and detailed binding logic in pageIssues.js. This should be extracted into pageIssuesView.js / Presenter.js / Renderer.js. Since we're changing the DOM, we should consider moving resources/skins.minerva.content.styles/templates/ambox.less to something more page issues specific. (Tracked in T212376)
- pageIssues.js has unclear responsibilities in name. It seems to be all about formatting which requires parsing an input DOM into a model and then rendering the result. We should rename it to pageIssuesFormatter.js so its responsibilities are as clear as possible. (Also covered in T212376.)