Skip to content

Admin Databases tab renders empty table — DataViews containerWidth stays 0 on TabPanel-mounted views #205

Closed

Description

@Gierand

Bug

Tools → Blockstudio → Databases shows the per-schema tabs correctly, but the records area stays empty — no table, no chrome, no error. The schemas are discovered and the REST endpoint returns records, but the DataViews table never renders.

Steps to reproduce

  1. Register any db.php schema with records (e.g. a table or post_type storage schema with a few rows).
  2. Open wp-admin/tools.php?page=blockstudio-admin → Databases.
  3. Each schema tab renders its label, but the tab panel below is empty.

Expected

DataViews table with the records (as documented: "displays actual records inside a DataViews table").

What I verified

  • GET /wp-json/blockstudio/v1/admin/databases?key=… returns 200 with {"items":[…],"total":4} — backend and data are fine.
  • The mounted .dataviews-wrapper div contains zero children.
  • React fiber inspection of the mounted DataViews shows correct props: data: 4 items, fields: 7, view.type: "table", view.fields: [all 7 ids], paginationInfo: {totalItems: 4, totalPages: 1}.
  • DataViewsContext value is complete except containerWidth: 0 — while containerRef.current is a real, visible DIV with clientWidth ≈ 1070 and display: flex.
  • A fresh new ResizeObserver() on the same element fires immediately with the correct width, so the browser and the element are fine — the measurement inside the bundled DataViews never reaches containerWidth state.
  • The inner component rendered as the wrapper's only child returns null (presumably gated on containerWidth > 0), so the table never mounts.
  • The same bundled DataViews works on the Overview tab — the blocks table renders ~20 rows there. The difference: records views mount inside a WP TabPanel render-prop on tab activation (not at initial page render), which appears to break the container measurement.
  • Switching database tabs / remounting does not help; resizing the viewport does not help.
  • No console errors.

Environment

  • Blockstudio 7.7.5 and 7.7.13 — identical behavior on both
  • WordPress 7.2-beta4, Gutenberg plugin active (React 19.3.0) — also reproduces with Gutenberg deactivated
  • Chrome-based browser, Windows/Laragon

Suspected cause

The container-width measurement (ResizeObserver-driven containerWidth) never populates for DataViews instances mounted inside the databases TabPanel, so the inner layout component renders null permanently. Possibly the observer attaches before the panel content is connected/visible, or a useSyncExternalStore/state propagation issue under React 19.

Happy to test any patch or provide more diagnostics.

Activity

  1. added
    bug
    on Nov 9, 2026
  2. added 2 commits that reference this issue on Nov 11, 2026
    28c37a0
    823a2fd
  3. dnnsjsk commented on Nov 11, 2026

    @dnnsjsk
    Contributor

    Released in Blockstudio 7.7.14, via #206 and b1c5139. The records view now explicitly renders DataViews.Layout alongside its footer. An E2E regression creates a record and verifies the table and record are visible both when opening and revisiting the Databases view. Full CI and distribution checks pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions