You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 24, 2018. It is now read-only.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For usual posts we give the title, the excerpt, the guid and the content in two formats: raw and rendered. In case of revisions, we just gave the raw content. This PR extends the schema, which acts now like we know it from usual posts.
So, instead of content being a string it would now be an object:
content : {
raw : "",
rendered: "",
}
The raw property would only be send when context is set to edit.
I've made some tests. When I have a password protected post, the password is not written in the database for the revisions. I've removed the password checks.
Looks good to me! Going to do one last look through, I am not sure the consensus on whether to add this feature but +1 from me. It makes for better potential authoring experiences.
While I was working on it I was thinking of a small slider for loggedin authors in the front end where they would be able to slide back in history and see their revisions rendered in the frontend. Small toy, but hey. Wouldn't work without the rendered properties.
👍 from @rmccue, myself & @BE-Webdesign. There is an open question voiced by Ryan around whether this change moves Revisions sufficiently close to Posts that they should just extend the posts controller. That will be addressed in a separate issue.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
5 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Solves #2670
For usual posts we give the title, the excerpt, the guid and the content in two formats:
raw
andrendered
. In case of revisions, we just gave theraw
content. This PR extends the schema, which acts now like we know it from usual posts.So, instead of
content
being a string it would now be an object:The
raw
property would only be send whencontext
is set toedit
.