diff --git a/package.json b/package.json index 63435e0..1313ff9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ruwio", "private": true, - "version": "1.1.6", + "version": "1.1.7", "type": "module", "scripts": { "dev": "vite", diff --git a/src/App.vue b/src/App.vue index abf23c5..cd3a57f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -85,6 +85,12 @@ function readStoredTimelineHeight(): number { const timelineHeight = ref(readStoredTimelineHeight()) +// Hide the asset sidebar + properties aside on TAB so the stage +// gets the full width. Toggled, not held — press TAB again to bring +// them back. Session-only state; we don't persist this so reopening +// the app always starts with the panels visible. +const panelsHidden = ref(false) + function maxTimelineHeight(): number { return Math.max(MIN_TIMELINE_HEIGHT, window.innerHeight - MAX_TIMELINE_HEIGHT_MARGIN) } @@ -93,6 +99,8 @@ const appStyle = computed(() => ({ '--timeline-height': `${timelineHeight.value}px`, })) +const appClass = computed(() => ({ 'panels-hidden': panelsHidden.value })) + let resizeStartY = 0 let resizeStartHeight = 0 let resizePointerId = -1 @@ -366,6 +374,22 @@ function onKeyDown(e: KeyboardEvent) { testsOpen.value = true return } + // TAB toggles the side panels (asset sidebar + properties aside) + // so the user can give the stage the full window width on demand. + // Skipped while typing — TAB still has to walk between form fields + // inside dialogs / inputs as expected. + if ( + e.key === 'Tab' && + !e.ctrlKey && + !e.metaKey && + !e.altKey && + !e.shiftKey && + !isEditable(e.target) + ) { + e.preventDefault() + panelsHidden.value = !panelsHidden.value + return + } // Arrow-key nudge: 1px step, 10px with Shift. Intercepted before // any other key handler so the stage steals the event from browser // scroll / selectable regions. Skipped when the user is typing in @@ -499,7 +523,7 @@ onBeforeUnmount(() => {