Skip to content

fix(editor): hide empty container placeholder for inline styles#148

Draft
DavidBabinec wants to merge 1 commit into
mainfrom
fix/empty-container-inline-style
Draft

fix(editor): hide empty container placeholder for inline styles#148
DavidBabinec wants to merge 1 commit into
mainfrom
fix/empty-container-inline-style

Conversation

@DavidBabinec

Copy link
Copy Markdown
Contributor

What changed

  • Treat a non-empty nodeWrapperProps.style as authored styling for empty base.container nodes in the editor canvas.
  • Added a regression test proving an inline-styled empty container keeps its root style but does not render the Empty container affordance.

Why

Class-styled empty containers already suppressed the placeholder, but inline-styled empty containers did not because ContainerEditor only checked mcClassName. That made the canvas behavior inconsistent between class and inline styling.

Impact

Authors can style empty containers inline for spacer/background/positioning use cases without the canvas showing the empty-state label over the authored element.

Verification

  • bun test src/__tests__/base-modules-shared-render.editor.test.tsx (red before fix, green after)
  • bun test
  • bun run build
  • bun run lint
  • npx react-doctor@latest --verbose --scope changed --base origin/main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant