Repository navigation
feat(list view): make the CRUD list page size configurable - #40
Merged
legal-s merged 2 commits intoOct 21, 2026
Merged
Conversation
hamon-a
reviewed
Oct 16, 2026
hamon-a
approved these changes
Oct 16, 2026
PLAID-153375
lefort-a
approved these changes
Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SUMMARY
The page size of the CRUD list views was hardcoded as
const PAGE_SIZE = 25;in every list page — 13 independent declarations, no way to change it without editing each file.This introduces a
LIST_VIEW_PAGE_SIZEconfig key, exposed to the frontend throughFRONTEND_CONF_KEYS, and a single sharedPAGE_SIZEconstant insrc/views/CRUD/constants.tsthat every list page now imports.The key is named
LIST_VIEW_PAGE_SIZErather thanPAGE_SIZEbecausesuperset/config.pyfeeds the flatapp.confignamespace shared with Flask and Flask-AppBuilder, where every neighbouring key is domain-scoped (SAMPLES_ROW_LIMIT,FILTER_SELECT_ROW_LIMIT,FAB_API_MAX_PAGE_SIZE).The default stays at 25, so behaviour is unchanged on merge. Deployments set their own value in
superset_config.pyor through the HelmconfigOverrides.Out of scope on purpose:
features/datasets/constants.tskeeps its ownPAGE_SIZE, sinceChangeDatasourceModalimports it for aTableViewand an API payload.views/CRUD/utils.tsxkeepsPAGE_SIZE = 5for the welcome page cards.components/Select/constants.tskeepsDEFAULT_PAGE_SIZE = 100for the async dropdown infinite scroll.PLAID-153375
TESTING INSTRUCTIONS
Automated:
npx jest src/views/CRUD/constants.test.ts— covers both branches, missing key falls back to 25,LIST_VIEW_PAGE_SIZE: 10is honoured.page_size:25on the list pages stay green without edits: the Jest setup leavesdata-bootstrapempty, soconfis{}and the fallback applies. 132 tests pass across the 13 list pages plusChangeDatasourceModal.tsc --noEmitclean.Manual:
LIST_VIEW_PAGE_SIZE = 10insuperset_config.py, restart the server./chart/list/— 10 rows, footer reads1-10 of N, page count recomputed on N/10./api/v1/chart/?q=(...,page_size:10)and the returnedcountis still the total./dashboard/list/./chart/list/?pageIndex=7(a bookmark from the 25-per-page era) — the view falls back to page 0 instead of rendering empty.ADDITIONAL INFORMATION