fix: icône du bouton « commenter » = bulle Feather + (message-square) (v7.66.0)
Chemin SVG dessiné à la main remplacé par le message-square éprouvé de Feather (viewBox 24) + un « + » centré dans la bulle — même famille de traits que les autres icônes outline de l'éditeur. Le test statique suit. Gates: pytest tests/ -q -n auto → 1386 passed (1 flake connu et non lié test_v55::TestOGParser::test_fetch_og_metadata_success : échoue parfois sous -xdist, passe seul et passe au run complet final) ; ruff OK ; e2e v766 (2) + v764 (1) → 3 passed sur :8081 (image flowdeck:v7.66.0 rebuild + redéployée).
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
gouttière 64px, visible au survol/focus comme le handle) : icône **bulle de
|
||||
conversation avec un +**, `onclick="E.commentBlock(idx)"` → tiroir de
|
||||
commentaires ancré sur le bloc (ou sur la sélection vivante s'il y en a une).
|
||||
Icône = tracé `message-square` (Feather) + `+` centré.
|
||||
Masqué sur mobile (2 breakpoints, comme le handle) et sur page verrouillée.
|
||||
- remplace l'ancien `.block-actions` de `renderBlock` : rendu en `opacity:0`
|
||||
**sans règle de survol** (jamais de classe `.visible`) → un `+` invisible
|
||||
|
||||
@@ -813,7 +813,7 @@ const PD=(()=>{try{const el=document.getElementById('page-data');return el?JSON.
|
||||
// v7.66 : bouton « commenter ce bloc » à droite du bloc (gouttière 64px),
|
||||
// icône bulle de conversation + . Remplace l'ancien .block-actions mort
|
||||
// (opacity:0 sans règle de survol → un + invisible qui capait les clics).
|
||||
const cmtBtn=idx>=0?`<button type="button" class="block-comment-btn" title="Comment on block" aria-label="Comment on block" onclick="E.commentBlock(${idx})"><svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M13.6 7.3C13.6 10.2 11 12.5 7.9 12.5C7.3 12.5 6.7 12.4 6.2 12.2L3.5 13.3L4.4 10.9C3.4 10 2.4 8.7 2.4 7.3C2.4 4.4 5 2.2 8 2.2C11 2.2 13.6 4.4 13.6 7.3Z"/><path d="M8 5.3V9.3M6 7.3H10"/></svg></button>`:'';
|
||||
const cmtBtn=idx>=0?`<button type="button" class="block-comment-btn" title="Comment on block" aria-label="Comment on block" onclick="E.commentBlock(${idx})"><svg viewBox="0 0 24 24" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/><path d="M12 8v5M9.5 10.5h5"/></svg></button>`:'';
|
||||
// + « ajouter un bloc dessous », juste avant le handle (gouttière 64px)
|
||||
const insertBtn=idx>=0?`<button type="button" class="block-insert-btn" title="Add block below" aria-label="Add block below" onclick="E.addAfter(${idx})">+</button>`:'';
|
||||
return `<div class="block-wrapper" data-id="${b.id}">
|
||||
|
||||
@@ -25,8 +25,8 @@ def test_comment_button_on_the_right_of_the_block():
|
||||
assert i_content < i_btn
|
||||
# icône bulle de conversation +, ancre = commentaire du bloc
|
||||
assert 'onclick="E.commentBlock(${idx})"' in EDITOR_JS
|
||||
assert EDITOR_JS.count("<path d=\"M13.6 7.3C13.6 10.2") == 1
|
||||
assert 'stroke-width="1.3"' in EDITOR_JS
|
||||
assert EDITOR_JS.count('<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5') == 1 # bulle (message-square)
|
||||
assert '<path d="M12 8v5M9.5 10.5h5"/>' in EDITOR_JS # le + dans la bulle
|
||||
# l'ancien .block-actions mort (opacity:0 sans survol) a disparu de renderBlock
|
||||
assert "const actions=idx>=0?" not in EDITOR_JS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user