-
Notifications
You must be signed in to change notification settings - Fork 58
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
DOC Remove GraphQL #556
DOC Remove GraphQL #556
Conversation
fcb8db7
to
ac22c8f
Compare
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.
There's docs not in the graphql section that need updating, e.g. https://docs.silverstripe.org/en/5/developer_guides/customising_the_admin_interface/reactjs_redux_and_graphql/ and https://docs.silverstripe.org/en/5/developer_guides/model/versioning/#history-viewer-gql
5c3771a
to
906da23
Compare
Have removed the other mentions of graphql in the docs |
@@ -1018,412 +1018,6 @@ Versioned::set_reading_mode($origMode); | |||
|
|||
See [Reading versions by stage](#reading-versions-by-stage) for more about using reading modes. | |||
|
|||
## Using the history viewer |
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.
Need to document the new way to do it, rather than just deleting the docs altogether. This is still a valid thing for people to want to do.
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.
Turns out you can just add HistoryViewerField
to your form and it works.
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.
This still hasn't been updated? It should be pretty quick docs to write. Just a short php example adding that field to a new Root.History
tab.
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.
Have added.
In my testing I noticed pretty quickly the DataObjects with has_many relations doesn't work in the history viewer, because there's no react GridField. I've opted to just remove the GridFields
- I'm manually removing them in the versioned-admin PR here
- I've added a comment to the framework PR about why we don't use the structural schema data type
I also noticed that when reverting a DataObject that the edit form still shows the old record instead of the reverted to version, so I've opted to simply refresh the entire page. Regular pages don't have this issue because the pages reloads when switching between tabs (which doesn't happen with regular DataObjects). New code to do that here
Linting failure as well. |
906da23
to
6129be0
Compare
@@ -1018,412 +1018,6 @@ Versioned::set_reading_mode($origMode); | |||
|
|||
See [Reading versions by stage](#reading-versions-by-stage) for more about using reading modes. | |||
|
|||
## Using the history viewer |
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.
This still hasn't been updated? It should be pretty quick docs to write. Just a short php example adding that field to a new Root.History
tab.
b7ef6aa
to
01392da
Compare
Still has a linting failure. |
d339e38
to
f48b162
Compare
f48b162
to
b5a8f84
Compare
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.
re-approved most recent changes
This example assumes you have some `DataObject` model and somewhere to view that model (e.g. in a `ModelAdmin`). We'll walk you through the steps required to add some JavaScript to tell the history viewer how to handle requests for your model. | ||
|
||
For this example we'll start with this simple `DataObject`: | ||
You can add the [`HistoryViewerField`](api:SilverStripe\VersionedAdmin\Forms\HistoryViewerField) to the edit form of any [`DataObject`](api:SilverStripe\ORM\DataObject) with the [`Versioned`](api:SilverStripe\Versioned\Versioned) extension. This will allow CMS users revert to a previous version of the record. |
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.
You can add the [`HistoryViewerField`](api:SilverStripe\VersionedAdmin\Forms\HistoryViewerField) to the edit form of any [`DataObject`](api:SilverStripe\ORM\DataObject) with the [`Versioned`](api:SilverStripe\Versioned\Versioned) extension. This will allow CMS users revert to a previous version of the record. | |
You can add the [`HistoryViewerField`](api:SilverStripe\VersionedAdmin\Forms\HistoryViewerField) to the edit form of any [`DataObject`](api:SilverStripe\ORM\DataObject) with the [`Versioned`](api:SilverStripe\Versioned\Versioned) extension. This will allow CMS users to view the version history for the record and revert to a previous version of the record. |
Issue silverstripe/silverstripe-admin#1799
GraphQL is becoming an optional module, so docs are being re-housed in the GraphQL module