Skip to content

Widget Dashboard: let hosts lower the wide-container column cap through gridSettings.columns #82173

Closed

Description

@Nikschavan

What problem does this address?

The dashboard's column count is fixed at four on wide containers. WIDGET_DASHBOARD_COLUMN_COUNT is a hard-coded constant, and resolveGridSettings() overwrites whatever columns the host passes with it. The columns field on WidgetGridSettings is kept for persisted payloads but has no effect.

A host that embeds the dashboard in its own surface has no way to run it with fewer columns. A CSS override doesn't work because drag and resize math reads the same columns value the package computes.

What is your proposed solution?

Keep the constant as the default and the ceiling, and let a host lower it:

  • resolveGridSettings() honors gridSettings.columns, clamped to 1…WIDGET_DASHBOARD_COLUMN_COUNT, falling back to the constant when the field is absent or invalid.
  • resolveDashboardColumnCount() takes the cap as a parameter, so the responsive steps scale from it: cap → min( 2, cap ) → 1, so a cap of 1 never steps up in the middle band.
  • useDashboardContainerColumnCount() and Widgets thread gridSettings.columns through.
  • Docs on the constant and the columns field updated to say "default cap; hosts may lower it".

Nothing changes for current hosts: DEFAULT_GRID already sets columns: 4, so the wp-admin dashboard keeps 4 → 2 → 1. The Layout settings drawer stays as #78732 left it — no Columns control returns. This is a host setting, the same way rowHeight already is.

I'll follow up with a PR.

Related

Activity

  1. added
    [Type] Experimental
    [Feature] Dashboard
    [Package] Widget Dashboard
    on Aug 28, 2026
  2. added
    [Status] In Progress
    on Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

[Feature] Dashboard[Package] Widget Dashboard[Status] In Progress[Type] Experimental

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions