Skip to content

[DataObject] [Classification Store] Fix selection modal: grid does not use full modal width and columns are not resizable - #3971

Merged
ValeriaMaltseva merged 2 commits into
pimcore:2026.2from
albertmueller:fix/classification-store-modal-grid-width
Aug 20, 2026
Merged

[DataObject] [Classification Store] Fix selection modal: grid does not use full modal width and columns are not resizable#3971
ValeriaMaltseva merged 2 commits into
pimcore:2026.2from
albertmueller:fix/classification-store-modal-grid-width

Conversation

@albertmueller

@albertmueller albertmueller commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Description

In the ClassificationStore selection modal (opened from the DataObject edit view when adding
a Collection/Group/Key to a classificationstore field), the selection grid in all three tabs
("Collection", "Gruppe"/"Group", "Nach Schlüssel gruppieren"/"Group by key") renders at a fixed
width far narrower than the modal itself, and its columns cannot be resized by dragging the
column border — unlike virtually every other grid in Studio (e.g. Predefined Properties,
Translations, Document Types).

Screenshot 2026-08-07 085247

Steps to reproduce

  1. Open any DataObject with a classificationstore field in Studio.
  2. Go to the field's "Attribute" tab and click "Hinzufügen" / "Add".
  3. Observe the selection modal: the grid only fills roughly the left third of the modal width,
    with a lot of empty space to the right.
  4. Try to drag the border between two column headers to resize a column — nothing happens.

Expected behavior

  • The grid should fill the full width of the modal (as it does with autoWidth elsewhere).
  • Columns should be resizable via drag, consistent with other Studio grids.

Actual behavior

  • The grid renders at the sum of TanStack's default column widths (150px each), leaving most
    of the modal empty.
  • Columns are not resizable.

Root cause

ClassificationStoreDataTab and ClassificationStoreCallbackTab
(src/core/modules/element/dynamic-types/definitions/objects/data-related/components/classification-store/components/classification-store-modal/components/classification-store-data-tab/)
render their <Grid> without the resizable and autoWidth props. Both props are required for
Grid to enable column resizing (Resizer) and full-width layout — see
src/core/components/grid/grid.tsx. Every other grid in the codebase that wants full-width /
resizable behavior sets both props explicitly (e.g.
src/core/modules/predefined-properties/table/table.tsx).

Environment

  • pimcore/studio-ui-bundle 2026.2.x
  • Pimcore 2026

Fixes pimcore/platform-version#304

A fix is ready: adds resizable/autoWidth to the two <Grid> usages and sets explicit column
sizes with one autoWidth column per tab (Collection/Group/GroupByKey), so the last column fills
the remaining space. PR will follow from branch fix/classification-store-modal-grid-width.

Fixed state:
Screenshot 2026-08-07 093606

Fixes pimcore/platform-version#304

albertmueller and others added 2 commits August 7, 2026 08:52
…izing

The Collection/Gruppe/"Nach Schlüssel gruppieren" selection grids never
passed `resizable`/`autoWidth` to Grid, unlike every other Studio grid,
so the table rendered at the sum of TanStack's default 150px column
widths instead of the modal's full width, and columns could not be
dragged wider.
Copilot AI balanced review requested due to automatic review settings August 7, 2026 07:59
@pimcore-deployments
pimcore-deployments marked this pull request as draft August 7, 2026 07:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes classification-store selection grids so they fill the modal width and support column resizing.

Changes:

  • Enables autoWidth and resizable on shared selection grids.
  • Adds stable column definitions with explicit sizes and one flexible column per tab.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tabs/group/group-tab.tsx Adds sized, flexible group columns.
tabs/group-by-key/group-by-key-tab.tsx Adds sized, flexible key columns.
tabs/collection/collection-tab.tsx Adds sized, flexible collection columns.
components/classification-store-data-tab/classification-store-data-tab.tsx Enables full-width, resizable grids.
components/classification-store-data-tab/classification-store-callback-tab.tsx Enables full-width, resizable callback grids.

@sonarqubecloud

sonarqubecloud Bot commented Aug 7, 2026

Copy link
Copy Markdown

@albertmueller
albertmueller marked this pull request as ready for review August 7, 2026 08:06
@ValeriaMaltseva
ValeriaMaltseva self-requested a review August 7, 2026 08:08
@ValeriaMaltseva ValeriaMaltseva added this to the 2026.2.7 milestone Aug 20, 2026

@kingjia90 kingjia90 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified against the Grid component API and all call sites:

  • autoWidth / resizable are real Grid props (grid.tsx:60, grid.tsx:250) and the per-column meta: { autoWidth: true } fill-pattern is the same one used by other Studio grids (e.g. saved-searches tab) — this brings the CS modal in line with the rest of Studio.
  • The one-autoWidth-column-per-grid validation in grid.tsx (validate if only one column has autoWidth) is respected: each tab defines exactly one flexible column.
  • The two shared renderers (classification-store-data-tab.tsx, classification-store-callback-tab.tsx) are only consumed by the three updated tabs (collection / group / group-by-key), so no other grid picks up the new behaviour unintentionally.
  • useMemo on the column defs with [t] is correct and now actually load-bearing, since the grid's autoWidth validation memoizes on column identity.
  • Copilot: no findings. CI green (build, lint, types, Codeception, PHPStan, Sonar).

I added Fixes pimcore/platform-version#304 to the description so the issue-link guardrail passes and the issue auto-closes on merge.

@kingjia90 kingjia90 self-assigned this Aug 20, 2026

@ValeriaMaltseva ValeriaMaltseva left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@albertmueller
Hi! I really appreciate your help. Thanks! :)
I'll merge the PR.

@ValeriaMaltseva
ValeriaMaltseva merged commit d25ef3d into pimcore:2026.2 Aug 20, 2026
34 of 37 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants