Skip to content

Persist editor drawer pinned state across navigations#131

Merged
nwwatson merged 1 commit intomasterfrom
persist-editor-drawer-pinned-state
Mar 17, 2026
Merged

Persist editor drawer pinned state across navigations#131
nwwatson merged 1 commit intomasterfrom
persist-editor-drawer-pinned-state

Conversation

@nwwatson
Copy link
Copy Markdown
Owner

@nwwatson nwwatson commented Mar 17, 2026

Summary

  • Store the editor drawer's pinned preference in localStorage (prose:editor-drawer-pinned) so it persists across page navigations
  • On connect(), restore pinned+open state if saved as "true" and screen is >= 640px
  • Resizing below the sm breakpoint visually unpins without clearing localStorage, so the preference is preserved for wider screens

Test plan

  • Pin the drawer, navigate away and back — drawer should open pinned
  • Unpin the drawer, navigate away and back — drawer should be closed
  • Resize below 640px while pinned — auto-unpins visually; returning on a wide screen restores pinned
  • Incognito window — drawer starts unpinned (no localStorage)
  • bin/rails test — all 888 tests pass (no server-side changes)

🤖 Generated with Claude Code

Store the pinned preference in localStorage so the drawer automatically
opens pinned when returning to any post editor page on the same device.
Only restores on screens >= 640px (matching the existing smQuery check).
Resizing below the breakpoint visually unpins without clearing the
preference, so returning on a wider screen still restores pinned state.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nwwatson nwwatson merged commit 8dda5f2 into master Mar 17, 2026
5 checks passed
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.

1 participant