Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: v10.1.0 #7370

Closed
wants to merge 60 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
93126df
Merge pull request #7223 from google/master
ericblackmonGoogle Jun 28, 2023
55decfe
chore: delete unused function getFirstStatementConnection (#7228)
rachel-fenichel Jun 29, 2023
2d27105
chore: delete unused fuction clearTransformAttributes_ (#7229)
rachel-fenichel Jun 29, 2023
a2672a4
chore: delete drag surface files (#7216)
BeksOmega Jun 29, 2023
fa58cba
chore: update app engine version names (#7231)
maribethb Jun 30, 2023
57fdb71
fix: set flyout visbility on calling setExpanded (#7199)
itsjayway Jul 5, 2023
a677355
fix: Restore `HSV_SATURATION` and `HSV_VALUE` accessors and deprecate…
cpcallen Jul 5, 2023
f1e0e11
feat(test): add helper functions for getting selected block and block…
rachel-fenichel Jul 6, 2023
956b72a
chore: add test helpers for getting blocks from the toolbox (#7255)
BeksOmega Jul 6, 2023
eb4025b
chore: fix problems from rebase (#7257)
BeksOmega Jul 6, 2023
07ba841
chore: add test helpers for connecting blocks (#7258)
BeksOmega Jul 6, 2023
aefb97d
fix(tests): Make test `import`s correct and more consistent (#7260)
cpcallen Jul 7, 2023
28b08ea
chore: add css classes to individual zoom controls (#7261)
BeksOmega Jul 7, 2023
f0f72c0
chore(deps): Bump tough-cookie from 4.1.2 to 4.1.3 (#7265)
dependabot[bot] Jul 10, 2023
bb7697f
chore: Merge `master` into `develop` following v10.0.1 release
ericblackmonGoogle Jul 10, 2023
75ea8d9
fix: disposing workspace comments. (#7264)
johnnesky Jul 10, 2023
c7d0610
feat(tests): add right click tests and helpers (#7262)
rachel-fenichel Jul 10, 2023
b1045a2
chore: remove extra waits and shorten necessary ones (#7259)
BeksOmega Jul 11, 2023
cae721e
chore: create test for undo block movements and editing a field (#7272)
ericblackmonGoogle Jul 11, 2023
6b3803e
chore(tests): Add documentation to browser test helper functions (#7280)
rachel-fenichel Jul 11, 2023
a940dc5
chore: Added test for loading json and interblock deletion (#7282)
ericblackmonGoogle Jul 12, 2023
741e8db
chore(tests): Add tests for adding and removing comments (#7284)
rachel-fenichel Jul 13, 2023
8355351
fix: add compose and decompose errors to mutator icon (#7289)
BeksOmega Jul 14, 2023
82a775a
test: Basic Blocks: verify drag blocks works properly (#7291)
cpcallen Jul 14, 2023
d503fbb
fix(generators): Changes to exports and access controls for TypeScrip…
cpcallen Jul 17, 2023
1bc4f67
fix: Correct errors in `HSV_SATURATION`, `HSV_VALUE` accessors (#7297)
cpcallen Jul 17, 2023
abb82a2
chore: add tests for disabling blocks (#7279)
BeksOmega Jul 17, 2023
30ed445
release: v10.0.2 #7295 and #7297 (#7298) (#7299)
ericblackmonGoogle Jul 17, 2023
06ba992
feat: Allow dragging from simple toolbox (#7301)
NeilFraser Jul 18, 2023
9efc0d7
chore: fix renamings (#7312)
BeksOmega Jul 20, 2023
786553e
chore: update block test dependency (#7313)
BeksOmega Jul 24, 2023
36ba408
fix: have icons use the new render management system (#7296)
BeksOmega Jul 24, 2023
c61da55
fix(tests): fix broken browser tests (#7324)
rachel-fenichel Jul 24, 2023
9fc57a3
chore(deps): Bump word-wrap from 1.2.3 to 1.2.5 (#7323)
dependabot[bot] Jul 25, 2023
2546b01
chore(deps): Bump prettier from 2.8.8 to 3.0.0 (#7322)
dependabot[bot] Jul 25, 2023
b5911c2
chore(tests): use a shared chrome instance for all browser tests (#7328)
rachel-fenichel Jul 25, 2023
3d9f3a9
chore(deps): Bump @typescript-eslint/eslint-plugin from 5.59.11 to 6.…
dependabot[bot] Jul 25, 2023
96c913d
chore(deps): Bump webdriverio from 8.11.2 to 8.13.10 (#7319)
dependabot[bot] Jul 26, 2023
435e854
fix: make deserialization use the new render management system (#7306)
BeksOmega Jul 26, 2023
c8be2f2
fix: make insertion markers use new render management system (#7307)
BeksOmega Jul 26, 2023
734b687
chore(tests): Update RTL tests and misc improvements to helpers (#7293)
maribethb Jul 27, 2023
5151889
chore: create test for mutator (#7278)
ericblackmonGoogle Jul 27, 2023
7118dd3
chore: remove old render management system (#7308)
BeksOmega Jul 27, 2023
9dc293b
chore(tests): add basic delete tests (#7285)
maribethb Jul 28, 2023
c3aa970
feat: add the ability to toggle scrollbar visibility (#7314)
BeksOmega Jul 28, 2023
9c24848
chore(tests): update generator test blocks to use forBlock (#7311)
rachel-fenichel Jul 28, 2023
1fe82b2
chore(tests): fix disable block tests (#7330)
maribethb Jul 28, 2023
8893107
fix(tests): Make .mocharc.js CWD-independent (#7329)
cpcallen Jul 31, 2023
f3899e2
fix(blocks): boolean variable block wrong shape for zelos (#7335)
zfangqijun Jul 31, 2023
5e0390b
fix(build): support running Blocky locally on Windows machines (#7281)
abdul-alhasany Aug 2, 2023
18e0d53
chore(tests): fix delete tests (#7351)
maribethb Aug 2, 2023
8241fca
chore(tests): cleanup and toolbox drag tests (#7350)
rachel-fenichel Aug 3, 2023
dbe926d
fix: removed X & Y from toolbox.ts and replaced movBy to moveTo (#7333)
varshneydevansh Aug 4, 2023
2ac13b5
feat: have the trashcan hide scrollbars when the flyout opens (#7357)
BeksOmega Aug 4, 2023
2a2b3b3
chore: change the way we look for upstream remote (#7230)
maribethb Aug 4, 2023
826510f
fix: Preemptively fix API change in NDB. (#7361)
NeilFraser Aug 7, 2023
0ac86c7
fix: dedeprecate render functions (#7359)
BeksOmega Aug 8, 2023
a0b5657
feat: make field `initView` and `initModel` more accessible (#7345)
maribethb Aug 8, 2023
8421538
feat: Insertion marker json deserialization 7316 (#7364)
varshneydevansh Aug 9, 2023
80b1b44
fix: connect animation persisting (#7365)
BeksOmega Aug 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion appengine/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ def xmlToKey(xml_content):
# Store XML and return a generated key.
xml_hash = int(hashlib.sha1(xml_content.encode("utf-8")).hexdigest(), 16)
xml_hash = int(xml_hash % (2 ** 64) - (2 ** 63))
lookup_query = Xml.query(Xml.xml_hash == xml_hash)
client = ndb.Client()
with client.context():
lookup_query = Xml.query(Xml.xml_hash == xml_hash)
lookup_result = lookup_query.get()
if lookup_result:
xml_key = lookup_result.key.string_id()
Expand Down
2 changes: 1 addition & 1 deletion blocks/blocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ export const blocks: {[key: string]: BlockDefinition} = Object.assign(
math.blocks,
procedures.blocks,
variables.blocks,
variablesDynamic.blocks
variablesDynamic.blocks,
);
34 changes: 17 additions & 17 deletions blocks/lists.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ const LISTS_CREATE_WITH = {
this.updateShape_();
this.setOutput(true, 'Array');
this.setMutator(
new MutatorIcon(['lists_create_with_item'], this as unknown as BlockSvg)
new MutatorIcon(['lists_create_with_item'], this as unknown as BlockSvg),
); // BUG(#6905)
this.setTooltip(Msg['LISTS_CREATE_WITH_TOOLTIP']);
},
Expand Down Expand Up @@ -182,16 +182,16 @@ const LISTS_CREATE_WITH = {
*/
decompose: function (
this: CreateWithBlock,
workspace: Workspace
workspace: Workspace,
): ContainerBlock {
const containerBlock = workspace.newBlock(
'lists_create_with_container'
'lists_create_with_container',
) as ContainerBlock;
(containerBlock as BlockSvg).initSvg();
let connection = containerBlock.getInput('STACK')!.connection;
for (let i = 0; i < this.itemCount_; i++) {
const itemBlock = workspace.newBlock(
'lists_create_with_item'
'lists_create_with_item',
) as ItemBlock;
(itemBlock as BlockSvg).initSvg();
if (!itemBlock.previousConnection) {
Expand All @@ -209,7 +209,7 @@ const LISTS_CREATE_WITH = {
*/
compose: function (this: CreateWithBlock, containerBlock: Block) {
let itemBlock: ItemBlock | null = containerBlock.getInputTargetBlock(
'STACK'
'STACK',
) as ItemBlock;
// Count number of inputs.
const connections: Connection[] = [];
Expand Down Expand Up @@ -242,7 +242,7 @@ const LISTS_CREATE_WITH = {
*/
saveConnections: function (this: CreateWithBlock, containerBlock: Block) {
let itemBlock: ItemBlock | null = containerBlock.getInputTargetBlock(
'STACK'
'STACK',
) as ItemBlock;
let i = 0;
while (itemBlock) {
Expand All @@ -265,7 +265,7 @@ const LISTS_CREATE_WITH = {
this.removeInput('EMPTY');
} else if (!this.itemCount_ && !this.getInput('EMPTY')) {
this.appendDummyInput('EMPTY').appendField(
Msg['LISTS_CREATE_EMPTY_TITLE']
Msg['LISTS_CREATE_EMPTY_TITLE'],
);
}
// Add new inputs.
Expand Down Expand Up @@ -297,7 +297,7 @@ const LISTS_CREATE_WITH_CONTAINER = {
init: function (this: ContainerBlock) {
this.setStyle('list_blocks');
this.appendDummyInput().appendField(
Msg['LISTS_CREATE_WITH_CONTAINER_TITLE_ADD']
Msg['LISTS_CREATE_WITH_CONTAINER_TITLE_ADD'],
);
this.appendStatementInput('STACK');
this.setTooltip(Msg['LISTS_CREATE_WITH_CONTAINER_TOOLTIP']);
Expand Down Expand Up @@ -358,7 +358,7 @@ const LISTS_INDEXOF = {
this.setTooltip(() => {
return Msg['LISTS_INDEX_OF_TOOLTIP'].replace(
'%1',
this.workspace.options.oneBasedIndex ? '0' : '-1'
this.workspace.options.oneBasedIndex ? '0' : '-1',
);
});
},
Expand Down Expand Up @@ -401,7 +401,7 @@ const LISTS_GETINDEX = {
const isStatement = value === 'REMOVE';
(this.getSourceBlock() as GetIndexBlock).updateStatement_(isStatement);
return undefined;
}
},
);
this.appendValueInput('VALUE')
.setCheck('Array')
Expand Down Expand Up @@ -568,7 +568,7 @@ const LISTS_GETINDEX = {
this.appendValueInput('AT').setCheck('Number');
if (Msg['ORDINAL_NUMBER_SUFFIX']) {
this.appendDummyInput('ORDINAL').appendField(
Msg['ORDINAL_NUMBER_SUFFIX']
Msg['ORDINAL_NUMBER_SUFFIX'],
);
}
} else {
Expand Down Expand Up @@ -596,7 +596,7 @@ const LISTS_GETINDEX = {
return null;
}
return undefined;
}
},
);
this.getInput('AT')!.appendField(menu, 'WHERE');
if (Msg['LISTS_GET_INDEX_TAIL']) {
Expand Down Expand Up @@ -685,7 +685,7 @@ const LISTS_SETINDEX = {
' ' +
Msg['LISTS_INDEX_FROM_START_TOOLTIP'].replace(
'%1',
this.workspace.options.oneBasedIndex ? '#1' : '#0'
this.workspace.options.oneBasedIndex ? '#1' : '#0',
);
}
return tooltip;
Expand Down Expand Up @@ -747,7 +747,7 @@ const LISTS_SETINDEX = {
this.appendValueInput('AT').setCheck('Number');
if (Msg['ORDINAL_NUMBER_SUFFIX']) {
this.appendDummyInput('ORDINAL').appendField(
Msg['ORDINAL_NUMBER_SUFFIX']
Msg['ORDINAL_NUMBER_SUFFIX'],
);
}
} else {
Expand Down Expand Up @@ -775,7 +775,7 @@ const LISTS_SETINDEX = {
return null;
}
return undefined;
}
},
);
this.moveInputBefore('AT', 'TO');
if (this.getInput('ORDINAL')) {
Expand Down Expand Up @@ -887,7 +887,7 @@ const LISTS_GETSUBLIST = {
this.appendValueInput('AT' + n).setCheck('Number');
if (Msg['ORDINAL_NUMBER_SUFFIX']) {
this.appendDummyInput('ORDINAL' + n).appendField(
Msg['ORDINAL_NUMBER_SUFFIX']
Msg['ORDINAL_NUMBER_SUFFIX'],
);
}
} else {
Expand Down Expand Up @@ -915,7 +915,7 @@ const LISTS_GETSUBLIST = {
block.setFieldValue(value, 'WHERE' + n);
return null;
}
}
},
);
this.getInput('AT' + n)!.appendField(menu, 'WHERE' + n);
if (n === 1) {
Expand Down
24 changes: 12 additions & 12 deletions blocks/logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ const TOOLTIPS_BY_OP = {

Extensions.register(
'logic_op_tooltip',
Extensions.buildTooltipForDropdown('OP', TOOLTIPS_BY_OP)
Extensions.buildTooltipForDropdown('OP', TOOLTIPS_BY_OP),
);

/** Type of a block that has CONTROLS_IF_MUTATOR_MIXIN */
Expand Down Expand Up @@ -417,10 +417,10 @@ const CONTROLS_IF_MUTATOR_MIXIN = {
this.elseifCount_++;
// TODO(#6920): null valid, undefined not.
valueConnections.push(
clauseBlock.valueConnection_ as Connection | null
clauseBlock.valueConnection_ as Connection | null,
);
statementConnections.push(
clauseBlock.statementConnection_ as Connection | null
clauseBlock.statementConnection_ as Connection | null,
);
break;
case 'controls_if_else':
Expand All @@ -438,7 +438,7 @@ const CONTROLS_IF_MUTATOR_MIXIN = {
this.reconnectChildBlocks_(
valueConnections,
statementConnections,
elseStatementConnection
elseStatementConnection,
);
},
/**
Expand Down Expand Up @@ -500,7 +500,7 @@ const CONTROLS_IF_MUTATOR_MIXIN = {
this.reconnectChildBlocks_(
valueConnections,
statementConnections,
elseStatementConnection
elseStatementConnection,
);
},
/**
Expand All @@ -523,12 +523,12 @@ const CONTROLS_IF_MUTATOR_MIXIN = {
.setCheck('Boolean')
.appendField(Msg['CONTROLS_IF_MSG_ELSEIF']);
this.appendStatementInput('DO' + i).appendField(
Msg['CONTROLS_IF_MSG_THEN']
Msg['CONTROLS_IF_MSG_THEN'],
);
}
if (this.elseCount_) {
this.appendStatementInput('ELSE').appendField(
Msg['CONTROLS_IF_MSG_ELSE']
Msg['CONTROLS_IF_MSG_ELSE'],
);
}
},
Expand All @@ -545,7 +545,7 @@ const CONTROLS_IF_MUTATOR_MIXIN = {
this: IfBlock,
valueConnections: Array<Connection | null>,
statementConnections: Array<Connection | null>,
elseStatementConnection: Connection | null
elseStatementConnection: Connection | null,
) {
for (let i = 1; i <= this.elseifCount_; i++) {
valueConnections[i]?.reconnect(this, 'IF' + i);
Expand All @@ -559,7 +559,7 @@ Extensions.registerMutator(
'controls_if_mutator',
CONTROLS_IF_MUTATOR_MIXIN,
null as unknown as undefined, // TODO(#6920)
['controls_if_elseif', 'controls_if_else']
['controls_if_elseif', 'controls_if_else'],
);

/**
Expand All @@ -579,7 +579,7 @@ const CONTROLS_IF_TOOLTIP_EXTENSION = function (this: IfBlock) {
return Msg['CONTROLS_IF_TOOLTIP_4'];
}
return '';
}.bind(this)
}.bind(this),
);
};

Expand Down Expand Up @@ -617,7 +617,7 @@ const LOGIC_COMPARE_ONCHANGE_MIXIN = {
blockB &&
!this.workspace.connectionChecker.doTypeChecks(
blockA.outputConnection!,
blockB.outputConnection!
blockB.outputConnection!,
)
) {
// Mismatch between two inputs. Revert the block connections,
Expand Down Expand Up @@ -686,7 +686,7 @@ const LOGIC_TERNARY_ONCHANGE_MIXIN = {
block &&
!block.workspace.connectionChecker.doTypeChecks(
block.outputConnection!,
parentConnection
parentConnection,
)
) {
// Ensure that any disconnections are grouped with the causing
Expand Down
19 changes: 11 additions & 8 deletions blocks/loops.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ const WHILE_UNTIL_TOOLTIPS = {

Extensions.register(
'controls_whileUntil_tooltip',
Extensions.buildTooltipForDropdown('MODE', WHILE_UNTIL_TOOLTIPS)
Extensions.buildTooltipForDropdown('MODE', WHILE_UNTIL_TOOLTIPS),
);

/**
Expand All @@ -242,7 +242,7 @@ const BREAK_CONTINUE_TOOLTIPS = {

Extensions.register(
'controls_flow_tooltip',
Extensions.buildTooltipForDropdown('FLOW', BREAK_CONTINUE_TOOLTIPS)
Extensions.buildTooltipForDropdown('FLOW', BREAK_CONTINUE_TOOLTIPS),
);

/** Type of a block that has CUSTOM_CONTEXT_MENU_CREATE_VARIABLES_GET_MIXIN */
Expand All @@ -264,7 +264,7 @@ const CUSTOM_CONTEXT_MENU_CREATE_VARIABLES_GET_MIXIN = {
*/
customContextMenu: function (
this: CustomContextMenuBlock,
options: Array<ContextMenuOption | LegacyContextMenuOption>
options: Array<ContextMenuOption | LegacyContextMenuOption>,
) {
if (this.isInFlyout) {
return;
Expand All @@ -289,17 +289,20 @@ const CUSTOM_CONTEXT_MENU_CREATE_VARIABLES_GET_MIXIN = {

Extensions.registerMixin(
'contextMenu_newGetVariableBlock',
CUSTOM_CONTEXT_MENU_CREATE_VARIABLES_GET_MIXIN
CUSTOM_CONTEXT_MENU_CREATE_VARIABLES_GET_MIXIN,
);

Extensions.register(
'controls_for_tooltip',
Extensions.buildTooltipWithFieldText('%{BKY_CONTROLS_FOR_TOOLTIP}', 'VAR')
Extensions.buildTooltipWithFieldText('%{BKY_CONTROLS_FOR_TOOLTIP}', 'VAR'),
);

Extensions.register(
'controls_forEach_tooltip',
Extensions.buildTooltipWithFieldText('%{BKY_CONTROLS_FOREACH_TOOLTIP}', 'VAR')
Extensions.buildTooltipWithFieldText(
'%{BKY_CONTROLS_FOREACH_TOOLTIP}',
'VAR',
),
);

/**
Expand Down Expand Up @@ -366,7 +369,7 @@ const CONTROL_FLOW_IN_LOOP_CHECK_MIXIN = {
}
const enabled = !!this.getSurroundLoop();
this.setWarningText(
enabled ? null : Msg['CONTROLS_FLOW_STATEMENTS_WARNING']
enabled ? null : Msg['CONTROLS_FLOW_STATEMENTS_WARNING'],
);
if (!this.isInFlyout) {
const group = Events.getGroup();
Expand All @@ -380,7 +383,7 @@ const CONTROL_FLOW_IN_LOOP_CHECK_MIXIN = {

Extensions.registerMixin(
'controls_flow_in_loop_check',
CONTROL_FLOW_IN_LOOP_CHECK_MIXIN
CONTROL_FLOW_IN_LOOP_CHECK_MIXIN,
);

// Register provided blocks.
Expand Down
12 changes: 6 additions & 6 deletions blocks/math.ts
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ const TOOLTIPS_BY_OP = {

Extensions.register(
'math_op_tooltip',
Extensions.buildTooltipForDropdown('OP', TOOLTIPS_BY_OP)
Extensions.buildTooltipForDropdown('OP', TOOLTIPS_BY_OP),
);

/** Type of a block that has IS_DIVISBLEBY_MUTATOR_MIXIN */
Expand Down Expand Up @@ -502,20 +502,20 @@ const IS_DIVISIBLE_MUTATOR_EXTENSION = function (this: DivisiblebyBlock) {
const divisorInput = option === 'DIVISIBLE_BY';
(this.getSourceBlock() as DivisiblebyBlock).updateShape_(divisorInput);
return undefined; // FieldValidators can't be void. Use option as-is.
}
},
);
};

Extensions.registerMutator(
'math_is_divisibleby_mutator',
IS_DIVISIBLEBY_MUTATOR_MIXIN,
IS_DIVISIBLE_MUTATOR_EXTENSION
IS_DIVISIBLE_MUTATOR_EXTENSION,
);

// Update the tooltip of 'math_change' block to reference the variable.
Extensions.register(
'math_change_tooltip',
Extensions.buildTooltipWithFieldText('%{BKY_MATH_CHANGE_TOOLTIP}', 'VAR')
Extensions.buildTooltipWithFieldText('%{BKY_MATH_CHANGE_TOOLTIP}', 'VAR'),
);

/** Type of a block that has LIST_MODES_MUTATOR_MIXIN */
Expand Down Expand Up @@ -578,14 +578,14 @@ const LIST_MODES_MUTATOR_EXTENSION = function (this: ListModesBlock) {
function (this: ListModesBlock, newOp: string) {
this.updateType_(newOp);
return undefined;
}.bind(this)
}.bind(this),
);
};

Extensions.registerMutator(
'math_modes_of_list_mutator',
LIST_MODES_MUTATOR_MIXIN,
LIST_MODES_MUTATOR_EXTENSION
LIST_MODES_MUTATOR_EXTENSION,
);

// Register provided blocks.
Expand Down
Loading
Loading