-
Notifications
You must be signed in to change notification settings - Fork 9
feat: Add delete publisher functionality #236
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
Conversation
Added a dropdown menu next to the Edit details button on publisher detail pages with a delete option. The delete action triggers a confirmation modal that requires users to type the publisher ID to confirm deletion. Changes: - Created DeletePublisherModal component with confirmation input - Added dropdown menu with delete option to PublisherDetail component - Integrated useDeletePublisher hook from generated API - Added analytics tracking for delete publisher action - Redirects to /nodes page after successful deletion 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Pull request overview
This PR adds the ability for users to delete publishers through a new confirmation modal. Users must type the publisher ID to confirm deletion, following the same pattern as node deletion. The implementation includes a dropdown menu next to the "Edit details" button that provides access to the delete functionality.
- Added
DeletePublisherModalcomponent with confirmation input requirement and API integration - Updated
PublisherDetailcomponent with a dropdown menu containing the delete publisher option - Added comprehensive internationalization support across 9 locale files
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| components/publisher/DeletePublisherModal.tsx | New modal component for publisher deletion with confirmation input validation |
| components/publisher/PublisherDetail.tsx | Added dropdown menu with delete option and integrated delete modal |
| locales/en/common.json | Added English translations for delete publisher functionality |
| locales/zh/common.json | Added Chinese translations and removed duplicate entries |
| locales/tr/common.json | Added Turkish translations and removed duplicate entries |
| locales/ru/common.json | Added Russian translations and removed duplicate entries |
| locales/ko/common.json | Added Korean translations and removed duplicate entry |
| locales/ja/common.json | Added Japanese translations and removed duplicate entries |
| locales/fr/common.json | Added French translations (contains translation errors) |
| locales/es/common.json | Added Spanish translations (contains incorrect Chinese text) |
| locales/ar/common.json | Added Arabic translations and removed duplicate entry |
| bun.lock | Standard lockfile update |
Comments suppressed due to low confidence (2)
components/publisher/DeletePublisherModal.tsx:25
- Unused variable qc.
const qc = useQueryClient()
components/publisher/PublisherDetail.tsx:33
- Unused variable error.
error,
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "Failed to delete node": "Error al eliminar el nodo", | ||
| "Failed to delete node. {{message}}": "No se pudo eliminar el nodo. {{message}}", | ||
| "Failed to delete publisher": "Error al eliminar el editor", | ||
| "Failed to delete publisher. {{message}}": "删除发布者失败。{{message}}", |
Copilot
AI
Dec 3, 2025
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.
This translation contains Chinese text instead of Spanish. The translation should be in Spanish, similar to "Error al eliminar el editor. {{message}}" to match the pattern at line 164.
| "Failed to delete publisher. {{message}}": "删除发布者失败。{{message}}", | |
| "Failed to delete publisher. {{message}}": "No se pudo eliminar el editor. {{message}}", |
| const { t } = useNextTranslation() | ||
| const mutation = useDeletePublisher({}) | ||
| const router = useRouter() | ||
| const qc = useQueryClient() |
Copilot
AI
Dec 3, 2025
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.
The qc (useQueryClient) variable is declared but never used. Unlike the similar NodeDeleteModal component which uses it to invalidate query cache (line 53-59), this modal doesn't perform any cache invalidation after deletion. Consider removing this unused variable or implementing cache invalidation if needed.
| "Failed to delete publisher": "Error al eliminar el editor", | ||
| "Failed to delete publisher. {{message}}": "删除发布者失败。{{message}}", | ||
| "Failed to delete version": "Error al eliminar la versión", | ||
| "Failed to delete version: {{message}}": "无法删除版本:{{message}}", |
Copilot
AI
Dec 3, 2025
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.
This translation contains Chinese text instead of Spanish. The translation should be in Spanish, similar to "Error al eliminar la versión: {{message}}" to match the pattern at line 166.
| "Failed to delete version: {{message}}": "无法删除版本:{{message}}", | |
| "Failed to delete version: {{message}}": "No se pudo eliminar la versión: {{message}}", |
| "Failed to delete publisher": "Échec de la suppression de l'éditeur", | ||
| "Failed to delete publisher. {{message}}": "Échec de la suppression de l'éditeur. {{message}}", | ||
| "Failed to delete version": "Échec de la suppression de la version", | ||
| "Failed to delete version: {{message}}": "无法删除版本:{{message}}", |
Copilot
AI
Dec 3, 2025
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.
This translation contains Chinese text instead of French. The translation should be in French, similar to "Échec de la suppression de la version : {{message}}" to match the pattern at line 166.
| "Failed to delete version: {{message}}": "无法删除版本:{{message}}", | |
| "Failed to delete version: {{message}}": "Échec de la suppression de la version : {{message}}", |
| "Delete Publisher": "Supprimer le publieur", | ||
| "Delete Version": "Supprimer la version", | ||
| "Delete publisher": "Supprimer le publieur", |
Copilot
AI
Dec 3, 2025
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.
The French translation "publieur" is incorrect. The correct French word for "publisher" is "éditeur". This should be "Supprimer l'éditeur" to match the translation pattern used elsewhere in the file (e.g., line 294 "L'ID de l'éditeur").
| "Delete Publisher": "Supprimer le publieur", | |
| "Delete Version": "Supprimer la version", | |
| "Delete publisher": "Supprimer le publieur", | |
| "Delete Publisher": "Supprimer l'éditeur", | |
| "Delete Version": "Supprimer la version", | |
| "Delete publisher": "Supprimer l'éditeur", |
| "Delete Node": "Supprimer le nœud", | ||
| "Delete Publisher": "Supprimer le publieur", | ||
| "Delete Version": "Supprimer la version", | ||
| "Delete publisher": "Supprimer le publieur", |
Copilot
AI
Dec 3, 2025
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.
The French translation "publieur" is incorrect. The correct French word for "publisher" is "éditeur". This should be "Supprimer l'éditeur" to match the translation pattern used elsewhere in the file.
| "Delete publisher": "Supprimer le publieur", | |
| "Delete publisher": "Supprimer l'éditeur", |
|
@copilot open a new pull request to apply changes based on the review comments in this thread |
Summary
Changes
DeletePublisherModalcomponent with confirmation input requirementPublisherDetailcomponent to include dropdown menu with delete optionuseDeletePublisherAPI hook for deletion/nodespage after successful deletionTest plan
🤖 Generated with Claude Code