From b490aa9951d366eb29666c3c30ffe26f802ea1b9 Mon Sep 17 00:00:00 2001 From: locpham Date: Sat, 8 Aug 2026 13:08:25 +0000 Subject: [PATCH] =?UTF-8?q?FIX:=20ch=E1=BA=B7n=20browser=20zoom=20to=C3=A0?= =?UTF-8?q?n=20trang=20=E2=80=94=20item/button/label=20gi=E1=BB=AF=20nguy?= =?UTF-8?q?=C3=AAn=20k=C3=ADch=20th=C6=B0=E1=BB=9Bc=20khi=20ph=C3=B3ng=20t?= =?UTF-8?q?o=20UI=20(capture=20preventDefault,=20gi=E1=BB=AF=20zoom=20chuy?= =?UTF-8?q?=C3=AAn=20d=E1=BB=A5ng)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/templates/index.html | 21 ++++++++++++++++++++- wiki.md | 9 +++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/app/templates/index.html b/app/templates/index.html index 374991c..c4eb5b3 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -3,8 +3,27 @@ - + SonicForge Studio - Professional DAW Editor + diff --git a/wiki.md b/wiki.md index 23740b9..d3c9e4e 100644 --- a/wiki.md +++ b/wiki.md @@ -1,3 +1,12 @@ +### [2026-08-08] FIX: Chặn browser zoom toàn trang — item/button/label giữ nguyên kích thước khi phóng to UI +- **Tóm tắt thay đổi:** User yêu cầu: khi phóng to giao diện, các item/button/label PHẢI GIỮ NGUYÊN kích thước hiện tại — chỉ các vùng flexible co giãn + cho phép user tự kéo resize (resizer TCP/sidebar/media-explorer/track-height ĐÃ có sẵn). Root cause: layout vốn dùng px cố định (không scale theo window), nhưng **browser zoom toàn trang** (Ctrl+wheel, Ctrl+plus/minus/0, pinch gesture) scale TOÀN BỘ UI → control phóng to theo. WebView2 (Tauri) mặc định bật zoom control. Fix trong `app/templates/index.html`: + 1. Meta viewport thêm `maximum-scale=1.0, user-scalable=no`. + 2. Inline script chặn zoom ở **capture phase** bằng `preventDefault()` — KHÔNG `stopPropagation()` nên các vùng zoom CHUYÊN DỤNG vẫn nhận event và hoạt động bình thường: timeline zoom (Ctrl+wheel, 18999), piano-roll grid zoom (7351), waveform canvas zoom (12189), EQ canvas wheel (10144). + 3. Chặn keydown Ctrl+'+'/'-'/'='/'_'/'0' + gesturestart/gesturechange (pinch Safari/WebKit). +- **Các file ảnh hưởng:** `app/templates/index.html` (meta viewport + zoom-guard script inline) +- **Ghi chú/Test (nếu có):** index.html serve OK (uvicorn), script extract + node --check OK. Không đụng app.jsx/app.precompiled.js (index.html no-cache nên không cần bump stamp). Resizer panel giữ nguyên — user vẫn kéo được TCP width (280-600), sidebar (200-600), media-explorer (20-80%), track height (110-300). + +--- ### [2026-08-08] FIX: Windows runtime — ModuleNotFoundError scipy.stats._ansari_swilk_statistics + ValueError librosa stub (PyInstaller bundle) - **Tóm tắt thay đổi:** User chạy bản Windows exe gặp 2 lỗi runtime (hộp thoại error): 1. `ModuleNotFoundError: No module named 'scipy.stats._ansari_swilk_statistics'` — scipy >= 1.18 tách `scipy.stats` thành nhiều module con import LAZY bên trong hàm (vd `_ansari_swilk_statistics`) → hook scipy của PyInstaller không thấy → thiếu trong bundle. Fix: `engine.spec` thêm `collect_submodules('scipy')` vào hiddenimports (collect toàn bộ stats/signal/ndimage/... — không sót module nào).