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

feat: Remove delete page from toolbar #7748

Open
wants to merge 3 commits into
base: develop-4
Choose a base branch
from

Conversation

jrief
Copy link
Contributor

@jrief jrief commented Jan 9, 2024

Description

Currently the toolbar offers a menu item to delete the current page.
This is problematic, because the user first has to change into edit mode, before allowing him to delete that page.
Moreover, after deletion which page shall the browser render?

@fsbraun and I therefore discussed on Slack and concluded, that deleting a page only shall be possible through the page tree.

  • I have opened this pull request against develop
  • I have added or modified the tests when changing logic
  • I have followed the conventional commits guidelines to add meaningful information into the changelog
  • I have read the contribution guidelines and I have joined #workgroup-pr-review on Slack to find a “pr review buddy” who is going to review my pull request.

discard specific verbose_name from perms_needed
As discussed with @fsbraun on Slack, pages shall exclusively be deletable through the page tree but not through the toolbar.
@fsbraun fsbraun changed the title Remove delete page from toolbar feat: Remove delete page from toolbar Jan 9, 2024
@fsbraun fsbraun added the 4.1 label Jan 9, 2024
@fsbraun
Copy link
Sponsor Member

fsbraun commented Jan 9, 2024

I would second the notion. Let me add my rationale:

  • Together with djangocms-versioning pages can never be deleted unless they do not have a single page content object or a setting is changed.
  • The impact of deleting a page is more transparent in the page tree: All languages and all child pages are affected. (I know all elements are shown in the confirmation dialogue - but that typically is extremely long and hard to grasp.) This is the asymmetry to the "New Page" menu entry.
  • It should not depend on the edit mode or publication status of the PageContent.

The alternative would be:

  • Only show the delete menu entry if deleting is actually possible in the setup (might be complex in relation with versioning)
  • Allow deleting in all edit models: preview, edit and "view on site".
  • Only grey out if the user lacks permissions

@jrief
Copy link
Contributor Author

jrief commented Jan 10, 2024

In the course of this, I would also remove the item "Duplicate this page".

Reason is, that users have no way to specify the target and hence that duplicate would end up as a sibling of the target with a slug named "copy-of-…". By allowing the create duplicates from the page tree, this problem can be avoided because normally those duplicated pages are added to a different parent anyway.

@fsbraun fsbraun added 4.2 and removed 4.1 labels May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Review required
Development

Successfully merging this pull request may close these issues.

None yet

2 participants