Skip to content

refactor(editor): split non-site workspace layout state#79

Merged
DavidBabinec merged 1 commit into
mainfrom
refactor/editor-store-boundaries
Jun 17, 2026
Merged

refactor(editor): split non-site workspace layout state#79
DavidBabinec merged 1 commit into
mainfrom
refactor/editor-store-boundaries

Conversation

@DavidBabinec

Copy link
Copy Markdown
Contributor

What changed

  • Added an admin-level workspace layout store for Content, Data, and Media sidebar/right-panel chrome.
  • Moved per-workspace layout storage out of the Site editor folder into src/admin/state.
  • Split Site editor layout persistence into a Site-only mapper/hook and removed Data/sidebar chrome state from uiSlice.
  • Rewired Content, Data, Media, and AdminWorkspaceCanvasLayout away from @site/store/store.
  • Added an architecture gate preventing non-site workspaces from importing the Site editor store.
  • Updated docs and affected tests for the new ownership boundary.

Why

Content/Data/Media were depending on the full Site editor store for generic shell state. That made the store boundary blurry and kept non-site workspace chrome coupled to Site-only panel concepts. This refactor gives shared workspace chrome its own admin-level owner while keeping Site editor layout persistence explicitly Site-scoped.

Impact

The immediate benefit is a cleaner dependency boundary: non-site workspace layout behavior can change without touching the Site editor store, and future store refactors have an executable import gate. Content/Data/Media still preserve their sidebar widths, right-panel state, and Data sidebar collapse state through the same instatic-editor-layout-v2 key.

Verification

  • bun run build
  • bun run lint
  • bun test
  • bunx react-doctor@latest --verbose --scope changed --base main

@DavidBabinec
DavidBabinec marked this pull request as ready for review June 17, 2026 20:23
@DavidBabinec
DavidBabinec merged commit ee061a5 into main Jun 17, 2026
6 checks passed
@DavidBabinec
DavidBabinec deleted the refactor/editor-store-boundaries branch June 30, 2026 23:44
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