Summary
The limit selector on the bottom of the CheckUser-SuggestedInvestigations pager does not work. We should make this work
Background
- The CheckUser-SuggestedInvestigations pager has a limit selector that allows a user to select the number of rows shown in a page
- This selector is shown both at the top and bottom of the page
- The bottom selector is not working for some reason
- This is likely an upstream bug with the CodexTablePager, as the top selector works as intended and the CodexTablePager is only used by CheckUser-SuggestedInvestigations (as of now)
Technical notes
- Codex CodexTablePager has JS files which make the limit selection functionality work
- This functionality assumes that only one form will exist, as it selects the form using the ID associated with the limit selector and not the class
- Because only one element can have a given ID, the jQuery code to listen for the change will listen to the first element on the page only
- This functionality assumes that only one form will exist, as it selects the form using the ID associated with the limit selector and not the class
- If we replace the ID selector with a CSS class, it should allow the code work as expected
- While doing it, we should test the JS code with QUnit tests so that we can know the fix worked as expected
- This may involve some necessary refactoring to make it possible to QUnit test that code (because it's unconditionally run on page load and so we cannot call it after we have set up the QUnit test fixture element for the test)
- While doing it, we should test the JS code with QUnit tests so that we can know the fix worked as expected
Acceptance criteria
- The bottom limit selector works as expected in the CheckUser-SuggestedInvestigations special page pager