Support » Plugin: Blocks CSS: CSS Editor for Gutenberg Blocks » when loaded, causes uagb/forms to update/save for every keystroke

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter donbowman

    (@donbowman)

    update: this is an interaction w/ blocks-css. I am not certain which is at fault.

    Thread Starter donbowman

    (@donbowman)

    OK, to reproduce:

    1. https://playground.wordpress.net/?plugin=blocks-css&plugin=ultimate-addons-for-gutenberg&php=8.3&wp=6.4&storage=none&php-extension-bundle=kitchen-sink
    2. Edit Site
    3. Create synced pattern ‘form’
    4. Add a ‘form’ block from uagb, accept default
    5. Create a page
    6. create a paragraph w/ a few words
    7. insert the ‘form’ synced pattern
    8. in console, run ‘monitorEvents(window);’
    9. type a key in the paragraph from #6

    You will observe a constant stream of ‘Updated Block: uagb/forms’ messages in console, one for each keystroke.

    Also, the system will be exceptionally slow.

    Plugin Author Hardeep Asrani

    (@hardeepasrani)

    Hey @donbowman,

    We’ve reported this to our GH and will look into it to confirm why. Thank you for clear reproduction instructions, I was able to reproduce it easily.

    Thank you!

    Plugin Author Hardeep Asrani

    (@hardeepasrani)

    Hey @donbowman,

    I was looking more into this and that is due to the fact that we check if there have been any changes to the CSS with every change in blocks, as someone might be editing, removing or copying blocks and CSS might require updating. So it is required to check and previewing custom CSS used by blocks.

    Let me know if that makes sense.

    Plugin Author Hardeep Asrani

    (@hardeepasrani)

    What I’ve done, I’ve added a debounce and typing checker counter there to make the performance much better as we don’t now keep checking for each keypress but have a 1second of debounce. So if you’re typing, we won’t check again and again. And if you are editing CSS, it will debounce and not update instantly.

    It will be out in the next version.

    Thread Starter donbowman

    (@donbowman)

    so although that might help, the performance is really quite poor here.

    me typing in a paragraph can’t possible change css somewhere, and having some javascript fire and then recalculate other blocks for every keystroke, i’m not sure why its need.

    Plugin Author Hardeep Asrani

    (@hardeepasrani)

    Hey @donbowman,

    Yea, as I mentioned we added a condition to not check if the user is typing, so typing action will be ignored from now on.

    If you want to test it out, you can download the beta version here: https://verti-artifacts.s3.amazonaws.com/otter-blocks-fix-issue-2056-59ff4376/blocks-css.zip

    As always, we recommend you try this out on a test site like WP Playground. Let me know if fixes it for you.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.