Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions core/toolbox/category.ts
Comment thread
Abhinav-Chdhary marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export class ToolboxCategory
protected makeDefaultCssConfig_(): CssConfig {
return {
'container': 'blocklyToolboxCategory',
'row': 'blocklyTreeRow',
'row': 'blocklyToolboxCategory',
'rowcontentcontainer': 'blocklyTreeRowContentContainer',
'icon': 'blocklyTreeIcon',
'label': 'blocklyTreeLabel',
Expand Down Expand Up @@ -659,7 +659,7 @@ export type CssConfig = ToolboxCategory.CssConfig;

/** CSS for Toolbox. See css.js for use. */
Css.register(`
.blocklyTreeRow:not(.blocklyTreeSelected):hover {
.blocklyToolboxCategory:not(.blocklyTreeSelected):hover {
background-color: rgba(255, 255, 255, .2);
}

Expand All @@ -671,15 +671,15 @@ Css.register(`
margin: 1px 0 1px 5px;
}

.blocklyTreeRow {
.blocklyToolboxCategory {
height: 22px;
line-height: 22px;
margin-bottom: 3px;
padding-right: 8px;
white-space: nowrap;
}

.blocklyToolboxDiv[dir="RTL"] .blocklyTreeRow {
.blocklyToolboxDiv[dir="RTL"] .blocklyToolboxCategory {
margin-left: 8px;
padding-right: 0;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/mocha/comment_deserialization_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ suite('Comment Deserialization', function () {
test('Toolbox', function () {
// Place from toolbox.
const toolbox = this.workspace.getToolbox();
simulateClick(toolbox.HtmlDiv.querySelector('.blocklyTreeRow'));
simulateClick(toolbox.HtmlDiv.querySelector('.blocklyToolboxCategory'));
simulateClick(
toolbox.getFlyout().svgGroup_.querySelector('.blocklyPath'),
);
Expand Down
4 changes: 3 additions & 1 deletion tests/mocha/toolbox_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ suite('Toolbox', function () {
sinon.assert.calledOnce(hideChaffStub);
});
test('Category clicked -> Should select category', function () {
const categoryXml = document.getElementsByClassName('blocklyTreeRow')[0];
const categoryXml = document.getElementsByClassName(
'blocklyToolboxCategory',
)[0];
const evt = {
'target': categoryXml,
};
Expand Down