onespacemedia / cms

A collection of Django extensions that add content-management facilities to Django projects.
BSD 3-Clause "New" or "Revised" License
14 stars 7 forks source link

Pages versioning #201

Closed AidanCurrah closed 3 years ago

AidanCurrah commented 3 years ago

This PR adds versioning functionality to the CMS that can be controlled through a setting. Add one DB hit to pages middleware but otherwise shouldn't affect frontend performance.


daniel-clayton commented 3 years ago

Also should be just get rid of Reversion when we are happy with this and save backup versions instead?

charley-rose commented 3 years ago

Once you've created a duplicate of the site (creating a new version) the save button still appears and can continue to be pressed but nothing else happens. Should we have this removed after pressing once and a green success bar appear confirming you've created a new version?

Update: After looking through more of the draft mode, this 'Editing page with draft versions' box appears even when not duplicating a page, is this meant to be at the top?

image

charley-rose commented 3 years ago

When you save a page, the save successful message lists the title of the page as being saved successfully, can we include which version has also been saved in the message to avoid any confusion.

image

charley-rose commented 3 years ago

On the in-between page where you can view different page versions, should there be a breadcrumb nav and potentially a new step after 'pages > pages' so you can click back through the breadcrumb to see the list view of page versions rather than only being able to go to the pages list.

image

image

charley-rose commented 3 years ago

I can only make new versions from the 1st version page, if I select 'Add version' whilst editing a draft page, it takes me back to the list and a new version has not been created.

charley-rose commented 3 years ago

When working on a draft page, the other save options don't work properly, should they be there? The duplicate option returns a 500 internal server error, save and add another just refreshes the same page and save and return takes you to the pages list instead of the versions list.

image

charley-rose commented 3 years ago

The make live version option isn't very noticeable and isn't obvious that it's editable. Can we make it a checkbox similar to the online option on the pages list.

image

image

AidanCurrah commented 3 years ago

@charley-rose

Once you've created a duplicate of the site (creating a new version) the save button still appears and can continue to be pressed but nothing else happens. Should we have this removed after pressing once and a green success bar appear confirming you've created a new version?

Update: After looking through more of the draft mode, this 'Editing page with draft versions' box appears even when not duplicating a page, is this meant to be at the top?

For this, the box at the top is to edit a particular page's slug and parent page as this has ramifications across all versions of a page instead of just the one you're editing. I could maybe make this clearer

When you save a page, the save successful message lists the title of the page as being saved successfully, can we include which version has also been saved in the message to avoid any confusion.

This is kind-of awkward to change. I'll leave it as is for now and have a look at adjusting later. This isn't a priority to change

On the in-between page where you can view different page versions, should there be a breadcrumb nav and potentially a new step after 'pages > pages' so you can click back through the breadcrumb to see the list view of page versions rather than only being able to go to the pages list.

I've adjusted this so the breadcrumbs on the edit versions list page works correctly now and I've inserted an intermediate step on the change page if that page has versions to take you back to the version list page.

I can only make new versions from the 1st version page, if I select 'Add version' whilst editing a draft page, it takes me back to the list and a new version has not been created.

I've fixed this issue. The problem was that if you made a new version while on a version page, you'd make a version for that page rather than the parent page.

When working on a draft page, the other save options don't work properly, should they be there? The duplicate option returns a 500 internal server error, save and add another just refreshes the same page and save and return takes you to the pages list instead of the versions list.

This error is only thrown if you select the 'Duplicate page' option however it shouldn't happen so I'll either hide this option or fix the underlying issue

The make live version option isn't very noticeable and isn't obvious that it's editable. Can we make it a checkbox similar to the online option on the pages list.

If I make it a checkbox, we'd need a 'Save' button underneath. Would you prefer this or I could make the 'Make live' text into buttons themselves so it's more obvious that they're actions.