feat!: delete angle, colour, and multiline input fields and blocks (#7932)

* chore: delete mocha tests for angle field

* feat! : delete angle field

* chore(tests): delete colour tests from generator tests and golden files

* chore: delete colour blocks and associated generators

* chore: remove colour blocks from playgrounds

* chore: delete mocha tests for colour fields

* chore: fix incorrect comment

* chore: delete colour field from core

* chore: delete multiline input tests from generators tests and golden files

* chore: delete multiline text block and associated generators

* chore: remove multiline text block from playgrounds

* chore: delete mocha tests for multiline input field

* chore: delete multiline input field from core
This commit is contained in:
Rachel Fenichel
2024-03-13 13:28:26 -07:00
committed by GitHub
parent a5126d1176
commit 67c3aae76c
38 changed files with 164 additions and 4629 deletions

View File

@@ -6,7 +6,6 @@
// Former goog.module ID: Blockly.libraryBlocks
import * as colour from './colour.js';
import * as lists from './lists.js';
import * as logic from './logic.js';
import * as loops from './loops.js';
@@ -18,7 +17,6 @@ import * as variablesDynamic from './variables_dynamic.js';
import type {BlockDefinition} from '../core/blocks.js';
export {
colour,
lists,
logic,
loops,
@@ -35,7 +33,6 @@ export {
*/
export const blocks: {[key: string]: BlockDefinition} = Object.assign(
{},
colour.blocks,
lists.blocks,
logic.blocks,
loops.blocks,

View File

@@ -1,112 +0,0 @@
/**
* @license
* Copyright 2012 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
// Former goog.module ID: Blockly.libraryBlocks.colour
import {
createBlockDefinitionsFromJsonArray,
defineBlocks,
} from '../core/common.js';
import '../core/field_colour.js';
/**
* A dictionary of the block definitions provided by this module.
*/
export const blocks = createBlockDefinitionsFromJsonArray([
// Block for colour picker.
{
'type': 'colour_picker',
'message0': '%1',
'args0': [
{
'type': 'field_colour',
'name': 'COLOUR',
'colour': '#ff0000',
},
],
'output': 'Colour',
'helpUrl': '%{BKY_COLOUR_PICKER_HELPURL}',
'style': 'colour_blocks',
'tooltip': '%{BKY_COLOUR_PICKER_TOOLTIP}',
'extensions': ['parent_tooltip_when_inline'],
},
// Block for random colour.
{
'type': 'colour_random',
'message0': '%{BKY_COLOUR_RANDOM_TITLE}',
'output': 'Colour',
'helpUrl': '%{BKY_COLOUR_RANDOM_HELPURL}',
'style': 'colour_blocks',
'tooltip': '%{BKY_COLOUR_RANDOM_TOOLTIP}',
},
// Block for composing a colour from RGB components.
{
'type': 'colour_rgb',
'message0':
'%{BKY_COLOUR_RGB_TITLE} %{BKY_COLOUR_RGB_RED} %1 %{BKY_COLOUR_RGB_GREEN} %2 %{BKY_COLOUR_RGB_BLUE} %3',
'args0': [
{
'type': 'input_value',
'name': 'RED',
'check': 'Number',
'align': 'RIGHT',
},
{
'type': 'input_value',
'name': 'GREEN',
'check': 'Number',
'align': 'RIGHT',
},
{
'type': 'input_value',
'name': 'BLUE',
'check': 'Number',
'align': 'RIGHT',
},
],
'output': 'Colour',
'helpUrl': '%{BKY_COLOUR_RGB_HELPURL}',
'style': 'colour_blocks',
'tooltip': '%{BKY_COLOUR_RGB_TOOLTIP}',
},
// Block for blending two colours together.
{
'type': 'colour_blend',
'message0':
'%{BKY_COLOUR_BLEND_TITLE} %{BKY_COLOUR_BLEND_COLOUR1} ' +
'%1 %{BKY_COLOUR_BLEND_COLOUR2} %2 %{BKY_COLOUR_BLEND_RATIO} %3',
'args0': [
{
'type': 'input_value',
'name': 'COLOUR1',
'check': 'Colour',
'align': 'RIGHT',
},
{
'type': 'input_value',
'name': 'COLOUR2',
'check': 'Colour',
'align': 'RIGHT',
},
{
'type': 'input_value',
'name': 'RATIO',
'check': 'Number',
'align': 'RIGHT',
},
],
'output': 'Colour',
'helpUrl': '%{BKY_COLOUR_BLEND_HELPURL}',
'style': 'colour_blocks',
'tooltip': '%{BKY_COLOUR_BLEND_TOOLTIP}',
},
]);
// Register provided blocks.
defineBlocks(blocks);

View File

@@ -23,7 +23,6 @@ import {
createBlockDefinitionsFromJsonArray,
defineBlocks,
} from '../core/common.js';
import '../core/field_multilineinput.js';
import '../core/field_variable.js';
import {ValueInput} from '../core/inputs/value_input.js';
@@ -48,38 +47,6 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'tooltip': '%{BKY_TEXT_TEXT_TOOLTIP}',
'extensions': ['text_quotes', 'parent_tooltip_when_inline'],
},
{
'type': 'text_multiline',
'message0': '%1 %2',
'args0': [
{
'type': 'field_image',
'src':
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAARCAYAAADpP' +
'U2iAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAdhgAAHYYBXaITgQAAABh0RVh0' +
'U29mdHdhcmUAcGFpbnQubmV0IDQuMS42/U4J6AAAAP1JREFUOE+Vks0KQUEYhjm' +
'RIja4ABtZ2dm5A3t3Ia6AUm7CylYuQRaUhZSlLZJiQbFAyRnPN33y01HOW08z88' +
'73zpwzM4F3GWOCruvGIE4/rLaV+Nq1hVGMBqzhqlxgCys4wJA65xnogMHsQ5luj' +
'nYHTejBBCK2mE4abjCgMGhNxHgDFWjDSG07kdfVa2pZMf4ZyMAdWmpZMfYOsLiD' +
'MYMjlMB+K613QISRhTnITnsYg5yUd0DETmEoMlkFOeIT/A58iyK5E18BuTBfgYX' +
'fwNJv4P9/oEBerLylOnRhygmGdPpTTBZAPkde61lbQe4moWUvYUZYLfUNftIY4z' +
'wA5X2Z9AYnQrEAAAAASUVORK5CYII=',
'width': 12,
'height': 17,
'alt': '\u00B6',
},
{
'type': 'field_multilinetext',
'name': 'TEXT',
'text': '',
},
],
'output': 'String',
'style': 'text_blocks',
'helpUrl': '%{BKY_TEXT_TEXT_HELPURL}',
'tooltip': '%{BKY_TEXT_TEXT_TOOLTIP}',
'extensions': ['parent_tooltip_when_inline'],
},
{
'type': 'text_join',
'message0': '',