feature/history-ui-content-rollback #4445
Open
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.
Description of changes
Add History UI in the form of a new
Screen
component asRevisions
. The UI will navigate the admin user toRevisions
ifnoedit
is false andhistory
is true. Going toRevisions
will show a list all past versions of that particular item. If aListItem
is clicked, it will show and compare the differences between the current version and the rollback version and give the user the ability to rollback to that particular version.Refactored
history.js
to have full property names. This will make things a bit clearer to devs going over the revisions collections. I made it fully backwards compatible with the old property names. I also added a 'isModified()' check to only create a revision if the item had changes.Most of my design choices have been borrowed from Contentful's history UI.
TODO
-Mobile styling for the new Revision view.
-Write e2e tests for the new Revision view.
-Update the
linter
to include babel static class propertiesTesting
npm run test-all
ran successfully.Running into some linting errors in files that I didn't make changes to.
Addresses
#1241