silverstripe / silverstripe-framework

Silverstripe Framework, the MVC framework that powers Silverstripe CMS
https://www.silverstripe.org
BSD 3-Clause "New" or "Revised" License
722 stars 821 forks source link

Make GridFieldComponents work with arbitrary `ViewableData` where practical #10771

Closed GuySartorelli closed 9 months ago

GuySartorelli commented 1 year ago

Currently most GridFieldComponent classes implicitly require some methods which are implemented on DataObject but not on ViewableData.

It is not uncommon to want to use a GridField with other viewable data, such as ArrayData (e.g. pulled from some API).

It should be easy to use most GridField components with arbitrary ViewableData. Any components for which this is not practical should be clearly documented as requiring specific methods (and in CMS 6 probably will be typehinted to DataObject).

Acceptance Criteria

Notes

PRs

GuySartorelli commented 1 year ago

My proposed rules of thumb for what "where practical" means:

maxime-rainville commented 10 months ago

The following modules have GridField components:

Maybe updating those is beyond the scope of this card.

GuySartorelli commented 10 months ago

@maxime-rainville I already made a card for symbiote/silverstripe-gridfieldextensions since that has generic components (see link in issue description)

Advanced workflow is explicitly out of scope - as are a few others there which are only intended to be used in the way the module uses it, rather than in developer-defined gridfields. ckan-registry isn't even supported anymore....

Maybe open a card to cover any there which:

maxime-rainville commented 9 months ago

It is done.