[go: nahoru, domu]

Skip to content

Commit

Permalink
release: v11.0.0
Browse files Browse the repository at this point in the history
Merge pull request #8164 from google/rc/v11.0.0
  • Loading branch information
maribethb committed May 20, 2024
2 parents 0e22a79 + 2f15621 commit 9519333
Show file tree
Hide file tree
Showing 300 changed files with 8,181 additions and 13,291 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/appengine_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
path: _deploy/

- name: Deploy to App Engine
uses: google-github-actions/deploy-appengine@v2.0.0
uses: google-github-actions/deploy-appengine@v2.1.0
# For parameters see:
# https://github.com/google-github-actions/deploy-appengine#inputs
with:
Expand Down
4 changes: 2 additions & 2 deletions appengine/add_timestamps.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def run_query():
while more:
results, cursor, more = query.fetch_page(PAGE_SIZE, start_cursor=cursor)
handle_results(results)
page_count = page_count + 1
result_count = result_count + len(results)
page_count += 1
result_count += len(results)
print(f'{datetime.datetime.now().strftime("%I:%M:%S %p")} : page {page_count} : {result_count}')

run_query()
5 changes: 2 additions & 3 deletions blocks/blocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -18,8 +17,8 @@ import * as variablesDynamic from './variables_dynamic.js';
import type {BlockDefinition} from '../core/blocks.js';

export {
colour,
lists,
logic,
loops,
math,
procedures,
Expand All @@ -34,12 +33,12 @@ export {
*/
export const blocks: {[key: string]: BlockDefinition} = Object.assign(
{},
colour.blocks,
lists.blocks,
logic.blocks,
loops.blocks,
math.blocks,
procedures.blocks,
texts.blocks,
variables.blocks,
variablesDynamic.blocks,
);
112 changes: 0 additions & 112 deletions blocks/colour.ts

This file was deleted.

2 changes: 1 addition & 1 deletion blocks/lists.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ const LISTS_CREATE_WITH = {
// Disconnect any children that don't belong.
for (let i = 0; i < this.itemCount_; i++) {
const connection = this.getInput('ADD' + i)!.connection!.targetConnection;
if (connection && connections.indexOf(connection) === -1) {
if (connection && !connections.includes(connection)) {
connection.disconnect();
}
}
Expand Down
29 changes: 23 additions & 6 deletions blocks/loops.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
createBlockDefinitionsFromJsonArray,
defineBlocks,
} from '../core/common.js';
import * as eventUtils from '../core/events/utils.js';
import '../core/field_dropdown.js';
import '../core/field_label.js';
import '../core/field_number.js';
Expand Down Expand Up @@ -334,6 +335,11 @@ export type ControlFlowInLoopBlock = Block & ControlFlowInLoopMixin;
interface ControlFlowInLoopMixin extends ControlFlowInLoopMixinType {}
type ControlFlowInLoopMixinType = typeof CONTROL_FLOW_IN_LOOP_CHECK_MIXIN;

/**
* The language-neutral ID for when the reason why a block is disabled is
* because the block is only valid inside of a loop.
*/
const CONTROL_FLOW_NOT_IN_LOOP_DISABLED_REASON = 'CONTROL_FLOW_NOT_IN_LOOP';
/**
* This mixin adds a check to make sure the 'controls_flow_statements' block
* is contained in a loop. Otherwise a warning is added to the block.
Expand Down Expand Up @@ -365,19 +371,30 @@ const CONTROL_FLOW_IN_LOOP_CHECK_MIXIN = {
// Don't change state if:
// * It's at the start of a drag.
// * It's not a move event.
if (!ws.isDragging || ws.isDragging() || e.type !== Events.BLOCK_MOVE) {
if (
!ws.isDragging ||
ws.isDragging() ||
(e.type !== Events.BLOCK_MOVE && e.type !== Events.BLOCK_CREATE)
) {
return;
}
const enabled = !!this.getSurroundLoop();
this.setWarningText(
enabled ? null : Msg['CONTROLS_FLOW_STATEMENTS_WARNING'],
);

if (!this.isInFlyout) {
const group = Events.getGroup();
// Makes it so the move and the disable event get undone together.
Events.setGroup(e.group);
this.setEnabled(enabled);
Events.setGroup(group);
try {
// There is no need to record the enable/disable change on the undo/redo
// list since the change will be automatically recreated when replayed.
eventUtils.setRecordUndo(false);
this.setDisabledReason(
!enabled,
CONTROL_FLOW_NOT_IN_LOOP_DISABLED_REASON,
);
} finally {
eventUtils.setRecordUndo(true);
}
}
},
};
Expand Down
Loading

0 comments on commit 9519333

Please sign in to comment.