Terminologie coherente dans le graphe du Scenario : Situation, pas Nœud
Build and deploy / test-python (push) Successful in 9m47s
Build and deploy / test-js (push) Successful in 53s
Build and deploy / lint-python (push) Successful in 5m44s
Build and deploy / lint-js (push) Failing after 1m31s
Build and deploy / build-and-push (push) Skipped
Build and deploy / deploy (push) Skipped
Build and deploy / sonarqube (push) Failing after 5m0s
Build and deploy / test-python (push) Successful in 9m47s
Build and deploy / test-js (push) Successful in 53s
Build and deploy / lint-python (push) Successful in 5m44s
Build and deploy / lint-js (push) Failing after 1m31s
Build and deploy / build-and-push (push) Skipped
Build and deploy / deploy (push) Skipped
Build and deploy / sonarqube (push) Failing after 5m0s
Retour utilisateur : "il y a situation => choix => le choix devient la
situation => avec des choix ... il faut bien choisir les termes". Le
vocabulaire technique de graphe ("Nœud N", "Départ") ne correspond pas
au modele mental du createur : chaque point du graphe EST une
situation (initiale, ou atteinte via un choix precedent), qui a ses
propres choix. Renomme dans toute l'UI (labels des cartes, bouton
d'ajout, indices de la modale de connexion, etiquette de destination,
etat vide de l'inspecteur, texte par defaut d'une nouvelle situation) -
aucun changement de la structure de donnees (x/y/id/text/choices reste
identique), uniquement la terminologie affichee.
Verifie via simulation DOM reelle avec le VRAI sanitize_scenario_config
Python (jamais une reimplementation JS approximative) que l'ajout
d'une situation et l'ajout d'un choix fonctionnent bien de bout en
bout : la fonctionnalite marchait deja (la modale transparente du
commit precedent explique tres probablement le "ca ne marche pas" -
aucun retour visuel rendait les clics invisibles).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
0babad5018
commit
ecea430ee2
@@ -1881,7 +1881,7 @@ function forgeDocScenarioNewScenario() {
|
||||
|
||||
function forgeDocScenarioNewNode(id, x, y) {
|
||||
return {
|
||||
id, text: 'Nouveau nœud', x, y, choices: [],
|
||||
id, text: 'Nouvelle situation', x, y, choices: [],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1903,7 +1903,7 @@ function forgeDocRenderScenarioCardHtml(scenario, sIndex) {
|
||||
<span class="docFieldLabel">${forgeDocEscapeHtml(scenario.title)}</span>
|
||||
<button type="button" class="docQuizRemoveBtn docScenarioRemoveBtn" data-scenario-index="${sIndex}" title="Supprimer ce scénario">🗑</button>
|
||||
</div>
|
||||
<div class="docFieldRow"><span class="docFieldLabel">${nodeCount} nœud${nodeCount > 1 ? 's' : ''}</span></div>
|
||||
<div class="docFieldRow"><span class="docFieldLabel">${nodeCount} situation${nodeCount > 1 ? 's' : ''}</span></div>
|
||||
<button type="button" class="docBtnSecondary docScenarioEditTreeBtn" data-scenario-index="${sIndex}">✎ Modifier l'arbre</button>
|
||||
</div>
|
||||
`;
|
||||
@@ -1996,7 +1996,12 @@ function forgeDocScenarioGraphNextPosition(nodes) {
|
||||
}
|
||||
|
||||
function forgeDocScenarioNodeLabel(nIndex) {
|
||||
return nIndex === 0 ? 'Départ' : `Nœud ${nIndex + 1}`;
|
||||
// Terminologie volontairement cohérente de bout en bout (retour
|
||||
// utilisateur du 21/09/2026 : "il faut bien choisir les termes") :
|
||||
// Situation -> Choix -> le choix MÈNE À une nouvelle Situation (avec
|
||||
// ses propres choix), jamais un vocabulaire technique de graphe
|
||||
// ("nœud") qui n'a pas de sens pour le créateur du scénario.
|
||||
return nIndex === 0 ? 'Situation initiale' : `Situation ${nIndex + 1}`;
|
||||
}
|
||||
|
||||
function forgeDocScenarioGraphPatch(partial) {
|
||||
@@ -2083,11 +2088,11 @@ function forgeDocScenarioGraphUpdateHint() {
|
||||
const hintEl = document.getElementById('docScenarioGraphHint');
|
||||
if (!hintEl) return;
|
||||
if (gs.connecting) {
|
||||
hintEl.textContent = 'Cliquez sur le nœud cible pour relier ce choix, ou appuyez sur Échap pour annuler.';
|
||||
hintEl.textContent = 'Cliquez sur la situation cible pour relier ce choix, ou appuyez sur Échap pour annuler.';
|
||||
hintEl.classList.add('is-connecting');
|
||||
gs.canvasEl.classList.add('is-connecting');
|
||||
} else {
|
||||
hintEl.textContent = 'Glissez un nœud pour le déplacer. Cliquez un nœud pour modifier son texte et ses choix.';
|
||||
hintEl.textContent = 'Glissez une situation pour la déplacer. Cliquez une situation pour modifier son texte et ses choix.';
|
||||
hintEl.classList.remove('is-connecting');
|
||||
gs.canvasEl.classList.remove('is-connecting');
|
||||
}
|
||||
@@ -2217,7 +2222,7 @@ function forgeDocScenarioGraphRenderInspector() {
|
||||
const nIndex = gs.selectedNodeIndex;
|
||||
const node = gs.scenario.nodes[nIndex];
|
||||
if (!node) {
|
||||
inspector.innerHTML = '<div class="docScenarioGraphInspectorEmpty">Sélectionnez un nœud sur le graphe.</div>';
|
||||
inspector.innerHTML = '<div class="docScenarioGraphInspectorEmpty">Sélectionnez une situation sur le graphe.</div>';
|
||||
return;
|
||||
}
|
||||
const isRoot = nIndex === 0;
|
||||
@@ -2237,7 +2242,7 @@ function forgeDocScenarioGraphRenderInspector() {
|
||||
</div>
|
||||
<div class="docScenarioChoiceTargetRow">
|
||||
<span class="docScenarioChoiceTargetLabel">${targetIndex === -1 ? '— Fin de branche —' : `→ ${forgeDocEscapeHtml(forgeDocScenarioNodeLabel(targetIndex))}`}</span>
|
||||
<button type="button" class="docScenarioChoiceLinkBtn ${isConnectingThis ? 'is-active' : ''}" data-choice-index="${cIndex}" data-action="link">${isConnectingThis ? 'Cliquez un nœud…' : 'Relier'}</button>
|
||||
<button type="button" class="docScenarioChoiceLinkBtn ${isConnectingThis ? 'is-active' : ''}" data-choice-index="${cIndex}" data-action="link">${isConnectingThis ? 'Cliquez une situation…' : 'Relier'}</button>
|
||||
${targetIndex === -1 ? '' : `<button type="button" class="docScenarioChoiceLinkBtn" data-choice-index="${cIndex}" data-action="unlink">Dissocier</button>`}
|
||||
</div>
|
||||
</div>
|
||||
@@ -2247,10 +2252,10 @@ function forgeDocScenarioGraphRenderInspector() {
|
||||
inspector.innerHTML = `
|
||||
<div class="docQuizQuestionHeader">
|
||||
<span class="docFieldLabel">${forgeDocScenarioNodeLabel(nIndex)}</span>
|
||||
${isRoot ? '' : '<button type="button" class="docQuizRemoveBtn" id="docScenarioTreeNodeRemoveBtn" title="Supprimer ce nœud">🗑</button>'}
|
||||
${isRoot ? '' : '<button type="button" class="docQuizRemoveBtn" id="docScenarioTreeNodeRemoveBtn" title="Supprimer cette situation">🗑</button>'}
|
||||
</div>
|
||||
<div class="docField">
|
||||
<textarea id="docScenarioTreeTextInput" rows="4" placeholder="Texte (situation ou conséquence)">${forgeDocEscapeHtml(node.text)}</textarea>
|
||||
<textarea id="docScenarioTreeTextInput" rows="4" placeholder="Texte de la situation">${forgeDocEscapeHtml(node.text)}</textarea>
|
||||
</div>
|
||||
<div class="docSectionLabel docQuizQuestionsLabel">Choix</div>
|
||||
<div class="docQuizChoicesList">${choicesHtml || '<div class="docEmptyState">Aucun choix — fin de cette branche.</div>'}</div>
|
||||
@@ -2356,7 +2361,7 @@ function forgeDocRenderScenarioTreeModal() {
|
||||
placeholder="Nom du scénario">
|
||||
</div>
|
||||
<div class="docScenarioGraphToolbar">
|
||||
<button type="button" class="docBtnSecondary" id="docScenarioGraphAddNode">+ Ajouter un nœud</button>
|
||||
<button type="button" class="docBtnSecondary" id="docScenarioGraphAddNode">+ Ajouter une situation</button>
|
||||
<span class="docScenarioGraphHint" id="docScenarioGraphHint"></span>
|
||||
</div>
|
||||
<div class="docScenarioGraphSplit">
|
||||
|
||||
Reference in New Issue
Block a user