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

Remove old scratch code #35438

Merged
merged 6 commits into from Jun 24, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 1 addition & 25 deletions apps/Gruntfile.js
Expand Up @@ -83,7 +83,6 @@ describe('entry tests', () => {
'netsim',
'studio',
'turtle',
'scratch',
'weblab'
];

Expand Down Expand Up @@ -180,12 +179,7 @@ describe('entry tests', () => {
src: ['**'],
dest: 'build/package/media/skins/fish'
},
{
expand: true,
cwd: 'node_modules/scratch-blocks/media',
src: ['**'],
dest: 'build/package/media/scratch-blocks'
},

// We have to do some weird stuff to get our fallback video player working.
// video.js expects some of its own files to be served by the application, so
// we include them in our build and access them via static (non-fingerprinted)
Expand Down Expand Up @@ -426,12 +420,6 @@ describe('entry tests', () => {
included: false,
nocache: true
},
{
pattern: 'test/scratch/**/*',
watched: false,
included: false,
nocache: true
},
{
pattern: 'test/storybook/**/*',
watched: false,
Expand Down Expand Up @@ -479,15 +467,6 @@ describe('entry tests', () => {
}),
files: [{src: ['test/integration-tests.js'], watched: false}]
},
scratch: {
coverageIstanbulReporter: {
dir: 'coverage/scratch'
},
junitReporter: Object.assign({}, junitReporterBaseConfig, {
outputFile: 'scratch.xml'
}),
files: [{src: ['test/scratch-tests.js'], watched: false}]
},
storybook: {
coverageIstanbulReporter: {
dir: 'coverage/storybook'
Expand Down Expand Up @@ -1266,8 +1245,5 @@ describe('entry tests', () => {

grunt.registerTask('integrationTest', ['preconcat', 'karma:integration']);

// Run Scratch tests in a separate target so `window.Blockly` doesn't collide.
grunt.registerTask('scratchTest', ['preconcat', 'karma:scratch']);

grunt.registerTask('default', ['rebuild', 'test']);
};
3 changes: 1 addition & 2 deletions apps/karma.conf.js
Expand Up @@ -49,8 +49,7 @@ module.exports = function(config) {
'test/integration-tests.js': ['webpack', 'sourcemap'],
'test/unit-tests.js': ['webpack'],
'test/code-studio-tests.js': ['webpack', 'sourcemap'],
'test/storybook-tests.js': ['webpack', 'sourcemap'],
'test/scratch-tests.js': ['webpack']
'test/storybook-tests.js': ['webpack', 'sourcemap']
},

webpack: {...webpackConfig, optimization: undefined, mode: 'development'},
Expand Down
5 changes: 0 additions & 5 deletions apps/package.json
Expand Up @@ -196,11 +196,6 @@
"sanitize-html": "^1.11.3",
"sass-loader": "6.0.7",
"save-csv": "^4.0.6",
"scratch-audio": "v0.1.0-prerelease.1501163867",
"scratch-blocks": " v0.1.0-prerelease.1501101334",
"scratch-render": "v0.1.0-prerelease.1500038694",
"scratch-storage": "^0.2.0",
"scratch-vm": "v0.1.0-prerelease.1501105826-prerelease.1501105849",
"script-loader": "^0.7.0",
"seedrandom": "2.4.2",
"sinon": "^5.0.0",
Expand Down
1 change: 0 additions & 1 deletion apps/script/checkEntryPoints.js
Expand Up @@ -57,7 +57,6 @@ const SILENCED = [
'netsim',
'studio',
'turtle',
'scratch',
'weblab',
'spritelab',

Expand Down
11 changes: 1 addition & 10 deletions apps/src/StudioApp.js
Expand Up @@ -205,8 +205,7 @@ StudioApp.prototype.configure = function(options) {
// NOTE: editCode (which currently implies droplet) and usingBlockly_ are
// currently mutually exclusive.
this.editCode = options.level && options.level.editCode;
this.scratch = options.level && options.level.scratch;
this.usingBlockly_ = !this.editCode && !this.scratch;
this.usingBlockly_ = !this.editCode;

if (options.isEditorless) {
this.editCode = false;
Expand Down Expand Up @@ -731,12 +730,6 @@ StudioApp.prototype.handleClearPuzzle = function(config) {
this.editor.setValue(resetValue);

annotationList.clearRuntimeAnnotations();
} else if (this.scratch) {
const workspace = Blockly.getMainWorkspace();
workspace.clear();

const dom = Blockly.Xml.textToDom(config.level.startBlocks);
Blockly.Xml.domToWorkspace(dom, workspace);
}
if (config.afterClearPuzzle) {
promise = config.afterClearPuzzle(config);
Expand Down Expand Up @@ -1497,8 +1490,6 @@ StudioApp.prototype.resizeToolboxHeader = function() {
toolboxWidth = categories.getBoundingClientRect().width;
} else if (this.isUsingBlockly()) {
toolboxWidth = Blockly.mainBlockSpaceEditor.getToolboxWidth();
} else if (this.scratch) {
toolboxWidth = Blockly.getMainWorkspace().getMetrics().toolboxWidth;
}
document.getElementById('toolbox-header').style.width = toolboxWidth + 'px';
};
Expand Down
4 changes: 1 addition & 3 deletions apps/src/code-studio/initApp/loadApp.js
Expand Up @@ -491,9 +491,7 @@ const sourceHandler = {
return new Promise((resolve, reject) => {
let source;
let appOptions = getAppOptions();
if (appOptions.level && appOptions.level.scratch) {
resolve(appOptions.getCode());
} else if (window.Blockly) {
if (window.Blockly) {
// If we're readOnly, source hasn't changed at all
source = Blockly.mainBlockSpace.isReadOnly()
? currentLevelSource
Expand Down
1 change: 0 additions & 1 deletion apps/src/code-studio/initApp/project.js
Expand Up @@ -829,7 +829,6 @@ var projects = (module.exports = {
case 'dance':
case 'eval':
case 'flappy':
case 'scratch':
case 'weblab':
case 'gamelab':
case 'spritelab':
Expand Down
34 changes: 0 additions & 34 deletions apps/src/scratch/ScratchView.jsx

This file was deleted.

34 changes: 0 additions & 34 deletions apps/src/scratch/ScratchVisualizationColumn.jsx

This file was deleted.