Skip to content

Commit

Permalink
chore: Merge branch 'master' into rc/v11.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcallen committed May 10, 2024
2 parents 2558c8e + 337ce75 commit 0b7e472
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 282 deletions.
1 change: 0 additions & 1 deletion gh-pages/_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@ <h4>
A plugin that adds ability to create a modal for creating typed variables.
</p>
</div>
</div>
</a>
<a class="card" href="plugins/continuous-toolbox/test/index.html">
<video autoplay playsinline muted loop>
Expand Down
160 changes: 0 additions & 160 deletions plugins/block-test/src/fields/angles.js

This file was deleted.

20 changes: 0 additions & 20 deletions plugins/block-test/src/fields/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,6 @@
import * as Blockly from 'blockly/core';

Blockly.defineBlocksWithJsonArray([
{
type: 'test_fields_angle',
message0: 'angle: %1',
args0: [
{
type: 'field_angle',
name: 'FIELDNAME',
angle: '90',
alt: {
type: 'field_label',
text: 'NO ANGLE FIELD',
},
},
],
style: 'math_blocks',
},
{
type: 'test_fields_text_input',
message0: 'text input %1',
Expand Down Expand Up @@ -165,10 +149,6 @@ export const category = {
text: 'toggle collapsed',
callbackkey: 'toggleCollapsed',
},
{
kind: 'BLOCK',
type: 'test_fields_angle',
},
{
kind: 'BLOCK',
type: 'test_fields_checkbox',
Expand Down
3 changes: 0 additions & 3 deletions plugins/block-test/src/fields/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import {category as fieldDefaults, onInit as initDefaults} from './defaults';
import {category as fieldNumbers, onInit as initNumbers} from './numbers';
import {category as fieldAngles, onInit as initAngles} from './angles';
import {category as fieldDropdowns, onInit as initDropdowns} from './dropdowns';
import {category as fieldImages, onInit as initImages} from './images';
import {category as fieldEmoji, onInit as initEmoji} from './emojis';
Expand All @@ -31,7 +30,6 @@ export const category = {
contents: [
fieldDefaults,
fieldNumbers,
fieldAngles,
fieldDropdowns,
fieldImages,
fieldEmoji,
Expand All @@ -46,7 +44,6 @@ export const category = {
export function onInit(workspace) {
initDefaults(workspace);
initNumbers(workspace);
initAngles(workspace);
initDropdowns(workspace);
initImages(workspace);
initEmoji(workspace);
Expand Down
98 changes: 0 additions & 98 deletions plugins/block-test/src/fields/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,68 +98,6 @@ Blockly.Blocks['test_validators_text_B'] = {
},
};

Blockly.Blocks['test_validators_angle_null'] = {
init: function () {
this.appendDummyInput()
.appendField('always null')
.appendField(new Blockly.FieldAngle(90, this.validate), 'INPUT');
this.setColour(230);
this.setCommentText(
'All input validates to null (invalid). The field' +
' will display the input while the field is being edited (this' +
' includes the text and the graphic), but the value should be the' +
' default value. The input should be red after the first' +
' keystroke.',
);
},

validate: function (newValue) {
return null;
},
};
Blockly.Blocks['test_validators_angle_mult30_force'] = {
init: function () {
this.appendDummyInput()
.appendField('force mult of 30')
.appendField(new Blockly.FieldAngle(90, this.validate), 'INPUT');
this.setColour(230);
this.setCommentText(
'The input value will be rounded to the nearest' +
' multiple of 30. The field will display the input while the field is' +
' being edited (this includes the text and the graphic), but the' +
' value will be the validated (rounded) value. Note: If you want to' +
' do rounding this is not the proper way, use the ROUND property of' +
' the field angle instead.',
);
},

validate: function (newValue) {
return Math.round(newValue / 30) * 30;
},
};
Blockly.Blocks['test_validators_angle_mult30_null'] = {
init: function () {
this.appendDummyInput()
.appendField('not mult of 30 -> null')
.appendField(new Blockly.FieldAngle(90, this.validate), 'INPUT');
this.setColour(230);
this.setCommentText(
'If the input value is not a multiple of 30, the' +
' input will validated to null (invalid). The field will display the' +
' input while the field is being edited (this includes the text and' +
' the graphic), but if the input value is invalid the value should be' +
' the default value.',
);
},

validate: function (newValue) {
if (newValue % 30 != 0) {
return null;
}
return newValue;
},
};

Blockly.Blocks['test_validators_checkbox_null'] = {
init: function () {
this.appendDummyInput()
Expand Down Expand Up @@ -458,34 +396,6 @@ export const category = {
kind: 'BLOCK',
type: 'test_validators_dispose_block',
},
{
kind: 'LABEL',
text: 'Angles',
},
{
kind: 'SEP',
gap: '12',
},
{
kind: 'BLOCK',
type: 'test_validators_angle_null',
},
{
kind: 'SEP',
gap: '12',
},
{
kind: 'BLOCK',
type: 'test_validators_angle_mult30_force',
},
{
kind: 'SEP',
gap: '12',
},
{
kind: 'BLOCK',
type: 'test_validators_angle_mult30_null',
},
{
kind: 'LABEL',
text: 'Checkboxes',
Expand Down Expand Up @@ -514,14 +424,6 @@ export const category = {
kind: 'BLOCK',
type: 'test_validators_checkbox_not_match_null',
},
{
kind: 'LABEL',
text: 'Colours',
},
{
kind: 'SEP',
gap: '12',
},
{
kind: 'LABEL',
text: 'Dropdowns',
Expand Down

0 comments on commit 0b7e472

Please sign in to comment.