Skip to content
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

Merged

Conversation

emteknetnz
Copy link
Member

@emteknetnz emteknetnz commented Aug 15, 2024

Issue silverstripe/silverstripe-admin#1799

GraphQL is becoming an optional module, so docs are being re-housed in the GraphQL module

@emteknetnz emteknetnz force-pushed the pulls/6/remove-graphql branch 5 times, most recently from fcb8db7 to ac22c8f Compare August 19, 2024 05:39
@emteknetnz emteknetnz marked this pull request as ready for review August 19, 2024 22:14
Copy link
Member

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

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

en/08_Changelogs/6.0.0.md Outdated Show resolved Hide resolved
en/08_Changelogs/6.0.0.md Show resolved Hide resolved
en/08_Changelogs/6.0.0.md Outdated Show resolved Hide resolved
@emteknetnz emteknetnz force-pushed the pulls/6/remove-graphql branch 2 times, most recently from 5c3771a to 906da23 Compare August 22, 2024 02:05
@emteknetnz
Copy link
Member Author

emteknetnz commented Aug 22, 2024

Have removed the other mentions of graphql in the docs

en/00_Getting_Started/00_Server_Requirements.md Outdated Show resolved Hide resolved
@@ -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
Copy link
Member

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.

Copy link
Member

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.

Copy link
Member

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.

Copy link
Member Author

@emteknetnz emteknetnz Aug 27, 2024

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

en/12_Project_Governance/08_Fixed_dependencies.md Outdated Show resolved Hide resolved
@GuySartorelli
Copy link
Member

Linting failure as well.

@emteknetnz emteknetnz force-pushed the pulls/6/remove-graphql branch from 906da23 to 6129be0 Compare August 22, 2024 06:27
@@ -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
Copy link
Member

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.

@emteknetnz emteknetnz force-pushed the pulls/6/remove-graphql branch 3 times, most recently from b7ef6aa to 01392da Compare August 28, 2024 02:09
@GuySartorelli
Copy link
Member

Still has a linting failure.

@emteknetnz emteknetnz force-pushed the pulls/6/remove-graphql branch 2 times, most recently from d339e38 to f48b162 Compare August 29, 2024 00:58
@emteknetnz emteknetnz force-pushed the pulls/6/remove-graphql branch from f48b162 to b5a8f84 Compare August 30, 2024 00:06
Copy link
Member

@GuySartorelli GuySartorelli left a 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.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
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.

@GuySartorelli GuySartorelli merged commit a14f291 into silverstripe:6 Sep 2, 2024
3 checks passed
@GuySartorelli GuySartorelli deleted the pulls/6/remove-graphql branch September 2, 2024 04:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants