From d30e14d90614f30bff70f06e5ab68a553ded4e1a Mon Sep 17 00:00:00 2001 From: dakshkanaujia Date: Tue, 23 Jul 2024 13:24:17 +0000 Subject: [PATCH] fix: remove redundant blocklyNonSelectable class and integrate non-selectability into existing classes https://github.com/google/blockly/issues/8328 --- tests/mocha/blocklyMenu.code-search | 85 ----------------------------- 1 file changed, 85 deletions(-) delete mode 100644 tests/mocha/blocklyMenu.code-search diff --git a/tests/mocha/blocklyMenu.code-search b/tests/mocha/blocklyMenu.code-search deleted file mode 100644 index 781ae9b9954..00000000000 --- a/tests/mocha/blocklyMenu.code-search +++ /dev/null @@ -1,85 +0,0 @@ -# Query: blocklyMenu -# ContextLines: 1 - -26 results - 3 files - -core/css.ts: - 420 - 421: .blocklyDropdownMenu .blocklyMenuItem { - 422 /* 28px on the left for icon or checkbox. */ - - 426 /* BiDi override for the resting state. */ - 427: .blocklyDropdownMenu .blocklyMenuItemRtl { - 428 /* Flip left/right padding for BiDi. */ - - 432 - 433: .blocklyWidgetDiv .blocklyMenu { - 434 background: #fff; - - 447 - 448: .blocklyWidgetDiv .blocklyMenu.blocklyFocused { - 449 box-shadow: 0 0 6px 1px rgba(0,0,0,.3); - - 451 - 452: .blocklyDropDownDiv .blocklyMenu { - 453 background: inherit; /* Compatibility with gapi, reset from goog-menu */ - - 461 /* State: resting. */ - 462: .blocklyMenuItem { - 463 border: none; - - 474 /* State: disabled. */ - 475: .blocklyMenuItemDisabled { - 476 color: #ccc; - - 480 /* State: hover. */ - 481: .blocklyMenuItemHighlight { - 482 background-color: rgba(0,0,0,.1); - - 485 /* State: selected/checked. */ - 486: .blocklyMenuItemCheckbox { - 487 height: 16px; - - 491 - 492: .blocklyMenuItemSelected .blocklyMenuItemCheckbox { - 493 background: url(<<>>/sprites.png) no-repeat -48px -16px; - - 498 - 499: .blocklyMenuItemRtl .blocklyMenuItemCheckbox { - 500 float: right; - -core/menu.ts: - 87 const element = document.createElement('div'); - 88: // goog-menu is deprecated, use blocklyMenu. May 2020. - 89: element.className = 'blocklyMenu goog-menu'; - 90 element.tabIndex = 0; - - 230 while (currentElement && currentElement !== menuElem) { - 231: if (currentElement.classList.contains('blocklyMenuItem')) { - 232 // Having found a menu item's div, locate that menu item in this menu. - -core/menuitem.ts: - 66 // Set class and style - 67: // goog-menuitem* is deprecated, use blocklyMenuItem*. May 2020. - 68 element.className = - 69: 'blocklyMenuItem goog-menuitem ' + - 70: (this.enabled ? '' : 'blocklyMenuItemDisabled goog-menuitem-disabled ') + - 71: (this.checked ? 'blocklyMenuItemSelected goog-option-selected ' : '') + - 72 (this.highlight - 73: ? 'blocklyMenuItemHighlight goog-menuitem-highlight ' - 74 : '') + - 75: (this.rightToLeft ? 'blocklyMenuItemRtl goog-menuitem-rtl ' : ''); - 76 - 77 const content = document.createElement('div'); - 78: content.className = 'blocklyMenuItemContent goog-menuitem-content'; - 79 // Add a checkbox for checkable menu items. - - 81 const checkbox = document.createElement('div'); - 82: checkbox.className = 'blocklyMenuItemCheckbox goog-menuitem-checkbox'; - 83 content.appendChild(checkbox); - - 193 if (el && this.isEnabled()) { - 194: // goog-menuitem-highlight is deprecated, use blocklyMenuItemHighlight. - 195 // May 2020. - 196: const name = 'blocklyMenuItemHighlight'; - 197 const nameDep = 'goog-menuitem-highlight';