Commit Graph

192 Commits

Author SHA1 Message Date
Neil Fraser
4cb4b42f8d Use named properties on Msg. 2018-04-27 11:50:51 -07:00
Andrew n marshall
ab8692652a Revert "Removing namespace declarations for deprecated and unused namespaces. (#1796)" (#1809)
This reverts commit 75459abfdd.
2018-04-20 08:08:11 -07:00
Andrew n marshall
75459abfdd Removing namespace declarations for deprecated and unused namespaces. (#1796)
These namespaces use to contain the original block hue constants,
but were deprecated (via comment, except for procedures) over a year
ago. With the removal of those constants, the declarations were
creating empty, unused objects.
2018-04-18 15:32:26 -07:00
Andrew n marshall
b2cb96b5b1 Mark Blockly.Constants.Colour and .Lists depreacted. (#1797)
Both are only used by the hue constants, which are already deprecated.
2018-04-17 13:29:50 -07:00
Rachel Fenichel
f52b75a198 Merge pull request #1778 from AnmAtAnm/shadow-pop
Rewrote LOGIC_COMPARE_ONCHANGE_MIXIN to fix #1408.
2018-04-13 17:04:12 -07:00
Andrew n marshall
ef23b0e4ef Do not reconnect a previous shadow block.
Assume unplug() will recreate a new correct shadow.
2018-04-13 16:26:20 -07:00
Andrew n marshall
c0e220214c Rewrote LOGIC_COMPARE_ONCHANGE_MIXIN to fix #1408.
* Create prevBlock_ upon first call to onchange.
 * Revert state upon an incompatible combination, bumping the new incompatible
   block, instead of the old block. Thus, the shadow is never the bumped block.

Bug:
 * The undo stack get caught in a loop, and will never undo back to a state
   equivalent to the previous action.
2018-04-12 17:27:20 -07:00
Rachel Fenichel
23666664fa Fix context menus on blocks with variables 2018-04-12 16:56:07 -07:00
Andrew n marshall
e9d8e00a55 Making all blocks use the MSG colour values. (#1749)
* Making all blocks use the MSG colour values.
 * Deprecating Blockly.Constants.Lists.HUE and similar constants.
 * Removing deprecated Blockly.Blocks.lists.HUE constants.
 * Allowing message references in the Block.setColour() parameter.
 * Adding checking of older constants, ensuring they are not overwritten.
2018-04-09 17:37:47 -07:00
Rachel Fenichel
3a4adb3b0d Scroll to the procedure definition from the procedure call context menu 2018-04-05 17:57:47 -07:00
Sam El-Husseini
134b32fe56 Don't show create var getter in block contextmenu when in flyout 2018-03-27 23:40:54 -07:00
Rachel Fenichel
b402f3c204 Add @this annotations in blocks/text.js 2018-03-26 14:32:49 -07:00
Rachel Fenichel
6d83b9bc28 Add keyword-spacing rule to eslint 2018-03-19 13:10:29 -07:00
zgtm
14aa53e0fa Move ordinal in block 'text_getSubstring' (#1656)
On updating the block 'text_getSubstring', the ordinal string 'ORDINAL1' is moved when the corresponding corresponding input field is moved so that the ordinal string does not end up at the end of the block.
2018-02-26 10:44:01 -08:00
Rachel Fenichel
20b7b7a8eb Update comment on loop types
See https://groups.google.com/d/msg/blockly/v6W3BGN9P_o/RH91g94RBAAJ
2018-02-20 17:01:29 -08:00
Rachel Fenichel
c4d114eb0f Merge pull request #1644 from rachel-fenichel/bugfix/1642
Serialize variable IDs in procedure definitions
2018-02-20 14:20:52 -08:00
Rachel Fenichel
74fd58131b Serialize variable IDs in procedure definitions 2018-02-20 13:18:48 -08:00
Andrew n marshall
f45c6faf05 Fix #1619. buildTooltipWithFieldValue() => buildTooltipWithFieldText() (#1638)
Fix #1619. buildTooltipWithFieldValue() => buildTooltipWithFieldText()

The "value" of FieldVariables was the variable id.
However, we usually want the field text for the human visible tooltip.
Refactoring and renaming buildTooltipWithFieldValue to use the field
text.
2018-02-16 16:51:18 -08:00
Rachel Fenichel
af59e27d96 Cleanup 2018-02-16 11:02:03 -08:00
Rachel Fenichel
f3a4664dea Delete extra variables at the end of a procedure argument edit 2018-02-15 17:18:23 -08:00
RoboErikG
551b05b4f1 Fix typo in BKY message key (#1616)
We had {% instead of %{

Fixes #1613
2018-02-14 10:52:49 -08:00
Rachel Fenichel
3e62ffc20a Split at higher level for multiline function calls 2018-01-24 11:26:41 -08:00
Rachel Fenichel
9a53e96d53 More lint fixes 2018-01-23 18:22:53 -08:00
Rachel Fenichel
3f61f71f35 Merge pull request #1531 from google/variables_by_id
Variables by ID
2018-01-16 17:54:55 -08:00
Rachel Fenichel
b593d44379 Make the potential variable map null when not needed 2018-01-12 14:51:02 -08:00
Rachel Fenichel
1fa27fa043 Update comments and remove unused functions 2018-01-12 12:03:28 -08:00
Neil Fraser
870f7b7f8a Fix document detection.
Andrew LGTMs in person.
2018-01-08 15:10:14 -08:00
Rachel Fenichel
5d6d7519cd Remove some TODOs; add a variable-referencing block to the simple playground flyout 2018-01-08 14:14:26 -08:00
Neil Fraser
7413db1089 Code style 2018-01-05 15:56:20 -08:00
Rachel Fenichel
ea6bf607fa Add displayRenamedVar to procedures_defnoreturn 2018-01-04 16:38:36 -08:00
Rachel Fenichel
832dae009e Cleanup 2018-01-04 16:32:23 -08:00
Rachel Fenichel
77cf3ddc33 Track variable IDs for procedure arguments 2018-01-04 16:16:12 -08:00
Rachel Fenichel
9b091a8f9e Update procedure generators 2018-01-02 16:27:17 -08:00
Rachel Fenichel
66975c8f94 Rebase 2017-12-15 13:44:27 -08:00
Rachel Fenichel
399f1a5c11 Tests 2017-12-13 11:50:08 -08:00
Rachel Fenichel
61db23c78a Get rid of workspace.deleteVariable 2017-12-13 11:50:08 -08:00
Rachel Fenichel
1ce46ab88b Move getOrCreateVariable to variables.js 2017-12-13 11:50:07 -08:00
Rachel Fenichel
24462fbc91 Add TODOs and fix return type 2017-12-13 11:50:07 -08:00
Rachel Fenichel
779be46a92 Allow variables of different types to share the same name. 2017-12-13 11:50:07 -08:00
Tianwei Du
492462e1d4 Develop (#1481)
* variables_dynamic

* make test , and i18n

* Issue #1470

* Blockly.Constants.VariablesDynamic.CUSTOM_CONTEXT_MENU_VARIABLE_MUTATION
to make sure setCheck before event trigger

* Update built files from develop.

* fix copyright ,quotes , comments ,  and optimize some flow.

* quotes,change UI , change category custom name

* single setter , remove mutator , colour typo , typed variables create button message

* undo the indent edits.
2017-12-08 08:53:24 -08:00
RoboErikG
bcedc130bb Fix #1444 - broken mutator for text_charat (#1451)
* Fix #1444 - broken mutator for text_charat

There might no longer be an input named AT on a text_charat block
which the mutator had been depending on. There is now a boolean on
the block for isAt, though, so use that directly instead.

The

* Address comments
2017-11-15 12:21:07 -08:00
RoboErikG
53e6bddff5 Use msg references in block JSON for text_charat (#1426) 2017-11-06 13:05:09 -08:00
Rachel Fenichel
432881d2c1 Make quote images meet line length requirements 2017-11-03 14:04:36 -07:00
Rachel Fenichel
8c51935025 More lint for unused variables 2017-11-03 14:04:36 -07:00
RoboErikG
c4b2899007 Fix #1397 by being more careful with mutator (#1410)
* Fix #1397 by being more careful with mutator

The text_charAt mutator was replacing more of the title string than
necessary, which would lead to losing some of the relevant text in
the label. Updated the mutator to only add/remove a new input on the
end instead of replacing the default dummy input.

* Code cleanup
2017-11-02 09:37:31 -07:00
Neil Fraser
2445a752b7 Resolve another 20 warnings. 2017-10-24 14:06:29 -07:00
Neil Fraser
4262b09002 Resolve 106 warnings. 2017-10-24 14:06:29 -07:00
Andrew n marshall
f992ea0f9c Fix #1369: resource loading order constraints, interpolation tokens in message expansion (PR #1383)
This fixes race condition in #1369 by using message references instead of explicit string lookups. This required fixing a bug the token interpolation parser that was breaking on the inner '"%1"' for these tooltips.
2017-10-24 13:02:14 -07:00
RoboErikG
2514976e80 Fix typo in mixin name (#1375)
There was a typo in the name of the loop check mixin. Fixes the immediate issue though we should post a warning if trying to register a mixin that doesn't exist.
2017-10-20 15:18:19 -07:00
Neil Fraser
5c00256e96 Style improvements. No functional changes. (#1367) 2017-10-17 15:19:50 -07:00