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

Make scratch-blocks depend on Blockly rather than forking it #3338

Draft
wants to merge 132 commits into
base: develop
Choose a base branch
from
Draft
Changes from all commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
c12f244
chore: Replace package/webpack config files with minimal versions
gonfunko Apr 12, 2024
68d4715
chore: Add a basic entrypoint that reexports core Blockly.
gonfunko Apr 12, 2024
7c346fa
fix: Export colours.
gonfunko Apr 12, 2024
09326a1
fix: Export Scratch messages.
gonfunko Apr 12, 2024
6f36313
chore: Re-add commitlint and eslint
gonfunko Apr 15, 2024
c4b0c66
Merge pull request #1 from gonfunko/bootstrap
gonfunko Apr 15, 2024
3125c37
chore: remove build/test Github action (#18)
gonfunko Apr 15, 2024
8024e9f
fix: readd the operator blocks and dependencies (#19)
gonfunko Apr 17, 2024
79398c2
fix: readd the motion blocks (#20)
gonfunko Apr 17, 2024
4de530f
fix: readd the event blocks (#21)
gonfunko Apr 17, 2024
f69d4ac
fix: readd the control blocks (#22)
gonfunko Apr 17, 2024
34f07c0
fix: readd the looks blocks (#23)
gonfunko Apr 17, 2024
6837513
fix: readd the sound blocks (#24)
gonfunko Apr 17, 2024
685ecfc
fix: re-export scratch-blocks utility functions (#26)
gonfunko Apr 18, 2024
9f5f135
fix: readd the sensing blocks (#27)
gonfunko Apr 18, 2024
fafed65
fix: readd the data blocks (#29)
gonfunko Apr 19, 2024
920febf
fix: make block images work in all contexts (#30)
gonfunko Apr 19, 2024
ea68b1c
fix: load the continuous toolbox (#31)
gonfunko Apr 19, 2024
1645129
fix: load CSS and fix up UI appearance (#33)
gonfunko Apr 22, 2024
c548298
fix: hide disable and inline inputs contextual menu items (#35)
gonfunko Apr 22, 2024
6bbbdf7
fix: use Scratch-style text blocks (#37)
gonfunko Apr 22, 2024
7f70f09
fix: don't hide the drag surface (#38)
gonfunko Apr 23, 2024
13647eb
fix: add support for Scratch-style procedures (#39)
gonfunko Apr 24, 2024
4e794f6
fix: remove underscore from a few createProcedureDefCallback calls (#40)
gonfunko Apr 24, 2024
300a1ce
fix: miscellaneous UI fixits (#41)
gonfunko Apr 24, 2024
4f97982
fix: modernize and reenable the colour slider field (#42)
gonfunko Apr 25, 2024
e603c67
fix: reenable support for checkboxes in the flyout (#43)
gonfunko Apr 26, 2024
49663ed
fix: more closely align flyout layout with Scratch (#45)
gonfunko Apr 26, 2024
b53eadd
fix: display icons in the toolbox for extension categories (#47)
gonfunko Apr 26, 2024
48e931f
fix: reenable the vertical separator field (#46)
gonfunko Apr 26, 2024
de62d77
fix: reenable the note block and picker field (#48)
gonfunko Apr 29, 2024
aa3341b
fix: reenable the matrix field (#49)
gonfunko Apr 30, 2024
003afd0
fix: reenable the mobile numpad field (#54)
gonfunko May 3, 2024
70c8cfd
fix: reenable reporting block values (#55)
gonfunko May 4, 2024
f3e059c
fix: resolve error when adding the stop block to the workspace (#56)
gonfunko May 6, 2024
0d67567
chore: update to the latest continuous toolbox (#58)
gonfunko May 6, 2024
33e9e91
fix: show the glow only when blocks are running (#57)
gonfunko May 6, 2024
aeec5ec
chore: upgrade dependency to Blockly v11 beta (#75)
gonfunko May 7, 2024
cb5b068
fix: improve reliability of block value reporting (#77)
gonfunko May 16, 2024
1f1c859
fix: use non-deprecated input type constants (#78)
gonfunko May 17, 2024
fd1bc58
fix: match Scratch behaviors around dragging and connection stickines…
gonfunko May 17, 2024
94d2a2c
fix: reenable shadows for blocks being dragged (#79)
gonfunko May 21, 2024
9e01bc5
chore: upgrade to Blockly v11 (#81)
gonfunko May 22, 2024
98ccb62
fix: enable and style workspace comments (#82)
gonfunko Jun 12, 2024
8902091
fix: add support for Scratch-style block comments (#83)
gonfunko Jul 11, 2024
c12de22
refactor: modernize FieldVariableGetter (#85)
gonfunko Jul 25, 2024
2598ede
feat: add custom Scratch variable model and creation event classes (#86)
gonfunko Jul 26, 2024
5c1acfe
feat: clean up and export Scratch's variables.js (#88)
gonfunko Jul 29, 2024
dcfbf39
feat: readd support for the custom Data toolbox category (#87)
gonfunko Jul 30, 2024
9ea96e2
fix: clean up data block definitions (#90)
gonfunko Aug 2, 2024
7c891e3
feat: reenable Scratch's FieldVariable subclass (#91)
gonfunko Aug 2, 2024
28ad076
chore: add exports/imports needed for variable support (#92)
gonfunko Aug 2, 2024
7478546
fix: fix exception when editing custom blocks (#105)
gonfunko Aug 5, 2024
4cfe66f
fix: allow specifying the function to be used for prompting about var…
gonfunko Aug 5, 2024
936967b
refactor: enforce procedure deletion validation (#107)
gonfunko Aug 6, 2024
2a543f5
fix: render the procedure definition block like Scratch (#115)
gonfunko Aug 8, 2024
4b74d5c
fix: resolve various UI issues (#117)
gonfunko Aug 9, 2024
453ffa9
fix: prevent dragging blocks into the slot occupied by the procedure …
gonfunko Aug 9, 2024
0ca0620
fix: enable dragging arguments out of procedure blocks (#119)
gonfunko Aug 12, 2024
fa9367d
fix: prevent deleting procedure definition blocks with references by …
gonfunko Aug 12, 2024
46854cd
fix: make variable names case-sensitive (#122)
gonfunko Aug 12, 2024
84a9e5b
fix: improve positioning of newly created procedure blocks (#121)
gonfunko Aug 13, 2024
22a6b73
fix: don't show global/local options when renaming a variable (#123)
gonfunko Aug 13, 2024
b1e67f6
fix: fixed bug where broadcast messages would appear in the variable …
gonfunko Aug 13, 2024
a09ae24
fix: add zoom controls config (#126)
BeksOmega Aug 20, 2024
8e1dc14
Revert "fix: add zoom controls config (#126)" (#128)
BeksOmega Aug 21, 2024
a65d24a
fix: delete context menu to display the correct number of blocks (#127)
BeksOmega Aug 21, 2024
ff4b115
fix: remove canvas transition (#129)
BeksOmega Aug 21, 2024
eb839fc
fix: show the name of the list in the list getter block context menu …
gonfunko Aug 21, 2024
cda58cc
fix: don't warn about procedure references when moving the definition…
gonfunko Aug 21, 2024
3d8b998
fix: reenable support for dragging blocks between sprites (#130)
gonfunko Aug 21, 2024
3faed99
chore: fix various build warnings (#133)
gonfunko Aug 21, 2024
7a85937
chore: clean up and reorganize the repo (#134)
gonfunko Aug 22, 2024
375e56d
fix: don't show scope options when renaming a variable from the varia…
gonfunko Aug 23, 2024
ef7911c
fix: use Scratch's FieldAngle (#138)
gonfunko Aug 23, 2024
3811d93
fix: select new variable blocks' monitor checkboxes after creation (#…
gonfunko Aug 28, 2024
d3e1a1b
fix: fix toolbox category selection (#141)
gonfunko Aug 28, 2024
6fbc2e5
fix: fix the styling of contextual menus (#147)
gonfunko Aug 29, 2024
40eee91
fix: fix dropdown menu metrics (#148)
gonfunko Aug 29, 2024
8e165ce
fix: fix a crash when adding a broadcast message (#150)
gonfunko Aug 30, 2024
0e80277
fix: fix styling of dropdown menus (#152)
gonfunko Sep 3, 2024
7b39ac1
fix: fix wrapping of long category labels (#166)
gonfunko Sep 3, 2024
c3f2952
refactor: use an extension to denote monitor blocks (#167)
gonfunko Sep 3, 2024
a47aba6
fix: fix the flyout width at 250 pixels (#168)
gonfunko Sep 5, 2024
c9b5c4e
refactor: use block styles instead of directly specifying block color…
gonfunko Sep 5, 2024
2e98ff1
fix: fix bug that prevented showing the contextual menu on blocks (#176)
gonfunko Sep 9, 2024
dbb79ea
refactor: add and use explicit field registration methods (#172)
gonfunko Sep 10, 2024
59896d2
fix: fix the colors of the angle picker dropdown (#179)
gonfunko Sep 12, 2024
303611a
fix: show connection highlights for boolean inputs (#181)
gonfunko Sep 16, 2024
e3dbad1
fix: correctly align extension block icons (#182)
gonfunko Sep 17, 2024
6c9d3a6
fix: allow focusing fields in the flyout on mobile (#184)
gonfunko Sep 18, 2024
6d14530
fix: fix positioning of categories when scrolling via the toolbox (#186)
gonfunko Sep 18, 2024
37e0f10
fix: fix bug that prevented modal dialogs from appearing on mobile (#…
gonfunko Oct 2, 2024
73d978e
fix: fix color of block reporter dropdown text (#205)
gonfunko Oct 2, 2024
0701679
feat: add a block inflater that supports recycling (#207)
gonfunko Oct 3, 2024
39b2162
feat: add bubbles/icons for block flyout checkboxes (#208)
gonfunko Oct 3, 2024
7ce9991
fix: update the flyout for compatibility with the new flyout API (#209)
gonfunko Oct 7, 2024
c3ee958
fix: fix bug that caused the number/string input in the custom block …
gonfunko Oct 14, 2024
3ae2235
fix: make FieldNumber a subclass of FieldTextInput (#214)
gonfunko Oct 14, 2024
0d78559
chore: delete the old fork of Blockly (#218)
gonfunko Oct 14, 2024
665d196
fix: Add support for flyout labels with status indicators (#212)
gonfunko Oct 14, 2024
cc4d9f9
fix: fix alignment of "define" text baseline on custom blocks (#220)
gonfunko Oct 14, 2024
1279c0a
fix: improve sizing and rendering of comments (#219)
gonfunko Oct 15, 2024
88c700e
fix: fix the color of procedure argument blocks (#216)
gonfunko Oct 15, 2024
6a1c8a9
fix: fix bug that could cause duplicated procedure argument blocks to…
gonfunko Oct 15, 2024
75e6e6c
refactor: Add support for Typescript (#221)
gonfunko Oct 15, 2024
6cb02d0
build: enable alpha and beta releases
cwillisf Oct 18, 2024
87f8627
build: switch package info back to scratchfoundation
cwillisf Oct 18, 2024
04c3fc5
docs: track un-fork finishing tasks
cwillisf Oct 18, 2024
b78a3e5
chore(deps): upgrade Blockly plugins for Blockly v11 compatibility
cwillisf Oct 18, 2024
bc59c8d
chore: add husky hook for commitlint
cwillisf Oct 18, 2024
96b5e51
chore: add commitizen config
cwillisf Oct 18, 2024
768d025
chore: re-add semantic-release and Scratch config for it
cwillisf Oct 18, 2024
677ff6f
fix(deps): after installing deps, replace Blockly v11 with v12 RC
cwillisf Oct 18, 2024
384a6fa
ci: bring back deploy workflow
cwillisf Oct 18, 2024
8a861f0
fix(deps): clone Blockly RC over HTTP instead of SSH
cwillisf Oct 18, 2024
899a981
fix!: bump to v2.0 to reflect Blockly un-forking
cwillisf Oct 18, 2024
21b15d1
fix: don't include Blockly RC source in npm package
cwillisf Oct 18, 2024
5beaf50
ci: make temporary "spork" release channel
cwillisf Oct 21, 2024
638ee0f
chore(release): 2.0.0-spork.1 [skip ci]
semantic-release-bot Oct 21, 2024
9a03eea
refactor: migrate scratch-blocks to Typescript (#224)
gonfunko Nov 19, 2024
92a8a01
fix(deps): use Blockly 12 beta instead of RC
cwillisf Dec 10, 2024
3cb79f6
chore(release): 2.0.0-spork.2 [skip ci]
semantic-release-bot Dec 10, 2024
2d86986
Merge remote-tracking branch 'gonfunko/modern-blockly' into spork
cwillisf Dec 10, 2024
adaf531
fix: rename mouseDownWrapper fields for Blockly v12 compatibility
cwillisf Dec 10, 2024
51a5280
build: tell TS to include only src,tests,types
cwillisf Dec 10, 2024
601be05
chore(release): 2.0.0-spork.3 [skip ci]
semantic-release-bot Dec 10, 2024
81f19c1
refactor: update codebase for new version of Blockly and continuous t…
gonfunko Feb 4, 2025
b213fc4
Merge branch 'modern-blockly' into spork
cwillisf Feb 11, 2025
127ac8b
fix: new beta release for better Blockly v12 beta compatibility
cwillisf Feb 11, 2025
91c8b63
chore(release): 2.0.0-spork.4 [skip ci]
semantic-release-bot Feb 11, 2025
0f6a3f3
build: .gitignore /build
cwillisf Feb 25, 2025
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
5 changes: 4 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -57,5 +57,8 @@
"Blockly": true, # Blockly global
"goog": true, # goog closure libraries/includes
},
"extends": "eslint:recommended"
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module",
}
}
35 changes: 13 additions & 22 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@ jobs:
setup:
runs-on: ubuntu-latest
env:
JVM_OPTS: -Xmx3200m
PROJECT_PATH: ./scratch-blocks
steps:
- run: |
@@ -16,32 +15,24 @@ jobs:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Check Python version
run: python --version
- name: Setup Java
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3
with:
distribution: 'temurin'
java-version: 17
- name: Setup Node
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
with:
node-version-file: '.nvmrc'
# TODO: tests
- name: Install Node Dependencies
run: npm ci
- name: Lint
run: npm run test:lint
- name: Run Tests
run: npm run test:messages
- name: Run Unit Tests
run: DISPLAY=:99 npm run test:unit
- name: Remove Closure App
run: rm -rf gh-pages/closure-library/scripts/ci/CloseAdobeDialog.exe
- name: Deploy playground to GitHub Pages
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./gh-pages
full_commit_message: "Build for ${{ github.sha }} ${{ github.event.head_commit.message }}"
enable_jekyll: true
# The --legacy-peer-deps flag is a TEMPORARY fix during the Blockly 12 beta.
# It should be removed once the @blockly/* packages support Blockly 12.
run: npm ci --legacy-peer-deps
- name: Build
run: npm run build
# - name: Deploy playground to GitHub Pages
# uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./gh-pages
# full_commit_message: "Build for ${{ github.sha }} ${{ github.event.head_commit.message }}"
# enable_jekyll: true
- name: Run semantic-release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@ python_compressed.js
.vscode

/accessible/*
/build
/dist
/msg/js/*
!/msg/js/en.js
3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no-install commitlint --edit "$1"
139 changes: 139 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# To-Do list for scratch-blocks un-fork

Before this un-forked version of `scratch-blocks` is fully ready for release, we need to:

- [ ] Hook up i18n / l10n
- [x] Fix or remove Husky
- [x] Set up CI & CD
- [ ] Wait for Blockly v12 release, then update Blockly dependencies accordingly

Things we need to do before we consider this project "done" but could wait until after the initial release:

- [ ] Decide what we want to do about tests, then do it
- [ ] Pick linting rules, apply them, and enforce them
- [ ] Make sure the gh-pages setup is doing what we want, or remove it
- [ ] ???
- [ ] Remove this TODO file once it's empty :)
159 changes: 0 additions & 159 deletions blocks_common/math.js

This file was deleted.

Loading