blockly-samples icon indicating copy to clipboard operation
blockly-samples copied to clipboard

Fix conflict when using field-grid-dropdown with field-colour

Open berkerozer opened this issue 3 months ago • 1 comments

🐛 Fix: Register Conflict Between @blockly/field-grid-dropdown and @blockly/field-colour

This PR addresses an issue where using @blockly/field-grid-dropdown and @blockly/field-colour together would cause a Name "field_grid_dropdown" already registered error due to double registration.

🔧 Changes Made

  • Introduced a new utility function registerFieldGridDropdown() in @blockly/field-grid-dropdown.
  • Modified @blockly/field-colour to import and call registerFieldGridDropdown() explicitly.
  • Ensured that the dropdown field is only registered once and safely when needed.

✅ Benefits

  • Avoids duplicate field registration errors.
  • Improves modular use of Blockly plugins.
  • Safer integration of multiple plugins across different projects.
Ekran Resmi 2025-09-07 01 47 13

berkerozer avatar Sep 06 '25 22:09 berkerozer

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Sep 06 '25 22:09 google-cla[bot]