Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.2k
fix: 7605 delete translations#8123
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
sourcery-aibot commentedJan 28, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Reviewer's Guide by SourceryThis pull request introduces a new option in the page tree context menu to allow users to delete a page with all translations or just the current translation. It also includes changes to the styles and templates to support the new functionality. Sequence diagram for page deletion processsequenceDiagram actor User participant UI as Page Tree UI participant Backend as Django CMS Backend participant DB as Database User->>UI: Opens page context menu UI->>User: Shows delete options alt Delete all translations User->>UI: Clicks 'Delete all translations' UI->>Backend: Request delete page with all translations Backend->>DB: Delete page and all translations DB-->>Backend: Confirm deletion Backend-->>UI: Return success UI-->>User: Show success message else Delete current translation User->>UI: Clicks 'Delete this translation' UI->>Backend: Request delete current translation Backend->>DB: Delete current translation only DB-->>Backend: Confirm deletion Backend-->>UI: Return success UI-->>User: Show success message end File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess yourdashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Hey@jrief - I've reviewed your changes - here's some feedback:
Overall Comments:
- Please add tests to verify both deletion modes (single translation vs all translations) work correctly and don't accidentally delete unintended content
- Consider adding a confirmation dialog when deleting all translations to prevent accidental deletion
Here's what I looked at during the review
- 🟢General issues: all looks good
- 🟢Security: all looks good
- 🟢Testing: all looks good
- 🟢Complexity: all looks good
- 🟢Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
@fsbraun Do you think this should make cut for 4.2/5? |
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions. |
@@ -277,9 +277,14 @@ def actions_menu(self, request, object_id, extra_context=None): | |||
raise self._get_404_exception(object_id) | |||
site = get_site(request) | |||
preview_language = request.GET.get('language') | |||
page_content = page.get_content_obj(request.GET.get('language')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
page_content=page.get_content_obj(request.GET.get('language')) | |
page_content=page.get_content_obj(preview_language) |
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions. |
Uh oh!
There was an error while loading.Please reload this page.
Description
Adds a second item to the context menu in the page tree. Now one can decide, if he wants to delete a page with all translations or just to delete the page in the current translation.
develop-4
Summary by Sourcery
New Features: