Background
Over the years various pieces of code have been accumulated that either never get run or do not apply to anything.
User story
As a developer I want a better understanding of the code I actually need to support.
Requirements
- Remove unused config options per T409350.
- Toggler using event bus emits a 'section-toggled' event that is never used. gerrit
- The modules mobile.pagelist.styles and mobile.pagesummary.styles are only used on Special:EditWatchlist so should be merged into amobile.special.styles and scoped to .mw-special-EditWatchlist.mw-mf-amc-disabled so we have two less modules to maintain. (gerrit)
- The includes/template/ContentBox.mustache template is no longer used gerrit
- We provide unmaintained styles for MobileFrontend + Vector skins which is not publicly accessible in skinStyles/mobile.startup/vector.less gerrit
- In src/mobile.init/mobile.init.js we have the following code block relating to a localStorage migration that happened 2 years ago (gerrit)
function migrateXLargeToLarge() { if ( document.documentElement.classList.contains( 'mf-font-size-clientpref-xlarge' ) ) { if ( mw.user.isAnon() ) { mw.user.clientPrefs.set( FONT_SIZE_KEY, 'large' ); } else { api.saveOption( FONT_SIZE_KEY, 'large' ); } } }
function migrateLegacyExpandAllSectionsToggle() { const currentValue = mw.storage.get( 'expandSections' ); if ( currentValue ) { if ( mw.user.isAnon() ) { mw.user.clientPrefs.set( SECTION_COLLAPSING_TOGGLE, '1' ); } else { api.saveOption( SECTION_COLLAPSING_TOGGLE, '1' ); } storage.remove( 'expandSections' ); } } migrateXLargeToLarge(); migrateLegacyExpandAllSectionsToggle();
- Following T385509 mobile.special.mobileoptions.scripts.js has a function infuseToggles which is only used once and only applies to one item. This should be simplified (possibly renaming infuseToggle. Original discussion/context. (gerrit)
BDD
- For QA engineer to fill out
Test Steps
- For QA engineer to fill out
Design
- Add mockups and design requirements
Acceptance criteria
- Add acceptance criteria
Communication criteria - does this need an announcement or discussion?
- Add communication criteria
Rollback plan
- What is the rollback plan in production for this task if something goes wrong?
This task was created by Version 1.2.0 of the Web team task template using phabulous