Skip to content

fix(editor): default timeline panel to 28% instead of half the editor - #13

Open
OGtwelve wants to merge 1 commit into
developfrom
fix/timeline-default-height
Open

OGtwelve wants to merge 1 commit into
developfrom
fix/timeline-default-height

Conversation

@OGtwelve

@OGtwelve OGtwelve commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Fixes #6

What

The editor opened with a 50/50 main/timeline split — an empty timeline took half the screen while the preview was squeezed into the other half.

How

  • DEFAULT_PANELS now derives the split from EDITOR_LAYOUT.timelineDefaultSize instead of carrying its own 50. That preset already existed in editor-layout.ts (28 for the default compact density, 30 for default) but nothing consumed it for the panel — the store had a second, disagreeing source of truth. Result: timeline 28, mainContent 72, still summing to 100. 28 sits in the issue's suggested 28–35 range and is the value the density preset always intended.
  • Persistence decision (as the issue asks to document): store bumped to version: 2 with a migration — layouts still sitting on the untouched v1 50/50 default move to the new split; anything the user resized themselves is preserved exactly. (A user who manually dragged to exactly 50/50 is indistinguishable from never-touched and gets the new default — accepted trade-off.) The migration is an exported pure function with 5 unit tests.
  • minSize={15} / maxSize={70} on the panel untouched, per the acceptance criteria.
  • Reconciles the editor.test.tsx scaffolding the issue flagged: it mocked the store at timeline: 50 while separately mocking timelineDefaultSize: 35. The layout mock no longer overrides timeline sizes and the store mock matches the real default.

Verification (headless Chromium, dev server)

Scenario Rendered split (main/timeline) Stored after load
Fresh user, no persisted layout 70 / 29 (handle rounding) v2, 72/28
Existing user on untouched v1 50/50 70 / 29 migrated to v2, 72/28
Existing user who resized to 40/60 39 / 60 v2, 40/60 preserved

Drag test: handle dragged to the extremes clamps at 70 (top) and ~15 (bottom) — full range intact.

lint ✅ · check:boundaries ✅ · test:run 212/212 files, 1266/1266 tests green

Note

resetPanels() exists on the store but has no UI entry point (the issue asked to confirm) — nothing currently lets a user return to the default layout except clearing storage. Happy to file a follow-up issue for a "Reset layout" menu item if wanted.

The editor shell opened with a 50/50 main/timeline split, so an empty or
short timeline claimed half the screen while the preview was squeezed
into the other half.

DEFAULT_PANELS now derives the split from EDITOR_LAYOUT.timelineDefaultSize
(28 for the default compact density) instead of carrying its own 50 —
one source of truth, main and timeline still summing to 100.

The store is persisted, so a version 2 migration handles existing users:
layouts still sitting on the untouched v1 50/50 default move to the new
split; anything the user resized themselves is left alone. The migration
is exported and unit-tested.

Also reconciles the editor.test.tsx scaffolding, which mocked the store
at 50 while separately mocking timelineDefaultSize as 35 — the layout
mock no longer overrides timeline sizes and the store mock matches the
real default.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Timeline panel default height is too tall (50% of editor)

1 participant