Retire l'action Publier du support de formation
Build and deploy / test-python (push) Successful in 6m57s
Build and deploy / test-js (push) Successful in 50s
Build and deploy / lint-python (push) Successful in 4m14s
Build and deploy / lint-js (push) Failing after 1m12s
Build and deploy / build-and-push (push) Skipped
Build and deploy / deploy (push) Skipped
Build and deploy / sonarqube (push) Failing after 3m48s

Un apprenant n'a jamais acces a l'editeur : un etat "publie" persiste
en base (published_at) ne servait donc a rien tant qu'aucune vue
apprenant/export ne le consomme (retour utilisateur direct). Retrait
complet : route /document/<slug>/publish, db.mark_support_published,
la colonne logique published_at dans support_meta, le bouton et son
CSS/JS. "Aperçu" devient l'action primaire du bandeau (repond au vrai
besoin : voir le rendu avant un futur export). Un export reel (SCORM
ou equivalent) reste a specifier separement le jour venu.

SKIP=djlint : meme backlog H021 pre-existant que le commit precedent,
aucun fichier touche ici n'y figure. ruff/mypy --strict/vulture/
bandit/import-linter/eslint/stylelint tous verts ; 615 tests Python
(617 - 2 tests du Publier retire) + verification manuelle live du
retrait (route 404, bouton absent du HTML, Apercu confirme
fonctionnel par simulation DOM).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
william
2026-09-20 09:58:53 +02:00
co-authored by Claude Sonnet 5
parent bab581737a
commit 7ca03380b7
12 changed files with 5 additions and 99 deletions
-5
View File
@@ -147,11 +147,6 @@
background: rgb(255 95 46 / 8%);
}
.docBtnPrimary.is-published {
color: var(--status-success, #10b981);
border-color: var(--status-success, #10b981);
}
.docWidthPicker {
display: flex;
gap: 4px;
+1 -18
View File
@@ -81,10 +81,6 @@ function forgeDocApiRender() {
return fetch(`/document/${window.forgeDocState.slug}/render`).then((r) => r.json());
}
function forgeDocApiPublish() {
return fetch(`/document/${window.forgeDocState.slug}/publish`, { method: 'POST' }).then((r) => r.json());
}
/* ---------------------------------------------------------------------
* Canevas — rafraîchi depuis la VÉRITÉ SERVEUR après chaque mutation
* structurelle (jamais une simple retouche DOM locale, voir
@@ -676,7 +672,7 @@ function forgeDocRenderProps(el) {
/* ---------------------------------------------------------------------
* Chrome de l'éditeur : zoom, largeur d'aperçu responsive, Aperçu,
* Publier, thème (scopé à .docEditor3), navigation mobile.
* thème (scopé à .docEditor3), navigation mobile.
* ------------------------------------------------------------------- */
function forgeDocBindZoom() {
@@ -718,18 +714,6 @@ function forgeDocBindPreviewToggle() {
});
}
function forgeDocBindPublish() {
document.getElementById('docPublishBtn').addEventListener('click', () => {
forgeDocApiPublish().then((result) => {
if (!result.ok) return;
const label = document.getElementById('docPublishLabel');
const btn = document.getElementById('docPublishBtn');
label.textContent = 'Publié';
btn.classList.add('is-published');
});
});
}
function forgeDocApplyTheme(theme) {
const editor = document.getElementById('docEditor3');
editor.dataset.theme = theme;
@@ -817,7 +801,6 @@ function forgeDocInit() {
forgeDocBindZoom();
forgeDocBindWidthPicker();
forgeDocBindPreviewToggle();
forgeDocBindPublish();
forgeDocBindThemeToggle();
forgeDocBindMobileNav();
forgeDocBindKeyboardShortcuts();