Repository navigation
feat(builder): confirm before discarding all unpublished changes - #2
Merged
Merged
Conversation
The Discard button threw away every unpublished draft edit at once with no confirmation — far more destructive than a single delete (which has its own Undo snackbar) and irreversible. Gate it behind a native confirm, mirroring the "Insert content" replace flow. The prompt text is localized via a new cb.builder.discard_confirm key (FR + EN), exposed to the client on the shell root's data-i18n attribute; _t() now also reads the shell root so topbar strings that live outside the optional replace/import pickers resolve too. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The new discard confirmation also gates the discard click in replace-content.spec.js; accept the dialog so the e2e flow proceeds. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Klehm
added a commit
that referenced
this pull request
Jul 29, 2026
feat(builder): confirm before discarding all unpublished changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Quoi
Le bouton « Annuler les modifications » (Discard) jette toutes les modifications draft non publiées d'un coup, sans confirmation et de façon irréversible — bien plus destructeur qu'une suppression unitaire (qui a son propre snackbar Undo).
Cette PR ajoute une confirmation native avant l'action, calquée sur le flux « Insérer le contenu » (replace).
Détails
discard()affichewindow.confirm(...)et s'interrompt si l'utilisateur refuse.cb.builder.discard_confirm(FR + EN), exposée au client sur l'attributdata-i18nde la racine du shell._t()lit désormais aussi la racine du shell, pour les chaînes de la topbar situées hors des pickers optionnels (replace / import-export).Tests
publish and discard withdraw the pending offermis à jour.Note
Indépendante de #1 ; les deux branches touchent
cb-builder_controller.js/cb-builder.test.jsdans des régions disjointes et fusionnent sans conflit.🤖 Generated with Claude Code