Instatic icon indicating copy to clipboard operation
Instatic copied to clipboard

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

Open DavidBabinec opened this issue 5 months ago • 0 comments

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

DavidBabinec avatar Jul 01 '26 19:07 DavidBabinec