Page MenuHomePhabricator

Suggested investigations: The CodexTablePager limit selector at the bottom of the pager does not work
Closed, ResolvedPublic

Description

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
  • 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)

Acceptance criteria

Event Timeline

I seem to get this consistently using the dropdown at the bottom of the list. It just refreshes the list (and limit) being currently displayed.
The top dropdown seems to work fine.

Yeah, @Zzuuzz 's experience is the same as mine; the top and bottom controls have different behaviors.

Daimona renamed this task from Suggested investigations: Selected limit sometimes reverts back to the initial limit of 10 to Suggested investigations: limit selector at the bottom does not work in CodexTablePager.Sep 26 2025, 2:44 PM
Daimona subscribed.

FWIW, I came across the same issue as part of T400722.

FWIW, I came across the same issue as part of T400722.

Thanks. I am working on a fix which I should upload shortly. Would appreciate any review on it.

Change #1191714 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/core@master] [WIP] Fix mediawiki.pager.codex to work with multiple limit selectors

https://gerrit.wikimedia.org/r/1191714

Dreamy_Jazz renamed this task from Suggested investigations: limit selector at the bottom does not work in CodexTablePager to Suggested investigations: The CodexTablePager limit selector at the bottom of the pager does not work.Sep 26 2025, 3:37 PM

Change #1191714 merged by jenkins-bot:

[mediawiki/core@master] Fix mediawiki.pager.codex to work with multiple limit selectors

https://gerrit.wikimedia.org/r/1191714