Instatic
Instatic copied to clipboard
fix(editor): hide empty container placeholder for inline styles
What changed
- Treat a non-empty
nodeWrapperProps.styleas authored styling for emptybase.containernodes in the editor canvas. - Added a regression test proving an inline-styled empty container keeps its root style but does not render the
Empty containeraffordance.
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 testbun run buildbun run lintnpx react-doctor@latest --verbose --scope changed --base origin/main