Skip to content

Commit d28a295

Browse files
Merge remote-tracking branch 'origin/develop' into UEPR-44
2 parents 1fdf78d + eee1a0a commit d28a295

File tree

93 files changed

+15633
-18021
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+15633
-18021
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: "Signature Assistant"
2+
on:
3+
issue_comment:
4+
types: [created]
5+
pull_request_target:
6+
types: [opened,closed,synchronize]
7+
8+
permissions:
9+
actions: write
10+
contents: read
11+
pull-requests: write
12+
statuses: write
13+
14+
jobs:
15+
CLA-Assistant:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: "CLA Assistant"
19+
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
20+
uses: contributor-assistant/github-action@ca4a40a7d1004f18d9960b404b97e5f30a505a08 # v2.6.1
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
# the below token should have repo scope and must be manually added by you in the repository's secrets
24+
PERSONAL_ACCESS_TOKEN: ${{ secrets.GHA_AGREEMENTS_PAT }}
25+
with:
26+
remote-organization-name: 'scratchfoundation'
27+
remote-repository-name: 'scratch-agreements'
28+
path-to-signatures: 'signatures/version1/cla.json'
29+
path-to-document: 'https://github.com/scratchfoundation/scratch-agreements/blob/main/CLA.md'
30+
branch: 'main'
31+
allowlist: semantic-release-bot,*[bot]

LICENSE

Lines changed: 661 additions & 28 deletions
Large diffs are not rendered by default.

package-lock.json

Lines changed: 11845 additions & 17027 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"private": "true",
44
"description": "Scratch editor mono-repository",
55
"author": "Scratch Foundation",
6-
"license": "BSD-3-Clause",
6+
"license": "AGPL-3.0-only",
77
"homepage": "https://github.com/scratchfoundation/scratch-editor#readme",
88
"repository": {
99
"type": "git",

packages/scratch-gui/package.json

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "4.0.15",
44
"description": "Graphical User Interface for creating and running Scratch 3.0 projects",
55
"author": "Massachusetts Institute of Technology",
6-
"license": "BSD-3-Clause",
6+
"license": "AGPL-3.0-only",
77
"homepage": "https://github.com/scratchfoundation/scratch-gui#readme",
88
"repository": {
99
"type": "git",
@@ -22,7 +22,7 @@
2222
}
2323
},
2424
"scripts": {
25-
"build": "npm run clean && webpack",
25+
"build": "npm run clean && BUILD_TYPE=dev webpack && BUILD_TYPE=dist webpack && BUILD_TYPE=dist-standalone webpack",
2626
"clean": "rimraf ./build ./dist",
2727
"deploy": "touch build/.nojekyll && gh-pages -t -d build -m \"[skip ci] Build for $(git log --pretty=format:%H -n1)\"",
2828
"prepare": "node scripts/prepare.mjs",
@@ -93,7 +93,7 @@
9393
"scratch-l10n": "^3.18.3",
9494
"scratch-paint": "^2.2.151",
9595
"scratch-render-fonts": "^1.0.2",
96-
"scratch-storage": "^2.3.1",
96+
"scratch-storage": "^3.0.1",
9797
"startaudiocontext": "^1.2.1",
9898
"style-loader": "4.0.0",
9999
"text-encoding": "^0.7.0",
@@ -104,8 +104,8 @@
104104
"peerDependencies": {
105105
"react": "^16.0.0",
106106
"react-dom": "^16.0.0",
107-
"redux": "^3.7.2",
108-
"react-redux": "^5.0.7"
107+
"react-redux": "^5.0.7",
108+
"redux": "^3.7.2"
109109
},
110110
"devDependencies": {
111111
"@babel/cli": "7.24.8",
@@ -116,9 +116,10 @@
116116
"@babel/plugin-transform-async-to-generator": "7.24.7",
117117
"@babel/preset-env": "7.25.4",
118118
"@babel/preset-react": "7.24.7",
119+
"@types/prop-types": "^15.7.13",
120+
"@types/react-modal": "^3.9.1",
119121
"@typescript-eslint/eslint-plugin": "^8.7.0",
120122
"@typescript-eslint/parser": "^8.7.0",
121-
"@types/react-modal": "^3.9.1",
122123
"babel-core": "7.0.0-bridge.0",
123124
"babel-loader": "9.1.3",
124125
"cheerio": "1.0.0-rc.3",
@@ -147,6 +148,7 @@
147148
"selenium-webdriver": "3.6.0",
148149
"semantic-release": "19.0.5",
149150
"stream-browserify": "3.0.0",
151+
"ts-jest": "^21.2.4",
150152
"ts-loader": "9.5.1",
151153
"url-loader": "4.1.1",
152154
"web-audio-test-api": "0.5.2",
@@ -156,6 +158,12 @@
156158
"yauzl": "2.10.0"
157159
},
158160
"jest": {
161+
"globals": {
162+
"ts-jest": {
163+
"isolatedModules": true,
164+
"tsconfig": "<rootDir>/tsconfig.test.json"
165+
}
166+
},
159167
"setupFiles": [
160168
"raf/polyfill",
161169
"<rootDir>/test/helpers/enzyme-setup.js"
@@ -176,6 +184,11 @@
176184
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)\\??$": "<rootDir>/test/__mocks__/fileMock.js",
177185
"\\.(css|less)$": "<rootDir>/test/__mocks__/styleMock.js",
178186
"editor-msgs(\\.js)?$": "<rootDir>/test/__mocks__/editor-msgs-mock.js"
187+
},
188+
"moduleFileExtensions": ["ts", "js", "tsx", "jsx"],
189+
"transform": {
190+
"^.+\\.tsx?$": "ts-jest",
191+
"^.+\\.jsx?$": "babel-jest"
179192
}
180193
}
181194
}

packages/scratch-gui/scripts/prepare.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import fs from 'fs';
88
import path from 'path';
99

10-
import crossFetch from 'cross-fetch';
1110
import yauzl from 'yauzl';
1211
import {fileURLToPath} from 'url';
1312

@@ -79,7 +78,7 @@ const extractFirstMatchingFile = (filter, relativeDestDir, zipBuffer) => new Pro
7978
const downloadMicrobitHex = async () => {
8079
const url = 'https://downloads.scratch.mit.edu/microbit/scratch-microbit.hex.zip';
8180
console.info(`Downloading ${url}`);
82-
const response = await crossFetch(url);
81+
const response = await fetch(url);
8382
const zipBuffer = Buffer.from(await response.arrayBuffer());
8483
const relativeHexDir = path.join('static', 'microbit');
8584
const hexFileName = await extractFirstMatchingFile(
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
@import "../../css/colors.css";
2+
3+
.modal-overlay {
4+
position: fixed;
5+
top: 0;
6+
left: 0;
7+
right: 0;
8+
bottom: 0;
9+
background-color: 'transparent';
10+
display: flex;
11+
justify-content: center;
12+
align-items: center;
13+
z-index: 510;
14+
}
15+
16+
.modal-container {
17+
background: white;
18+
border-radius: 8px;
19+
width: 1000px;
20+
max-height: 90%;
21+
display: flex;
22+
flex-direction: column;
23+
position: relative;
24+
overflow-x: visible;
25+
box-shadow: 0 4px 4px 0 $ui-black-transparent-10;
26+
}
27+
28+
.modal-header {
29+
display: flex;
30+
border-radius: 8px 8px 0 0;
31+
justify-content: space-between;
32+
align-items: center;
33+
padding: 10px;
34+
background-color: $ui-green;
35+
}
36+
37+
.header-title {
38+
display: flex;
39+
gap: 8px;
40+
align-items: center;
41+
font-size: 1rem;
42+
line-height: 1.25rem;
43+
font-weight: 700;
44+
color: white;
45+
}
46+
.debug-icon {
47+
height: 22px;
48+
width: 22px;
49+
}
50+
51+
.hidden {
52+
display: none;
53+
}
54+
55+
.close-button {
56+
display: flex;
57+
background: none;
58+
border: none;
59+
cursor: pointer;
60+
width: 32px;
61+
height: 32px;
62+
}
63+
64+
.modal-content {
65+
display: flex;
66+
width: 100%;
67+
flex-grow: 1;
68+
overflow-y: scroll;
69+
}
70+
71+
.previousIcon {
72+
position: absolute;
73+
cursor: pointer;
74+
top: 50%;
75+
}
76+
77+
.nextIcon {
78+
position: absolute;
79+
cursor: pointer;
80+
right: -30px;
81+
top: 50%;
82+
}
83+
84+
.topic-list {
85+
width: 30%;
86+
border-right: 1px solid $ui-green;;
87+
}
88+
89+
.topic-item {
90+
display: flex;
91+
gap: 8px;
92+
align-items: center;
93+
padding: 10px;
94+
font-size: 1rem;
95+
line-height: 1.5rem;
96+
color: $ui-green;;
97+
cursor: pointer;
98+
}
99+
100+
.topic-item.active {
101+
background-color: #D1FAEE;
102+
font-weight: bold;
103+
}
104+
105+
.info-container {
106+
flex-direction: column;
107+
width: 70%;
108+
display: flex;
109+
padding: 20px;
110+
color: $text-primary;
111+
}
112+
113+
.text-container {
114+
flex: 1;
115+
margin-left: 70px;
116+
}
117+
118+
.title-text {
119+
font-size: 24px;
120+
line-height: 32px;
121+
font-weight: 700;
122+
}
123+
124+
.description {
125+
font-size: 16px;
126+
line-height: 28px;
127+
}
128+
129+
.imageContainer {
130+
display: flex;
131+
justify-content: center;
132+
align-items: center;
133+
padding: 10px;
134+
margin-top: 10px;
135+
}
136+
137+
.topicImage {
138+
max-width: 100%;
139+
max-height: 100%;
140+
object-fit: contain; /* Ensures image scales proportionally */
141+
}
142+
143+
.navigation-buttons {
144+
margin-top: 20px;
145+
}
146+
147+
button {
148+
margin: 5px;
149+
}

0 commit comments

Comments
 (0)