From 59dfa18ec799c0350fef379dbef868d8d5e693cf Mon Sep 17 00:00:00 2001 From: isUnknown Date: Tue, 24 Feb 2026 13:37:07 +0100 Subject: [PATCH 1/2] disable: comment out PagePopup and page hover/highlight feature Keep the code aside for potential re-activation later. Co-Authored-By: Claude Opus 4.6 --- src/App.vue | 16 +++-- src/composables/useIframeInteractions.js | 86 ++++++++++-------------- src/composables/useKeyboardShortcuts.js | 4 +- 3 files changed, 49 insertions(+), 57 deletions(-) diff --git a/src/App.vue b/src/App.vue index 2027125..9f91c1a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -2,7 +2,7 @@ import PagedJsWrapper from './components/PagedJsWrapper.vue'; import EditorPanel from './components/editor/EditorPanel.vue'; import ElementPopup from './components/ElementPopup.vue'; -import PagePopup from './components/PagePopup.vue'; +// import PagePopup from './components/PagePopup.vue'; // DISABLED: page template styling feature import PreviewLoader from './components/PreviewLoader.vue'; import SaveButton from './components/SaveButton.vue'; import { onMounted, ref, computed, provide } from 'vue'; @@ -19,22 +19,22 @@ const narrativeStore = useNarrativeStore(); const previewFrame1 = ref(null); const previewFrame2 = ref(null); const elementPopup = ref(null); -const pagePopup = ref(null); +// const pagePopup = ref(null); // DISABLED: page template styling feature const activeTab = ref(''); provide('activeTab', activeTab); // Setup iframe interactions (hover, click, labels) const { - hoveredPage, - selectedPages, + // hoveredPage, // DISABLED: page template styling feature + // selectedPages, // DISABLED: page template styling feature hoveredElement, selectedElement, handleIframeMouseMove, handleIframeClick, - handlePagePopupClose, + // handlePagePopupClose, // DISABLED: page template styling feature handleElementPopupClose, -} = useIframeInteractions({ elementPopup, pagePopup }); +} = useIframeInteractions({ elementPopup }); // Setup preview renderer with double buffering const { @@ -67,7 +67,7 @@ const { } = useKeyboardShortcuts({ stylesheetStore, elementPopup, - pagePopup, + // pagePopup, // DISABLED: page template styling feature activeTab, printPreview, }); @@ -117,11 +117,13 @@ onMounted(async () => { :iframeRef="activeFrame" @close="handleElementPopupClose" /> + @@ -131,11 +132,9 @@ nav { position: relative; left: calc(var(--panel-w) * -1); - background-color: var(--color-panel-bg); box-shadow: -5px 0px 12px; - transition: left 0.3s var(--curve); pointer-events: all; } @@ -145,7 +144,7 @@ nav { } .tab-panel { - height: calc(100% - var(--panel-nav-h)*2); + height: calc(100% - var(--panel-nav-h) * 2); overflow-y: auto; overflow-x: hidden; padding: 0 2em; diff --git a/src/composables/usePreviewRenderer.js b/src/composables/usePreviewRenderer.js index 331b995..66bd267 100644 --- a/src/composables/usePreviewRenderer.js +++ b/src/composables/usePreviewRenderer.js @@ -16,6 +16,7 @@ export function usePreviewRenderer({ let savedScrollPercentage = 0; const currentFrameIndex = ref(1); // 1 or 2, which iframe is currently visible const isTransitioning = ref(false); + const initialized = ref(false); let keyboardShortcutHandler = null; /** @@ -117,6 +118,9 @@ export function usePreviewRenderer({ // Swap current frame currentFrameIndex.value = currentFrameIndex.value === 1 ? 2 : 1; isTransitioning.value = false; + if (!initialized.value) { + initialized.value = true; + } }, 200); // Match CSS transition duration }, 50); // Small delay to ensure scroll is set }, 200); // Wait for PagedJS @@ -127,6 +131,7 @@ export function usePreviewRenderer({ watch( () => stylesheetStore.content, () => { + if (!initialized.value) return; renderPreview(); } ); @@ -135,6 +140,7 @@ export function usePreviewRenderer({ watch( () => narrativeStore.data, () => { + if (!initialized.value) return; if (narrativeStore.data) { renderPreview(); } @@ -152,6 +158,7 @@ export function usePreviewRenderer({ renderPreview, currentFrameIndex, isTransitioning, + initialized, setKeyboardShortcutHandler, }; } diff --git a/src/style.css b/src/style.css index 7fe7f5e..e41ea4d 100644 --- a/src/style.css +++ b/src/style.css @@ -1 +1 @@ -@import '../public/assets/css/style.scss'; +/* @import '../public/assets/css/style.scss'; */