Commit Graph

112 Commits

Author SHA1 Message Date
Sam El-Husseini
267deceb82 Dropdowndiv positioning (#3212)
* Fix positioning of the dropdown div
2019-10-16 10:20:40 -05:00
Sam El-Husseini
fba98fca5b Move the dropdown field into the dropdown div. (#3122)
* Move the dropdown field into the dropdown div.
2019-10-03 14:35:28 -07:00
Neil Fraser
b46a4fe286 Bring our license format up to date (#3127)
* Google changed from an Inc to an LLC.

This happened back in 2017 but we didn’t notice.  Officially we should update files from Inc to LLC when they are changed as part of regular edits, but this is a nightmare to remember for the next decade.

* Remove project description/titles from licenses

This is no longer part of Google’s header requirements.  Our existing descriptions were useless (“Visual Blocks Editor”) or grossly obselete (“Visual Blocks Language”).

* License no longer requires URL.

* Fix license regexps.
2019-10-02 14:46:56 -07:00
Neil Fraser
b701475984 Simplify trashcan code (#3110)
Also delete unused props in CSS.
2019-09-27 11:43:56 -07:00
Neil Fraser
4ed3295ad9 Make generator an optional module (#3105) 2019-09-27 10:47:10 -07:00
Neil Fraser
75cf614104 Break CSS into modules. (#3084)
* Break CSS into modules.

Drops the compile test by 3 KB.
Remove obsolete .blocklyDraggable class stub (it used to be dynamically changed).
Remove unused menuseparator CSS.
2019-09-25 18:01:19 -07:00
Neil Fraser
a03660243e Code cleanup, drop some CSS.
Random improvements to require statements.

Removal of some obviously dead CSS.

.blocklyDropDownDiv no longer supresses text selection (see comment in PR).

This PR drops the compiled size by 4 KB, which is larger than I was expecting.
2019-09-25 10:34:34 -07:00
Neil Fraser
b84cda2c76 Strip out more bloat from toolbox (#3068)
Also removes three private accesses from workspaceSvg into toolbox tree.

The strategy for workspace.updateToolbox is no longer to clear and repopulate the toolbox, but rather to throw away the old toolbox and rebuild a new one.  This is simpler and more reliable.

This commit trims off another KB from the compiled code.
2019-09-23 15:18:32 -07:00
Neil Fraser
fb17b0276d Remove unused CSS classes. 2019-09-20 10:36:06 -07:00
Rachel Fenichel
6f4476c962 Textarea Field, Multiline Block (from acbart) (#2663)
* Field Textarea, text_multiline block, generators
2019-09-11 17:57:46 -07:00
Sam El-Husseini
cd56a0c0b2 No Edge/IE close input icon (#2912)
* Don't show close icon in widgetdiv input in edge and IE
2019-08-26 10:38:44 -07:00
Neil Fraser
096959fde9 Cleanup of last fortnight’s commits. (#2865)
No functional changes.
2019-08-19 14:07:48 -07:00
Sam El-Husseini
445419e8f8 Update css to show visual indicator of focus on dropdowndivs and widget dropdowns (#2860) 2019-08-19 10:51:17 -07:00
Sam El-Husseini
ca83f97074 Colour field accessibility (#2836)
* Implement key board navigation and aria accessibility for the colour field.
2019-08-16 13:49:05 -07:00
Sam El-Husseini
9203517f3d Center text field input when editing (#2776)
* Center text field input when editing
2019-08-05 11:23:47 -07:00
Abby
1c26b6d79b Adds helper functions for keyboard nav 2019-07-24 11:42:37 -07:00
alschmiedt
8f880d55c3 Revert "Adds type to FieldNumber editor" 2019-07-18 13:02:53 -07:00
alschmiedt
45387faab7 Adds type to FieldNumber editor 2019-07-02 10:53:45 -07:00
Neil Fraser
1535f35ff2 Remove unused CSS image fetch
This default Closure image was always being overridden and was never fetched.  But it takes some research to determine that this is not in effect a potential monitoring point.
2019-06-10 13:20:33 -07:00
Neil Fraser
6134337568 Reduce memory footprint
Blockly.Css.CONTENT isn’t needed after its first use.
There also is no longer a need to store a reference to the stylesheet, just a boolean.
2019-06-10 11:40:41 -07:00
RoboErikG
5056e23389 Fix margins/checkbox in RTL dropdown menus (#2356)
Fixes #2337 by adding in correct positioning for RTL selected states
and fixing an incorrect margin value.
2019-04-05 15:55:00 -07:00
RoboErikG
1a2cf96a5a Update selected menu sizing to fix #2351 (#2353) 2019-04-01 12:43:19 -07:00
Neil Fraser
405b1e4e78 Lint issues found while debugging. 2019-03-27 15:47:29 -07:00
Rachel Fenichel
dfc74b8c4f Use dropdownDiv for the angle field as well 2019-02-26 14:54:21 -08:00
Rachel Fenichel
58027b9668 css cleanup 2019-02-26 11:10:55 -08:00
Rachel Fenichel
c426aad387 Use dropdown div for dropdowns 2019-02-21 13:41:45 -08:00
Rachel Fenichel
763a06a7ac Use dropdown div for colour field 2019-02-21 13:41:45 -08:00
Rachel Fenichel
91408a3238 Add dropdowndiv file 2019-02-21 13:41:45 -08:00
Ashwin Ramaswami
2cc3a8b3d9 Scroll very long context menus 2018-12-18 08:41:14 -05:00
Mehdi Yeganeh
56d5f166de #172, Fixed [Edge, IE] Zoom control mouseover is not clipped 2018-12-08 16:16:59 +03:30
Rachel Fenichel
9aa54ac487 Make replaceable child blocks opaque 2018-11-14 11:19:17 -08:00
Rachel Fenichel
4c133e9ecd Highlight and unhilight the closest connection 2018-11-14 11:19:17 -08:00
Rachel Fenichel
7d775908b9 Add insertion markers. 2018-11-14 11:18:32 -08:00
Neil Fraser
aa09ad9175 Line wrap at 80. 2018-10-16 11:34:10 -07:00
Rachel Fenichel
aae8277513 Merge pull request #2022 from rachel-fenichel/feature/canvas_transition
Add support for transitioning the workspace block and bubble canvases on scrollCenter
2018-08-27 11:31:06 -07:00
Rachel Fenichel
48dac195f7 CSS style 2018-08-27 11:23:24 -07:00
Neil Fraser
cb3ea2f56e Remove goog.ui.ColorPicker (#2020)
Adds the ability to set the tooltip titles for each colour.

Note that Closure’s colour picker in Blockly used to have keyboard controls (as of > 3 years ago); but no longer seems to.  This replacement does not currently have keyboard controls either.
2018-08-24 12:14:42 -07:00
Rachel Fenichel
8f675fd82e Add support for transitioning the workspace block and bubble canvases on scrollCenter 2018-08-24 11:55:55 -07:00
Andrew n marshall
e9aae34388 Adaptive popup size for FieldDropdowns (#1897)
Replace the fixed dropdown height with one responsive to the document's viewport.

This is adapted from Bohdan-Tereta's proposed solution:
https://github.com/google/blockly/pull/1483#issuecomment-381638639

It is sub-optimal, in that is does not adapt to field height (variable
due to workspace zoom), and it does not fully utilize the space above
or below the field if the block is near the top or the bottom.
2018-05-31 16:37:09 -07:00
Rachel Fenichel
ee6f2ea097 Comments v3 (#1817)
* Add skeleton for workspace comments

* XML parsing and encoding of workspace comments.

* Minor fix: piping the height and width from xml to newWorkspaceComment

* Move height and width into workspace_comment_svg

* rename newWorkspaceComment to newComment

* minor refactoring. PR changes

* Functions for managing the comment's lifecycle

* Add initial tests

* Add another test

* Add basic rendering of a comment.

* Cleanup remaining highlighting steps from render

* Fix lint

* Fix aslant

* Add basic comment translate

* Simplify render code into one setPath method

* Move steps to setPath_

* Remove svg elements when disposing of a comment; some code cleanup

* Add a workspace comment on context menu click and position it where the initial context menu was clicked.

* Minor rendering changes, fixes RTL. Fix positioning of new (context menu) comments while workspace is scaled.

* PR feedback

* Gesture code for dragging comments

* Add comment (block drag) surface methods

* minor comment fix

* Comment fixes

* Add comment dragger

* Making rendered private

* Require CommentDragger

* Make basic comment dragging work

* Increase the border around the comment to make a bigger drag handle

* Remove typo

* Allow comments to be selected. Highlight selected comment. Only edit comment on click. Updated comment rendering.

* minor refactor: remove commented out code

* PR comments

* lint and rebuild

* Fix renamed function call

* Fix workspace getMetrics by storing comment size as a number, not a string

* Enable comment deletion when dragging over the toolbox or trash can

* Give issue references to some todos

* Create a helper function for workspace comment creation

* Integrate sam's workspace comments, using the bubble dragger

* Remove comment_dragger references

* Remove comment dragger.js

* Remove pointer handling

* Fix lint

* Move comment XML functions into the comment files.

* Fix tests

* Fix type annotations

* Fix comments on comments

* Fix compiler errors related to visibility.

* Fix merge issues and add an issue number to a TODO

* Add a new message for default text on workspace comments, and rebuild

* Add support for a context menu on workspace comment showing delete and duplication options.
Add copy and paste support.

* PR comment feedback

* Show a delete icon on the comment when selected. Delete icon deletes the comment. Comment can be deleted if dragged onto the toolbox or the trash icon. A normal bubble cannot be deleted that way.

* use isDeletable instead

* Support drag of the comment during editing mode using the top handle.

* Add skeletons for all workspace comment events

* Rebuild with new comments

* Get rid of confused TODO

* JSDoc on a function

* Fix broken tests

* More PR feedback

* Fix lint

* Delete comment on mouse out, highlight on mouse down.

* Fix lint.

* Show delete hand cursor when dragging a comment to delete over the toolbox

* Focus textarea on select

* Add delete events

* Remove workspace comment create event, and add TODO placeholder

* Provide default values if comment height and width are missing in XML

* Set comment handle fill to none by default

* Rebuild

* Comment de/serialization should include location.

* Add comment move events, with undo and redo

* Add comment change events

* Move files up to core

* Add package/private annotations wherever possible

* Move the workspace comment events up to core and into a single file

* Mark things package or private where possible

* Get rid of unnecessary changes to messge files

* Fix lint

* Fix some review feedback

* Make changes to the comment db happen in addTopComment and removeTopComment

* Add css classes for toggling comment focus

* Clean up css for comment focus

* Rebuild
2018-04-27 15:18:59 -07:00
Sam El-Husseini
dc2ab1bbed Update css.js 2018-03-09 15:41:50 -08:00
Sam El-Husseini
b32dbcdb94 Pointer Event fixes ensuring they replace all mouse events, and fix comment focusing issue. 2018-03-02 15:01:58 -08:00
Rachel Fenichel
1d78d7be45 Merge pull request #1483 from DubeySandeep/ScrollableDropdowns
Added scrollable functionality to dropdown menu
2017-12-04 10:39:43 -08:00
picklesrus
d1886572d0 Fix #1487 and only add the delete cursor if the block is not deletabl… (#1491)
* Fix #1487 and only add the delete cursor if the block is not deletable. Also add a grab cursor when it is not deletable so the cursor keeps the grab hand when over the toolbox.  This changes the toolbox api slightly, but the methods it touches are @package so it should be okay.
2017-12-04 10:36:47 -08:00
Sandeep Dubey
2dd8c1f669 Made the changes asked by the reviewer 2017-12-03 02:40:11 +05:30
Neil Fraser
eb796b71de Prevent selection of toolbox categories. 2017-11-13 15:30:33 -08:00
Rachel Fenichel
8a4d45f8fd Fix iOS toolbox flashing on tap (#1351) 2017-10-04 10:16:32 -07:00
picklesrus
859d63633e Fix #1275 by adding a more specific rule for overflow:visible on the … (#1280)
* Fix #1275 by adding a more specific rule for overflow:visible on the drag surface svg.  This wins out over a common bootstrap rule that says: svg:not(:root) {overflow:hidden} and helps avoid a difficult problem for Blockly users to diagnose.

* Update css.js
2017-08-15 13:20:51 -07:00
picklesrus
48a5270072 Fix #1077 by adding a rule to cover the toolbox labels too. (#1099) 2017-05-12 11:29:52 -07:00
Rachel Fenichel
98914fcf6b Dragging changes, rebased on develop (#1078)
* Add block drag surface translateSurfaceBy

* Add dragged connection manager

* Add gesture.js

* Add GestureHandler

* Implemented gesture skeleton

* Most basic workspace dragging

* Add dragged connection manager

* cleanup

* doc

* more cleanup

* Add gesture handler

* Add translateSurfaceInternal

* core/block_dragger.js

* cleanup

* Pull in changes to dragged connection manager

* Pull in changes to dragged connection manager

* comments

* more annotations

* Add workspace dragger

* Add coordinate annotations

* Start on block dragging

* Limit number of concurrent gestures

* Add some TODOs

* start using dragged connection manager

* Set origin correctly for dragging blocks

* Connect or delete at the end of a block drag.

* cleanup

* handle field clicks and block + workspace right-clicks

* move code into BlockDragger class, but still reach into Gesture internals a lot

* Clean up block dragger

* Call blockDragger constructor with correct arguments

* Enable block dragging in a mutator workspace

* Add workspace dragger

* click todos

* Drag flyout with background

* more dragging from flyout

* nit

* fix dragging from flyouts

* Remove unused code and rename gestureHandler to gestureDB

* Rename gesture handler

* Added some jsdoc in gesture.js

* Update some docs

* Move some code to block_svg and clean up code

* Lots of coordinate annotations

* Fix block dragging when zoomed.

* Remove built files from branch

* More dragging work (#1026)

-- Drag bubbles while dragging blocks
-- Use bindEventWithChecks to work in touch on Android. Not tested anywhere else yet.
-- Handle dragging blocks while zoomed
-- Handle dragging blocks in mutators
-- Handle right-clicks (I hope)
-- Removed lots of unused code

* More dragging work (#1048)

- Removed gestureDB
- Removing uses of terminateDrag
- Cleaned up disposal code

* Dragging bugfixes (#1058)

- Get rid of flyout.dragMode_ and blockly.dragMode_
- Make drags from the flyout start from the top block in the group
- Block tooltips from being scheduled or shown during gestures
- Don't resize mutator bubbles mid-drag

* Fix events in new dragging (#1060)

* rebuild for testing

* unbuild

* Fix events

* rebuild

* Fix up cursors

* Use language files from develop

* Remove handled TODOS

* attempt to fix IE rerendering bug, and recalculate workspace positions on scroll

* Rebuild all the things

* Comment cleanup; annotations; delete unused variables.
2017-05-05 12:42:53 -07:00