1. 14 Jun, 2017 2 commits
  2. 12 Jun, 2017 3 commits
    • Evan W. Patton's avatar
      Make extension strings internationalized · b19bcc03
      Evan W. Patton authored
      Fixes #888
      
      Change-Id: Ib394778a30729c54cfdc787107e542b85cfd3a1a
      b19bcc03
    • Evan W. Patton's avatar
      Fix bug with selection clearing triggered when dev tools open · 0909eb27
      Evan W. Patton authored
      Change-Id: I62d20ee830af8f88ce816736d71ab78da90fed9d
      0909eb27
    • Evan W. Patton's avatar
      Fix issue with deleting an instantiated extension · 57286750
      Evan W. Patton authored
      It was reported that deleting an extension that had been instantiated
      results in an "Oops! something broke" message. The issue is caused by
      collecting all of the sibling component types in the same package (due
      to extension bundles) and accidentally double-counting the extension
      type that triggered the deletion. This would result in an attempt to
      delete the same component twice resulting in an error because the
      component no longer existed.
      
      This commit fixes the problem by checking the sibling name against the
      set of to-be-removed classes to ensure that adding a sibling doesn't
      duplicate the original class for removal.
      
      Change-Id: Id3d5e17da4e3a5c4e8423ac32fc427cfdcd8ebdc
      57286750
  3. 09 Jun, 2017 1 commit
    • Evan W. Patton's avatar
      Make error message when loading projects with missing components · e7fefb22
      Evan W. Patton authored
      A user reported when loading an old project with a reference to the
      BLE component resulted in an unexpected error. This was due to the
      component being present in the Screen1.scm but not in the assets. This
      commit makes it so that looking up an undefined component will result
      in an error message being reported to the user indicating that the
      project in question cannot be loaded.
      
      Change-Id: Ida96802fd8152bf94dc2ac1f481c3acb3810a724
      e7fefb22
  4. 04 Jun, 2017 2 commits
    • Jeffrey I. Schiller's avatar
      Add a TutorialURL property · 6e7fc03a
      Jeffrey I. Schiller authored
      The TutorialURL will be opened in a sidebar in MIT App Inventor. This
      permits people to build “template” projects with a tutorial (hosted on
      their own site) displayed in a sidebar.
      
      For now, we only allow tutorial urls from http://appinventor.mit.edu/ or
      http://appinv.us/.
      
      Change-Id: Ia79eeac6bd3809ce32d0475aa3954ad2c996c776
      6e7fc03a
    • Jeffrey I. Schiller's avatar
      Add “DRAINING” State to Buildserver · 6497ac17
      Jeffrey I. Schiller authored
      When running a set of buildservers behind a load balancer there is a
      bunching effect that can happen when one buildserver winds up with a
      large number of simultaneous builds while other buildservers are
      idle. This happens when a buildserver becomes a little busy and as a
      result runs slower then the other servers. This increases the likelihood
      that it will get more work to do while it is still working on existing
      jobs. Which slows it even further which results in more jobs until it
      hits its maximum and rejects jobs (while the other buildservers are
      idle!).
      
      This change results in the buildserver returning an unhealthy status to
      the load balancer (most load balancers can be configured to check a
      buildservers health periodically) after it reaches 2/3 of its maximum
      load. It then stays in this “DRAINING” state until the load becomes less
      then 1/3 at which point the state becomes “UP” again.
      
      Change-Id: Id6be52475151a0208000ced17fe1f2d3f15e7b94
      6497ac17
  5. 03 Jun, 2017 1 commit
    • User's avatar
      Update _messages.js · 631b5bdc
      User authored
      Correct a translation error
      
      Change-Id: I85ef2c21e7ad56daa9aec8efa4e386aaf9fa55ae
      631b5bdc
  6. 30 May, 2017 2 commits
    • Evan W. Patton's avatar
      Fix splash screen and mutators in Blockly release · 30e307e3
      Evan W. Patton authored
      This commit fixes the following:
      
      1. Blocks in the mutator workspace did not respond to mouse down
      events in Firefox versions earlier than 53.0 due to the lack of a
      focus method on SVG elements.
      
      2. Made the splash screens only appear after leaving the project list
      (if the user had projects). This prevents a scrolling issue that
      occurs when the user has more than one screen's height worth of
      projects and the DeckPanel transitions from the project list to the
      designer view while the splash screen is being shown. In some cases,
      users were unable to scroll to or otherwise access the dialog to
      dismiss it.
      
      Change-Id: If368f4c15a55993f95ef17050bb8c0e9493cf40e
      30e307e3
    • Pavitra's avatar
      Fixed Markdown errors · cc00c110
      Pavitra authored
      Change-Id: If1b6dcd50078f3b214d03fa8bb13032a88b54c96
      cc00c110
  7. 29 May, 2017 1 commit
    • Evan W. Patton's avatar
      Mitigate issues reported for Blockly update · 58532a7d
      Evan W. Patton authored
      1. Added more checks for cases where dragging a block from the drawer
      results in many blocks being created at the same (x, y)
      coordinates. (see mit-cml/blockly master)
      
      2. Fixed issue where error checking did not occur when deleting a
      global variable definition block.
      
      3. Fixed issue introduced in extension update that prevented deleting
      extensions from projects imported before the update.
      
      Change-Id: I5fdcc89dfdc9f1392948fb8c864b77e45a2f8e3a
      58532a7d
  8. 27 May, 2017 1 commit
    • Evan W. Patton's avatar
      Fix block dragging issues from the drawer · a2f75595
      Evan W. Patton authored
      This commit addresses two issues with the blockly update:
      
      1. Updates the flyout implementation in Blockly core to store
      information about the last created block so that if many create
      operations are fired only the first will be applied. This should
      prevent a reported issue where many blocks are created at exactly the
      same location when dragging from the flyout.
      
      2. Change the z-index of ode-DialogBox to be greater than Blockly's
      drag surface z-index so that dialogs that appear during drag
      operations will not be occluded by the dialog. Prior to this change,
      the block would be above the dialog and prevent the user from being
      able to click any button to dismiss the dialog.
      
      Change-Id: I07f19b971860f72ec512dfd9cb39bcb5207f3987
      a2f75595
  9. 25 May, 2017 1 commit
  10. 24 May, 2017 5 commits
    • Evan W. Patton's avatar
      Add progress bar and _extensions in ReplMgr · e867430b
      Evan W. Patton authored
      This commit provides a progress bar so that the UI gives feedback to
      the user when sending large assets (such as extensions) to the
      Companion. This commit also adds the _extensions RPC to the Companion
      to enable loading of project-specific extensions from the phone's
      AppInventor directory rather than all *.jar files present.
      
      Change-Id: I787374dcf2d7c295b2a14e38a72c6c06996ce5d1
      e867430b
    • Jeffrey I. Schiller's avatar
      Merge branch 'master' into ucr · 935e045a
      Jeffrey I. Schiller authored
      935e045a
    • Evan W. Patton's avatar
      Fix logic bugs in ComponentServiceImpl and add tests · 02c42769
      Evan W. Patton authored
      This commit fixes some logic bugs in the ComponentServiceImpl changes
      for the IOT release related to the inclusion of multiple extensions
      per aix and the fact that component.json was renamed to
      components.json to reflect this.
      
      This commit also adds unit tests to evaluate the different code paths
      through the ComponentServiceImpl to ensure correctness of different
      upgrade paths.
      
      Change-Id: I3d8fc8998c9117297c3c8c99bede6371ef016be6
      02c42769
    • Evan W. Patton's avatar
      Remove vestigal GWT 2.7 libraries · e852dd75
      Evan W. Patton authored
      Change-Id: I99a0dddc220947ace5067284f5b0da21528c1b1b
      e852dd75
    • Evan W. Patton's avatar
      Miscellaneous bugfixes for the Blockly update · f970ac35
      Evan W. Patton authored
      This is a squashed commit containing bugfixes for the Blockly
      update. The individual commit bodies are below as a summary:
      
      1. After using the Paste All Blocks from Backpack menu item, undoing
      this operation requires N Undo commands whereas it should only require
      1 Undo. This commit wraps the bulk of the pasteBackpack operation in a
      try-finally to set/unset the Blockly event group so that all of the
      create block events are grouped together.
      
      2. Prevent CSS updates during paste all from backpack
      
      3. Ghica reported that when the backpack is open it is possible to
      scroll both the flyout's and workspace's scrollbars and there is no
      visual indicator which is which. This means that sometimes the user
      will scroll the workspace when intending to scroll the flyout. This
      commit makes flyouts hide their parent workspace's scrollbars and show
      them after the flyout is dismissed.
      
      4. Improve rendering of flyouts with many blocks
      
      5. Hide backpack with ESC key
      
      6. Only fire parameter orientation event after orientation change
      
      7. The implementation of Blockly.Events.filer on Google's master is
      implemented using a O(n^2) algorithm. When performing operations that
      affect a large number of blocks, e.g. arrangements or pasting from the
      Backpack, this performance is unacceptable. This commit provides a new
      implementation of Blockly.Events.filter that is linear in the number
      of pending events.
      
      8. Removing mutators for parameters or deleting the procedure block
      and then attempting to undo the operation would leave the caller
      blocks in an inconsistent state with missing parameters or not
      reconnecting the previously attached input blocks. This commit fixes
      these issues by changing the order of certain operations so that when
      Blockly reverses the order of operations variables, such as the caller
      block's PROCNAME, are set correctly.
      
      9. The way that Blockly handles changes to fields breaks how we
      renamed parameters in the mutator. This commit provides a custom
      handler for key events that makes the renaming behavior match that
      before the Blockly update.
      
      10. Cherry-picked code for mutators that fixed the ordering of the
      mutator workspace's toolbox with respect to the block canvas.
      
      11. Fixed delete area not appearing for the mutator workspace.
      
      12. Fixed ghost scrollbars from different flyouts capturing the mouse
      over event for blocks in the drawer flyout.
      
      13. Made it so that dragging a block in any direction from a flyout
      will result in a new block being created. Previously the window was
      ±70 degrees from the horizontal axis.
      
      14. Improved performance on large projects during load or after moving
      a stack of blocks.
      
      15. Fixed error checking on blocks created by typeblock and their
      relatives.
      
      16. Fixed null pointer exception when renaming a component prior to
      opening the blocks editor.
      
      17. Moved updates to the scrollbar visibility to setScrollbarsVisible
      and made all changes to scrollbar visibility go through that method,
      which includes fix 16 above.
      
      18. Made arrangement options adjust to workspace scale and
      snap-to-grid options.
      
      19. Fixed issue where changing text fields would not result in a
      Change event and therefore fail to trigger a workspace save.
      
      20. Added fix to ensure the warning handler exists before attempting
      to do error checks on variables.
      
      21. Patched Blockly code to prevent the connection database from
      throwing an error when an operation would essentially be an identity
      operation on the database.
      
      Change-Id: I0d713e3c92586c0506bfe24d138c634c29d6a208
      f970ac35
  11. 14 May, 2017 2 commits
    • Evan W. Patton's avatar
      Fix buildserver paths on Windows · f1510156
      Evan W. Patton authored
      The buildserver should return an error if Kawa cannot compile the YAIL
      file. However, on Windows we end up always pointing at the classes
      directory, which always exists, and therefore we continue compiling an
      app even though the class files are missing. On Mac/Linux the same
      project results in a Kawa compilation error. The logic error is
      introduced by the hard coding of the path "/../src/" in
      Compiler.java. On Windows the path uses the conventional Windows
      separator "\\", so the substring of interest is "\\..\\src\\". This
      commit adjusts the lookup string to use File.separator so that the
      lookup path will be correct regardless of platform.
      
      Change-Id: Id066cad6710e7fe8c6710b40465c87992f547854
      f1510156
    • Evan W. Patton's avatar
      Fix ComponentTranslation encoding on non-UTF-8-by-default platforms · 3385ac09
      Evan W. Patton authored
      Javac default output format for files is platform-specific. In the
      ai.apt macro we do not specify the encoding, so we end up with
      ISO-8859-1 strings on Windows that GWT later attempts to decode as
      UTF-8 strings. This commit sets the encoding for the javac command to
      be UTF-8 so that encodings work correctly on platforms (e.g., Windows)
      where the default encoding is not UTF-8.
      
      Change-Id: Iac68786e71983e8605e982a093d3daae09d49c01
      3385ac09
  12. 02 May, 2017 5 commits
    • Evan W. Patton's avatar
      Add custom help URLs for extensions · 910fb80b
      Evan W. Patton authored
      Extensions loaded into App Inventor have "More Information" URLs based
      on the server's documentation. Obviously, we won't have documentation
      for every single extension, nor do we want to update the GAE
      application every time someone publishes or updates an extension. This
      commit adds a new helpUrl field to the `@DesignerComponent` annotation
      that can be used to specify a custom URL for extension documentation.
      
      Closes issue #883.
      
      Change-Id: I7fdc20bb1d5e9cb1bfa257f1ed194748bd5e35ec
      910fb80b
    • Evan W. Patton's avatar
      Add support for multiple extensions per AIX · 6c36d5aa
      Evan W. Patton authored
      For the Internet of Things update, we want to be able to have
      collections of related extensions, for example, targetting different
      features of the same platform, to be imported as a single unit. This
      behavior reflects how we group components such as the LEGO EV3 or NXT
      robots and allows us to treat extensions in the same way.
      
      Change-Id: I83e1069421939e57b33689f7ae0a3d5928c6c6cd
      6c36d5aa
    • Evan W. Patton's avatar
      Allow component properties to specify accepted type · dea242fe
      Evan W. Patton authored
      For the Internet of Things update, we want to allow extensions to
      specify restrictions on designer properties. Specifically, we want IOT
      extensions with a BluetoothDevice property to be able to restrict the
      component list to the BluetoothLE extension. This commit extends the
      behavior of the component property type by allowing an extension
      author to include a colon (":") followed by the fully-qualified class
      name of the component type to accept.
      
      Change-Id: I6c38890fde99fe947bb1a305412d662694246463
      dea242fe
    • Evan W. Patton's avatar
      Update Guava to 20 to be compatible with GWT 2.8 · c57f6917
      Evan W. Patton authored
      Change-Id: Ieb6fe17306d262ff92c08e28f227767add7005b6
      c57f6917
    • Evan W. Patton's avatar
      Update appengine build to use JDK 1.7 · 7633d9e2
      Evan W. Patton authored
      Change-Id: I27191377afac5a2d01db9092934e2c4b25e639ce
      7633d9e2
  13. 29 Apr, 2017 3 commits
    • Evan W. Patton's avatar
      Fix arrangement/sort options in Blockly context menu · 409fc9cc
      Evan W. Patton authored
      The context menu items for arranging blocks and sorting by category
      did not have expected behavior due to the new Blockly events
      system. This commit introduces two new events StartArrangeBlocks and
      EndArrangeBlocks that will manipulate the appropriate flags so the
      context menu options work correctly. We also group the arrangement
      events in a single group. This makes the undo/redo menu options behave
      correctly rather than undoing/redoing individual moves within the
      larger arrangement action.
      
      Change-Id: Icb832eef1f91aec5a12025707e9c39b3257987af
      409fc9cc
    • Evan W. Patton's avatar
      Add DomHelper for goog.ui.Dialog · 28f2899c
      Evan W. Patton authored
      Because Blockly is linked into the GWT JavaScript, goog.ui.Dialog
      attempts to show itself on the GWT iframe's document rather than on
      the top window where the UI is actually displayed. This commit adds a
      goog.ui.DomHelper so that the Dialog attachs its DOM elements to the
      correct document.
      
      NB: This has the side-effect that the runtime error dialog from the
      companion is now UI global (it will show even if in the designer).
      
      Change-Id: I3f7fb60d8898e37a689cbc3f406ef39832717d99
      28f2899c
    • Evan W. Patton's avatar
      Fix variable reference renaming · 52acc3f2
      Evan W. Patton authored
      When renaming variables, references to those variables are not
      correctly renamed. This is due to a change in the order in which
      Blockly manipulates the field's value and calls the validator. Since
      the update occurs before validation, we don't know the original name
      and therefore cannot find and update all of the references. This
      commit provides the flydown with its own implementation of
      onHtmlInputChanged_ so that it can provide a behavior that is
      compatible with our renaming mechanism, mainly that it will validate
      first and only if successful will it update the field's value.
      
      Change-Id: I7569d0f0b1b6f57e476df5e32f1b2a12e7d7533c
      52acc3f2
  14. 27 Apr, 2017 2 commits
    • Evan W. Patton's avatar
      Fix vertical parameter orientation on procedure blocks · 145e718b
      Evan W. Patton authored
      Procedure definitions have the option for horizontal/vertical
      orientation of parameters. However, switching resulted in the inputs
      disappearing from the block. This was caused by the new fields not
      being initialized correctly such that when the block attempted to
      redraw, expected SVG elements were undefined.
      
      This commit fixes the updateParams_ method for procedure blocks so
      that they will correctly handle switching between the two cases.
      
      Change-Id: Ib9a161548954a2990a0351ad07a808c35d2bc928
      145e718b
    • Jeffrey I. Schiller's avatar
      Fix to JsonUtil to properly handle java Lists · 9a0d4b87
      Jeffrey I. Schiller authored
      This fixes a bug in FirebaseDB where a list of lists is handed to the
      AppendValue block.
      
      Change-Id: I16cd4612f978842e62a719627bc729d8f4a48d90
      9a0d4b87
  15. 26 Apr, 2017 2 commits
    • Evan W. Patton's avatar
      Fix pasting of procedures_defreturn blocks from Backpack · a5fa4f6f
      Evan W. Patton authored
      Creating new procedures that return values in the blocks editor could
      result in multiple procedures having the same name. This commit
      updates the procedures_defreturn initialization to match that of
      procedures_defnoreturn so that renaming is correctly applied.
      
      Change-Id: Ifc30ee27d538b46a61a17d0d4677dad31c4d7d4d
      a5fa4f6f
    • Evan W. Patton's avatar
      Fix backpack behavior in Blockly update · 07848d7e
      Evan W. Patton authored
      Backpack menu items in the workspace, i.e. Copy All to Backpack and
      Paste All From Backpack were broken during the transition to the
      latest Blockly. This commit changes any checks for the backpack
      presence to use the hasBackpack() test added to WorkspaceSvg.
      
      Change-Id: Iae7919d173f5a5f75003c0132d1f116af9839bd0
      07848d7e
  16. 25 Apr, 2017 5 commits
    • Evan W. Patton's avatar
      Fix help string translation in palette items · 0e9f7067
      Evan W. Patton authored
      Change-Id: I467a9c61a243dc38cd9b311016cf12893b300b66
      0e9f7067
    • Evan W. Patton's avatar
      Fix logic for vertical event parameters · 2a681986
      Evan W. Patton authored
      This commit restores the ability to change the orientation of the
      parameters in an event handler block. The functionality is updated to
      reflect the new events mechanism in Blockly.
      
      Change-Id: Ib6d9c27b6e13838af886c0abf281e24ba57e6bbe
      2a681986
    • Evan W. Patton's avatar
      Fix Chrome focus jumping in SourceStructureExplorer · 8bc52d45
      Evan W. Patton authored
      A change in Chrome results in different behavior when focusing an
      invisible element. When the list is longer than the panel, this
      results in the panel scrolling-to-top. The fix applied is adapted from
      [this issue](https://github.com/gwtproject/gwt/issues/9475#issuecomment-277777989)
      on the GWT Github repository.
      
      Change-Id: I8634a95077ee166f34aa265e81a7f272cbd620de
      8bc52d45
    • Evan W. Patton's avatar
      Fix #708 event parameter translation · 8b2a23f7
      Evan W. Patton authored
      When switching between languages, or loading an AIA created in one
      language but the user's language is different, the translation of
      event parameters would not always hold. This is due to the use of
      `eventparam` as a mutation on the lexical getter and setter
      blocks. Through certain actions, the `eventparam` cached value could
      be reset to an incorrect state.
      
      This commit does two things to address this issue: (1) adds an
      `updateMutation()` method that can be used to recompute the value of
      `eventparam` after a blocks update, including changing the dropdown or
      attaching a new parent. This keeps the `eventparam` up-to-date during
      normal operation (previously it was only computed on save). (2)
      FieldParameterFlydown caches the untranslated `eventparam` value for
      instantiating new blocks within the workspace. Previously they were
      created with the value `null`, which has special meaning as a cached
      'not an event' value. Now they are created with the correct mutation
      at the beginning and with (1) should maintain the correct value.
      
      Change-Id: I758b8d414d7ddf98f7375ee961187b06b47939cf
      8b2a23f7
    • Evan W. Patton's avatar
      Update AI2 to use latest Blockly · 1a91e92a
      Evan W. Patton authored
      This commit brings the App Inventor blocks editor current to the
      Google's Blockly. As part of the update, some additional
      organizational changes were made to the code:
      
      1. Remove old blockly in lib/ and replaces it with a git submodule
      2. Remove old closure-library in lib/ and replaces it with a git
         submodule
      3. Move AI2-specific Blockly changes out of core where possible
      
      Change-Id: I58993db05631266d95fbbcc68d49aad1e562fc22
      1a91e92a
  17. 31 Mar, 2017 1 commit
    • Jeffrey I. Schiller's avatar
      Use Environment.getExternalStorageDirectory() · ac692450
      Jeffrey I. Schiller authored
      Use this instead of directly referencing “/sdcard.” This is necessary
      for newer Android devices, particularly those which support multiple
      “users” of the device.
      
      Change-Id: Ic8603865a3927aafeaacf82b00e985506a326b60
      ac692450
  18. 30 Mar, 2017 1 commit