-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change GridfieldDetailForm to be opt-in #35
Change GridfieldDetailForm to be opt-in #35
Conversation
182a0bf
to
4e04e4e
Compare
4e04e4e
to
ecdba87
Compare
See silverstripe/silverstripe-framework#7295 for docs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, but the approach gives me pause. Something is really bothering me about the versioned_gridfield_extensions
DataObject setting.
We all know DataObject
is pretty monolithic and hosts a wide array of concerns, but it seems to me this is the first member of its API to speak directly to another class. Things like summary_fields
and searchable_fields
primarily used for GridField
, but there's a very reasonable case for using them elsewhere. So I guess without getting into a huge philosophical discussion on one static, I'm wondering two things:
-
Is there better semantics we can assign this, so that it could conceivably be consumed by other APIs?
-
Is this the best place to store this setting? Just thinking out loud here, but what if we made it
GridFieldItemRequest
's concern, and registered versioned DataObjects with it, rather than the other way around?
It's not an API of DataObject; I didn't add any
It doesn't need to be consumed by other APIs. This is a setting for a specific extension.
It would be a whole lot more complicated to do it that way so I chose the simplest way. |
Fixes #21