Skip to content

Commit 5c01e57

Browse files
author
Trevor Berg
committed
Merge pull request code-dot-org#4306 from code-dot-org/staging
Levelbuilder -> Staging
2 parents 3e96865 + c459711 commit 5c01e57

File tree

55 files changed

+267
-169
lines changed

Some content is hidden

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

55 files changed

+267
-169
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ gem 'rails', '~> 4.2.4'
77
# (see: http://guides.rubyonrails.org/4_2_release_notes.html#respond-with-class-level-respond-to)
88
gem 'responders', '~> 2.0'
99

10-
gem 'sinatra', '1.4.4', require: 'sinatra/base'
10+
gem 'sinatra', require: 'sinatra/base'
1111
gem 'rack-contrib', '~> 1.1'
1212

1313
gem 'mysql2', '~> 0.3.13'

Gemfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -433,10 +433,10 @@ GEM
433433
json (~> 1.8)
434434
simplecov-html (~> 0.10.0)
435435
simplecov-html (0.10.0)
436-
sinatra (1.4.4)
436+
sinatra (1.4.6)
437437
rack (~> 1.4)
438438
rack-protection (~> 1.4)
439-
tilt (~> 1.3, >= 1.3.4)
439+
tilt (>= 1.3, < 3)
440440
spring (1.3.6)
441441
spring-commands-testunit (1.0.1)
442442
spring (>= 0.9.1)
@@ -590,7 +590,7 @@ DEPENDENCIES
590590
sequel (~> 4.10.0)
591591
shotgun
592592
simplecov
593-
sinatra (= 1.4.4)
593+
sinatra
594594
spring
595595
spring-commands-testunit
596596
sqlite3

apps/src/StudioApp.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,8 @@ StudioApp.prototype.init = function(config) {
232232
level_source_id: config.level_source_id,
233233
phone_share_url: config.send_to_phone_url,
234234
sendToPhone: config.sendToPhone,
235-
twitter: config.twitter
235+
twitter: config.twitter,
236+
app: config.app
236237
});
237238
}
238239

@@ -1427,14 +1428,23 @@ StudioApp.prototype.handleHideSource_ = function (options) {
14271428
var container = document.getElementById(options.containerId);
14281429
this.hideSource = true;
14291430
var workspaceDiv = document.getElementById('codeWorkspace');
1430-
if(!options.embed || options.level.skipInstructionsPopup) {
1431+
if (!options.embed || options.level.skipInstructionsPopup) {
14311432
container.className = 'hide-source';
14321433
}
14331434
workspaceDiv.style.display = 'none';
14341435
document.getElementById('visualizationResizeBar').style.display = 'none';
14351436

1437+
// Chrome-less share page.
1438+
if (this.share && options.app === 'applab') {
1439+
if (dom.isMobile()) {
1440+
document.getElementById('visualizationColumn').className = 'chromelessShare';
1441+
} else {
1442+
document.getElementsByClassName('header-wrapper')[0].style.display = 'none';
1443+
document.getElementById('visualizationColumn').className = 'wireframeShare';
1444+
}
1445+
document.body.style.backgroundColor = '#202B34';
14361446
// For share page on mobile, do not show this part.
1437-
if ((!options.embed) && (!this.share || !dom.isMobile())) {
1447+
} else if (!options.embed && !(this.share && dom.isMobile())) {
14381448
var runButton = document.getElementById('runButton');
14391449
var buttonRow = runButton.parentElement;
14401450
var openWorkspace = document.createElement('button');
2.21 KB
Loading

apps/style/applab/style.scss

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,30 @@ div#visualizationResizeBar {
209209

210210
// ** END OF RULES THAT ARE MODIFIED AT RUNTIME IN adjustAppSizeStyles() **
211211

212+
#visualizationColumn.wireframeShare {
213+
background: url("#{$root}phone_wireframe.png") center center no-repeat;
214+
max-width: none !important;
215+
width: 363px;
216+
height: 714px;
217+
margin: 20px auto;
218+
219+
#designToggleRow, #gameButtons {
220+
display: none;
221+
}
222+
223+
#visualization {
224+
top: 116px;
225+
left: 21px;
226+
border: 0;
227+
}
228+
}
229+
230+
#visualizationColumn.chromelessShare {
231+
#designToggleRow, #gameButtons {
232+
display: none;
233+
}
234+
}
235+
212236
#divApplab {
213237
overflow: hidden;
214238
outline: none;

aws/build

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ def main()
4343
status = 1
4444
Dir.chdir(aws_dir) do
4545
RakeUtils.bundle_install
46-
status, output = RakeUtils.system__(RakeUtils.command_('rake', '--rakefile', 'build.rake', *ARGV))
47-
puts output if status != 0
46+
status = RakeUtils.system_ 'rake', '--rakefile', 'build.rake', *ARGV
4847
end
4948

5049
FileUtils.rm 'build-started' if File.file?('build-started')

aws/build.rake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def build_task(name, dependencies=[], params={})
3232
rescue => e
3333
HipChat.log "<b>#{name}</b> FAILED!", color: 'red', notify: 1
3434
HipChat.log "/quote #{e}\n#{CDO.backtrace e}", message_format: 'text'
35-
raise $!, $!.message, []
35+
raise
3636
end
3737
end
3838

blockly-core/build-output/blockly_compressed.js

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

blockly-core/build-output/blockly_uncompressed.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6562,7 +6562,10 @@ Blockly.BlockSpace.prototype.drawTrashZone = function(x, startDragX) {
65626562
background = flyout.svgBackground_;
65636563
blockGroup = flyout.blockSpace_.svgGroup_;
65646564
trashcan = flyout.trashcan;
6565-
trashcanElement = trashcan.svgGroup_
6565+
trashcanElement = trashcan.svgGroup_;
6566+
if(this.blockSpaceEditor.hideTrashRect_) {
6567+
blockGroupForeground = this.blockSpaceEditor.flyout_.svgGroup_
6568+
}
65666569
}
65676570
var toolbarWidth = background.getBoundingClientRect().width;
65686571
var dragBuffer = 10;

blockly-core/core/ui/block_space/block_space.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,10 @@ Blockly.BlockSpace.prototype.drawTrashZone = function(x, startDragX) {
741741
blockGroup = flyout.blockSpace_.svgGroup_;
742742
trashcan = flyout.trashcan;
743743
trashcanElement = trashcan.svgGroup_;
744+
745+
if (this.blockSpaceEditor.hideTrashRect_) {
746+
blockGroupForeground = this.blockSpaceEditor.flyout_.svgGroup_;
747+
}
744748
}
745749

746750
var toolbarWidth = background.getBoundingClientRect().width;

0 commit comments

Comments
 (0)