Commit Graph
157 Commits
Author SHA1 Message Date
Paul Kaplan 1f2f41b597 Merge pull request #4493 from paulkaplan/fix-see-inside-toolbox
Fix "See Inside" not showing variables
2019-02-06 10:37:22 -05:00
Paul Kaplan ebbf292ffd Fix toolbox updating after see-inside.
We can't rely on refreshWorkspace always causing a toolbox update, so make sure to update the toolbox manually if it is needed.
2019-02-05 16:35:30 -05:00
Paul Kaplan fe0c5d53d4 Merge pull request #4467 from paulkaplan/fix-backpack-code-updating
Call updateToolbox after adding new blocks from the backpack.
2019-02-05 12:07:18 -05:00
Paul Kaplan f270b36f64 Initialize locale on ScratchBlocks before initial workspace injection
This fixes a problem where having a non-default locale set during the initial load would display the blocks in the default toolbox in the wrong language, because the toolbox recycling toggle in setLocale does not work on initial load because there is no editing target to refresh.
2019-02-04 09:46:58 -05:00
Paul Kaplan 327eb91fc0 Call updateToolbox after adding new blocks from the backpack.
This fixes the issue where you could not see any new variables or custom block callers, as well as fixing the issue where the toolbox did not update from then on.
2019-01-31 16:42:56 -05:00
Paul Kaplan 9264f30198 Make the toolbox xml reflect the costume, sound and backdrop name
This invalidates the toolbox XML when switching back to the code tab after e.g. renaming a costume, making the code tab
2019-01-30 09:39:18 -05:00
Paul Kaplan 0d32ac5b40 Only update the toolbox when the blocks tab is visible.
Need to store the rendered xml because the props can change while the blocks tab is hidden, but we re-render based on what was rendered, not the previous props (which may not have been rendered).

This is similar to the `ThrottledPropertyHOC` in that there may be prop changes that do not get rendered, but in this case for a different reason.

This increases the performance of switching between code and other editor tabs, as well as improving the "See Inside" performance. It makes switching to the code tab as fast as switching between sprites.
2019-01-29 14:05:38 -05:00
Paul Kaplan cf0d5487d6 Avoid double toolbox update when setting the locale 2019-01-28 09:15:19 -05:00
Evelyn Eastmond c1ad2b51b6 Changes to event names to clarify them. 2019-01-16 20:48:49 -05:00
Evelyn Eastmond d72d2c5de2 Adding a new runtime event for peripheral disconnects that are intentional. 2019-01-16 20:48:49 -05:00
chrisgarrity 213ef4bad7 check for non-null flyout 2019-01-08 17:58:14 -05:00
Paul Kaplan 54eea42e15 Remove most of the analytics.pageview events, keeping the search queries 2018-12-20 13:19:24 -05:00
Karishma Chadhaandtowerofnix aab8a3bab6 Fix mistake from merge commit
Co-Authored-By: towerofnix <9948030+towerofnix@users.noreply.github.com>
2018-12-11 20:45:47 -04:00
Florrie 28349f3bb2 Merge branch 'develop' of https://github.com/LLK/scratch-gui into treat-defaultValue-properly 2018-12-06 22:52:42 -04:00
Florrie 236948a2d2 Treat defaultValue from Blockly prompts properly
That is, as the default value for the input, not the placeholder.
2018-12-06 22:29:18 -04:00
Karishma Chadha 62d8aad125 Merge pull request #3960 from kchadha/cloud-var-modal
Do not show cloud variable option in list modal.
2018-12-06 10:53:44 -05:00
Karishma Chadha 6c84d25fa0 Fix error logging when workspace fails to update because of error from scratch-blocks. 2018-12-05 23:59:27 -05:00
Karishma Chadha 5fee2d1b6c Do not show cloud variable option in list modal. 2018-12-05 22:55:25 -05:00
Paul Kaplan b32ca253d4 Remove setTimeout for reattaching workspace block listener.
It was causing a bug where switching tabs and adding a sprite would make the workspace blocks not work. Needs investigation.
2018-11-29 13:12:02 -05:00
Ray Schamp 095924256a Track "project changed" state in Redux
Listen to the new project changed event from the VM and keep track of the state in Redux.  Update it as appropriate.

Known issue is that the project is marked as "changed" immediately after it's loaded. This is due to asynchronous event emitting while the project data is loaded, and needs an update to the VM to fix.
2018-11-28 09:01:30 -05:00
Karishma Chadha fe2ebd9b92 Address minor PR review comments. 2018-11-14 18:48:10 -05:00
Karishma Chadha b24a769db8 Disable cloud variable option when vm reaches limit for project. Rename canUseCloud to match other property in the prompt container/component. 2018-11-13 18:10:37 -05:00
Karishma Chadha 4b64d2403b Move cloud connection logic into its own HOC and add canUseCloud flag to control whether to show the new cloud variable options in the variable modal. 2018-11-13 16:46:20 -05:00
Karishma Chadha 9f892e501c Create cloud var from variable modal. 2018-11-13 16:46:20 -05:00
Karishma Chadha 3ace717787 Add cloud variable option to variable modal. 2018-11-13 16:46:20 -05:00
Paul Kaplan aa4108fe30 Wait for vm.shareBlocksToTarget to resolve before reloading workspace.
The function is being changed to resolve to a promise, so do not request a workspace refresh until after the sharing is completed.
2018-11-05 13:04:56 -05:00
Paul Kaplan c973bf0e1a Make the blocks workspace a drop area for BACKPACK_CODE drag types 2018-10-31 10:22:07 -04:00
Ben Wheeler 7b100b2582 added missing onOpenConnectionModal 2018-10-24 09:41:54 -04:00
Eric Rosenbaum 31909d797f Move connection modal into redux (#3459)
* Connection Modal loads its own data

* Connection does not update flyout status buttons

* WIP moving connection modal into redux

* Lint fix and remove unused prop

* Close modal even if exception on disconnect
2018-10-23 16:27:27 -04:00
Evelyn Eastmond aa5f9f6602 Beginning differentiation of hardware disconnect alerts. (#3335) 2018-10-17 15:44:44 -04:00
Eric Rosenbaum d5e024cc40 Open sound recorder from sound block menu (#3309)
* Handle recordSoundCallback from blocks

* Set custom field type for sounds menu

* Add record… item to sounds menu

* Use localized string and ID for ‘record…’ option

* Add integration test

* Don’t use custom field for sounds menu

* Use callback as the value of the ‘record…’ menu item
2018-10-11 11:32:12 -04:00
Karishma Chadha dca56cf758 Merge pull request #3144 from mzgoddard/allow-workspace-loading-error
log workspace update errors
2018-09-26 18:00:23 -04:00
Michael "Z" Goddard 64c4d37e8b log workspace update errors
Workspace update errors can be partially recovered from. This allows
the gui to "successfully" load on projects that pass vm validation and
loading but throw an error in scratch-blocks. Logging the error instead
of throwing it allows the gui and vm to finish updating for the
workspace change. This allows the VM to behave normally even if the
scratch-blocks workspace rendering is incomplete.
2018-09-14 15:04:20 -04:00
Evelyn Eastmond 05abc10116 Changing 'device' to 'peripheral' in the GUI code, etc. 2018-09-07 10:35:06 -04:00
Eric Rosenbaum b2a308e53e Merge branch 'develop' into feature/wedo-steps 2018-08-09 15:20:15 -04:00
Eric Rosenbaum dffc0d5491 Use useAutoScan prop instead of useDeviceList 2018-08-09 12:06:16 -04:00
Eric Rosenbaum 18b24ade60 Add WeDo device connection steps 2018-08-02 14:29:10 -04:00
chrisgarrity 375e9c3f07 Basic RTL 2018-08-01 15:55:10 -04:00
Karishma Chadha a5abdfeae5 Clear the workspace undo when the workspace updates. 2018-07-24 15:01:03 -04:00
Karishma Chadha 5d6a48a24b Call updateToolbox whenever the blocks container updates and is visible so that changes to dynamic menus (e.g. costume renaming) are picked up. Update setLocale to call updateToolbox so that the toolboxRefresh gets re-enabled. This is needed for getting translated toolbox strings like 'Hello' and 'Hmmm...' to stay in sync with language changes. 2018-07-19 15:17:27 -04:00
chrisgarrity d5aa29a395 Merge pull request #2667 from chrisgarrity/issue/2530-block-size-locale
Issue/2530 block size locale
2018-07-18 14:22:17 -04:00
chrisgarrity 483237767d cleanup
Remove cruft and add comments to explain how setLocale is called.
2018-07-18 13:35:53 -04:00
Paul Kaplan 05ae9b46dd Add per-extension help link and wire up help button 2018-07-18 10:37:06 -04:00
Paul Kaplan b108c7ed23 Add per-extension connecting message for ev3 pin specific instructions 2018-07-18 10:20:43 -04:00
chrisgarrity 118cd45610 Only update blocks locale when blocks are visible
In `blocks.jsx` only call setLocale if visible. Depends on `getLocale` being added to VM to know when global locale changed while not visible making the VM out of sync.
2018-07-18 10:07:42 -04:00
Karishma Chadha f3a2d53332 Fix rename variable bug by always passing additionalVars to the scratch-blocks prompt callback. Let scratch-blocks decide whether or not to use the additional vars based on whether the variable is local or global. 2018-07-12 19:21:54 -04:00
chrisgarrity 7e50c061b8 Merge branch 'develop' into issue/2514-extension-lang-switch 2018-07-12 08:53:41 -04:00
Paul Kaplan 54a3f37680 Use the improved extension status button API 2018-07-11 09:26:33 -04:00
chrisgarrity 373d571d9b refresh blocks after setLocale promise returns
Depends on https://github.com/LLK/scratch-vm/pull/1321
2018-07-11 09:01:24 -04:00
Paul Kaplan 18fc37c129 Propagate extension device images to make extension specific flows 2018-07-10 14:43:36 -04:00