Creating/editing data bindings for CSS styles is the most frustrating aspect of using the Visual Editor. The main issues I’ve isolated are (I used style.borderStyle
for my testing, but you should be able to confirm with any style property):
- A binding created in the Styles tab for a CSS property is not in sync with the equivalent binding in the Data tab.
-
style.____
bindings in the data tab sometimes have no effect–but sometimes they do. It’s unpredictable, which is worse than being broken. - There are circumstances under which you can’t delete your bindings inside of JSON view, which as a dev is disturbing, since JSON view is supposed to be my failsafe against any bugginess. Not being able to edit the content JSON by hand when all else fails means that I’m not in control of my work. I should always be able to rely on JSON view as a dev.
- Sometimes bindings that appear to have been deleted inside the Visual Editor UI are actually still present inside of the content JSON. So if you then recreate a binding, you end up getting a mystery “ghost” binding from the past.
- Sometimes editing a style data binding in the Data tab will crash the Visual Editor. I tried to replicate this but wasn’t able to.
- Editing a
style
data binding inside the Data tab triggers the creation of a data binding that’s prefixed withmeta.bindingActions
. If you edit that data binding, then another is triggered with the prefixmeta.bindingActions.meta.bindingActions
, and so on infinitely. So editingstyle.borderStyle
generatesmeta.bindingActions.style.borderStyle
; editing that in turn generatesmeta.bindingActions.meta.bindingActions.style.borderStyle
, and so on. These additional generated bindings don’t seem to have any effect on the rendered block, but they’re confusing and clutter up the data tab. - Creating a
style
data binding from within the Data tab doesn’t always work, you have to go through the Styles tab for it to be reliable (with the above caveats).
These issues aren’t limited to just style data bindings, they appear to happen with various other properties, as well. I don’t have the time to do a systematic review of exactly which ones are problematic, but the styles one is by far the most annoying since it’s so frequently used.
Builder content link
Builder public api key
662907a12adb4e7db3ed47d358170dde
Detailed steps to reproduce the bug
- Create a block.
- Create a data binding for a style inside of the Styles tab.
- Compare your data binding inside the Styles tab with the same data binding inside of the Data tab.
Screenshots or video link
Code stack you are integrating Builder with
Next.js
Reproducible code example
N/A