feat: Editor POC — multi-zone toolbar mockup (TOOLBAR_DESIGN_ANALYSIS.md)
Add standalone /editor-poc page demonstrating all 5 toolbar zones: - Zone 1: Top Fixed Bar (hamburger, title, AI glow button, save indicator) - Zone 2a: Slash Command Menu (/ on empty line, 15 commands, filtering) - Zone 2b: Bubble Menu (on text selection, formatting + AI dropdown) - Zone 3: Floating Quick Insert (per-line, Image/PDF/Code/Table/AI) - Zone 4: AI Side Panel (Ctrl+J toggle, chat, suggestions) - Zone 5: Drag & Drop overlay with dashed border Files: - new: frontend/editor-poc.html (46KB standalone vanilla JS) - backend/main.py: +/editor-poc route before catch-all - frontend/index.html: Editor POC button in header menu - frontend/js/config.js: initEditorPocBtn() function + export - frontend/js/legacy.js: re-export initEditorPocBtn - frontend/js/app.js + frontend/app.js: init call in both versions
This commit is contained in:
@@ -4039,6 +4039,14 @@ if FRONTEND_DIR.exists():
|
||||
return HTMLResponse(content=popout_file.read_text(encoding="utf-8"))
|
||||
raise HTTPException(status_code=404, detail="Popout template not found")
|
||||
|
||||
@app.get("/editor-poc")
|
||||
async def serve_editor_poc():
|
||||
"""Serve the standalone Editor POC page (multi-zone toolbar demo)."""
|
||||
poc_file = FRONTEND_DIR / "editor-poc.html"
|
||||
if poc_file.exists():
|
||||
return HTMLResponse(content=poc_file.read_text(encoding="utf-8"))
|
||||
raise HTTPException(status_code=404, detail="Editor POC not found")
|
||||
|
||||
@app.get("/{full_path:path}")
|
||||
async def serve_spa(full_path: str):
|
||||
"""Serve the SPA index.html for all non-API routes."""
|
||||
|
||||
@@ -4069,6 +4069,15 @@
|
||||
});
|
||||
}
|
||||
|
||||
function initEditorPocBtn() {
|
||||
var btn = document.getElementById("editor-poc-btn");
|
||||
if (!btn) return;
|
||||
btn.addEventListener("click", function() {
|
||||
closeHeaderMenu();
|
||||
window.open("/editor-poc", "_blank");
|
||||
});
|
||||
}
|
||||
|
||||
function initHelpNavigation() {
|
||||
const helpContent = document.querySelector(".help-content");
|
||||
const helpBody = document.getElementById("help-body");
|
||||
@@ -7819,6 +7828,7 @@
|
||||
initSidebarTabs();
|
||||
initHelpModal();
|
||||
initConfigModal();
|
||||
initEditorPocBtn();
|
||||
initSidebarFilter();
|
||||
initSidebarResize();
|
||||
initEditor();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -649,6 +649,30 @@
|
||||
>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
class="menu-list-row menu-list-button"
|
||||
id="editor-poc-btn"
|
||||
type="button"
|
||||
role="menuitem"
|
||||
>
|
||||
<span
|
||||
class="menu-list-icon"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<i
|
||||
data-lucide="pencil"
|
||||
style="width: 17px; height: 17px"
|
||||
></i>
|
||||
</span>
|
||||
<span class="menu-list-content">
|
||||
<span class="menu-list-title"
|
||||
>Editor POC</span
|
||||
>
|
||||
<span class="menu-list-subtitle"
|
||||
>Nouvel editeur (demo)</span
|
||||
>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -38,6 +38,7 @@ async function init() {
|
||||
Legacy.initSidebarTabs();
|
||||
Legacy.initHelpModal();
|
||||
Legacy.initConfigModal();
|
||||
Legacy.initEditorPocBtn();
|
||||
Sidebar.initSidebarFilter();
|
||||
UI.initSidebarResize();
|
||||
Utils.initEditor();
|
||||
|
||||
@@ -218,6 +218,14 @@ function initHelpModal() {
|
||||
});
|
||||
}
|
||||
|
||||
function initEditorPocBtn() {
|
||||
var btn = document.getElementById("editor-poc-btn");
|
||||
if (!btn) return;
|
||||
btn.addEventListener("click", function() {
|
||||
window.open("/editor-poc", "_blank");
|
||||
});
|
||||
}
|
||||
|
||||
function initHelpNavigation() {
|
||||
const helpBody = document.getElementById("help-body");
|
||||
const navList = document.getElementById("help-nav-list");
|
||||
@@ -1289,6 +1297,7 @@ export {
|
||||
initHelpModal,
|
||||
closeHelpModal,
|
||||
initRecentTab,
|
||||
initEditorPocBtn,
|
||||
loadAbout as initAboutSection,
|
||||
loadHiddenFilesSettings as initHiddenFilesConfig,
|
||||
switchSidebarTab,
|
||||
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
} from './dashboard.js';
|
||||
|
||||
// --- Re-exports from modules that already have these functions ---
|
||||
export { initSidebarTabs, initConfigModal, initHelpModal, initRecentTab } from './config.js';
|
||||
export { initSidebarTabs, initConfigModal, initHelpModal, initRecentTab, initEditorPocBtn } from './config.js';
|
||||
export { initSyncStatus } from './sync.js';
|
||||
export { DashboardRecentWidget } from './dashboard.js';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user