Skip to content

Shadow block dropdown gets color of parent category #7416

@clementcontet

Description

@clementcontet

Check for duplicates

  • I have searched for similar issues before opening a new one.

Description

If a shadow block has a dropdown, it gets the color of the parent category, instead of the color of the block own category.

Reproduction steps

  1. Run npm run start and click the Advanced playground link to go to the advanced playground..
  2. Load the following JSON into the playground:
{
  "blocks": {
    "languageVersion": 0,
    "blocks": [
      {
        "type": "controls_whileUntil",
        "inputs": {
          "BOOL": {
            "shadow": {
              "type": "logic_boolean"
            }
          }
        }
      }
    ]
  }
}
  1. Click on the dropdown block.
  2. Observe how the dropdown has the color of the parent.

Stack trace

No response

Screenshots

Tested on https://www.supercodingball.com/code/offline/do-nothing:

shadow.dropdown.color.mov

Browsers

Chrome desktop

To Fix

  1. Run the reproduction steps to make sure you can reproduce the problem.
  2. Modify the showEditor_ method in the FieldDropdown to always show the current block color (instead of showing the parent colour when the block is a shadow).
  3. Rerun the reproduction steps and make sure you can't reproduce the problem..

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions