Repository navigation
Render the records table in the admin Databases tab - #206
Merged
dnnsjsk merged 1 commit intoNov 11, 2026
Merged
Conversation
DatabaseRecordsTable passes children to DataViews, and DataViews renders its children instead of the default UI. The children were only DataViews.Footer, which returns null for a single page, so the records area stayed empty and the table never mounted. Add DataViews.Layout before the footer, like the registry tables do. Fixes inline0#205
Contributor
|
Merged and released in Blockstudio 7.7.14, integration commit b1c5139. The E2E regression verifies a real record on both the initial visit and a return visit, with record cleanup afterwards. Updated admin documentation and the production bundle are included. Full CI and distribution checks pass. Thanks for the contribution. |
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.
Fixes #205.
Cause
DatabaseRecordsTablepasses children toDataViews. DataViews renderschildren ?? <DefaultUI />(@wordpress/dataviews11.3.0,src/dataviews/index.tsx), so the children replace the whole default UI, including the layout. The only child wasDataViews.Footer, and the footer returnsnullwhen there is a single page and no bulk actions. So the.dataviews-wrapperstays empty, exactly as described in the issue. With more than 20 records, only the pagination would show.The
containerWidth: 0from the issue is a side effect, not the cause: in this version only the grid layouts attachresizeObserverRef, the table layout does not, socontainerWidthis 0 on the working Overview tables as well. TheTabPanelis not involved either.Change
Add
<DataViews.Layout />before<DataViews.Footer />, the same composition the registry tables use. Search and filters are left out on purpose: the records endpoint has no search parameter and the fields are not filterable.includes/admin/assets/admin/index.jsandindex.asset.phpare rebuilt withnpm run build. A build of the unchangedmainreproduces the committed bundles byte for byte, so the diff there is only this change.Tests
New E2E test
Admin Page - Databasesintests/e2e/admin/registry.ts: it creates a record in theblockstudio/type-db-tableschema of the test theme, opens Databases and that tab, expects a table with the record, and deletes the record again.There is no wp-env here, so I ran it against WordPress Playground (PHP 8.4, latest WordPress, the plugin and
tests/thememounted as intests/wp-env/.wp-env.json), with onlyBASEchanged: it passes with this change and fails on the 7.7.13 bundle ("element(s) not found" for the table). The same setup reproduces the empty tab from the issue without the change (wrapper with zero children, no console errors) and shows the table with all records with it.npm run lint,oxfmt --checkon the changed files andtscfortsconfig.json,tsconfig.tooling.jsonandtsconfig.browser.jsonpass. No new translatable strings.