Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
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/[email protected].0
uses: google-github-actions/[email protected].2
# For parameters see:
# https://github.com/google-github-actions/deploy-appengine#inputs
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
# TODO (#2114): re-enable osx build.
# os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest]
node-version: [18.x, 20.x]
node-version: [18.x, 20.x, 22.x]
# See supported Node.js release schedule at
# https://nodejs.org/en/about/releases/

Expand Down
8 changes: 7 additions & 1 deletion core/comments/comment_view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ export class CommentView implements IRenderedElement {
/** Whether this comment view has been disposed or not. */
private disposed = false;

/** Size of this comment when the resize drag was initiated. */
private preResizeSize?: Size;

constructor(private readonly workspace: WorkspaceSvg) {
this.svgRoot = dom.createSvgElement(Svg.G, {
'class': 'blocklyComment blocklyEditable',
Expand Down Expand Up @@ -334,7 +337,7 @@ export class CommentView implements IRenderedElement {
* elements to reflect the new size, and triggers size change listeners.
*/
setSize(size: Size) {
const oldSize = this.size;
const oldSize = this.preResizeSize || this.size;
this.setSizeWithoutFiringEvents(size);
this.onSizeChange(oldSize, this.size);
}
Expand Down Expand Up @@ -519,6 +522,8 @@ export class CommentView implements IRenderedElement {
return;
}

this.preResizeSize = this.getSize();

// TODO(#7926): Move this into a utils file.
this.workspace.startDrag(
e,
Expand Down Expand Up @@ -559,6 +564,7 @@ export class CommentView implements IRenderedElement {
}
// When ending a resize drag, notify size change listeners to fire an event.
this.setSize(this.size);
this.preResizeSize = undefined;
}

/** Resizes the comment in response to a drag on the resize handle. */
Expand Down
1 change: 0 additions & 1 deletion core/events/events_abstract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ export abstract class Abstract {
*
* @returns The workspace the event belongs to.
* @throws {Error} if workspace is null.
* @internal
*/
getEventWorkspace_(): Workspace {
let workspace;
Expand Down
2 changes: 1 addition & 1 deletion demos/blockfactory/app_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ AppController.prototype.assignBlockFactoryClickHandlers = function() {

document.getElementById('helpButton').addEventListener('click',
function() {
open('https://developers.google.com/blockly/custom-blocks/block-factory',
open('https://developers.google.com/blockly/guides/create-custom-blocks/legacy-blockly-developer-tools',
'BlockFactoryHelp');
});

Expand Down
7 changes: 7 additions & 0 deletions demos/blockfactory/factory.css
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ button, .buttonStyle {
float: right;
}

#legacyBanner {
border: #ccc 1px solid;
background-color: #FFCDD2;
margin: 4px;
padding: 4px;
}

#blockFactoryContent {
height: 85%;
width: 100%;
Expand Down
3 changes: 3 additions & 0 deletions demos/blockfactory/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ <h1><a href="https://developers.google.com/blockly/">Blockly</a> &gt;
<button class="privacyButton" title="Open Google privacy policy"><a class="privacyLink" href="https://policies.google.com/privacy">Privacy</a>
</button>
</h1>
<div id="legacyBanner">
This version of Developer Tools is only compatible with Blockly version 10 and earlier. Try the <a target="_blank" href="https://google.github.io/blockly-samples/examples/developer-tools/index.html">new Block Factory</a> and <a target="_blank" href="https://developers.google.com/blockly/guides/create-custom-blocks/blockly-developer-tools#import_from_legacy_block_factory">learn how to migrate your blocks</a>.
</div>
<div id="tabContainer">
<div id="blockFactory_tab" class="tab tabon">Block Factory</div>
<div id="blocklibraryExporter_tab" class="tab taboff">Block Exporter</div>
Expand Down
Loading