Commit graph

102 commits

Author SHA1 Message Date
Tim Mickel
b14a80738f Set checkboxes in drop-downs to scroll with menu (#632)
* Set checkboxes in drop-downs to scroll with menu

* Fix RTL support
2016-09-30 13:33:20 -04:00
Tim Mickel
a6f34ae519 Merge google/develop, recompile (#617)
* Check result of window.confirm before deleting variables.

* Create CONTRIBUTING.md

* Localisation updates from https://translatewiki.net.

* Cherrypick fixes made directly to master back into develop (#619)

* Check result of window.confirm before deleting variables.

* Create CONTRIBUTING.md

* rebuild

* Localisation updates from https://translatewiki.net.

* Minor wording change.

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* Simplify the handling of the active desc for a toolbox without categories.

* Remove tables from the HTML. Move the toolbar buttons to the end so that they don't impede switching between the toolbox and workspace.

* When cutting or copying a block, do not include blocks joined to it.

* Add shadow to flyout buttons.

* Move 'create new group' button to the bottom of each toolbox block, and remove other buttons if there is nothing in the workspace.

* Add keyboard shortcuts for cut, copy and paste operations.

* Remove clipboard buttons to simplify UI.

* Prevent setting a number value to NaN. Select the field value on entry to an input field. State the contents of the input field when describing the field.

* Add aria-level and aria-selected attrs to dropdowns.

* routine recompile

* Update demo to latest interpreter.

* Move 'move to marked spot' button to the top of the block options list.

* Fix incorrect aria-levels in toolbox tree component.

* Add new fields to toolbarButtonConfig.

* Recompile

* Remove CONTRIBUTING
2016-09-22 16:39:52 -04:00
Tim Mickel
b2c84cb802 Import procedures from Blockly (#595)
* Import procedures from Blockly

* Give mutators the dragSurface

* Draw a box behind non-shadow text fields

* ifreturn -> report

* Non-reporting proc -> next; reporting -> statement. Remove mutator for statement.

* Remove align_right in call

* Lints

* procedures_defnoreturn outputShape

* Revert rect CSS for event blocks
2016-09-16 18:29:15 -04:00
rachel-fenichel
1f9a92ff9f Merge pull request #570 from rachel-fenichel/feature/variable_management
Merge from google develop plus variable features.
2016-08-16 14:54:08 -07:00
Tim Mickel
340818dd4b Use sans-serif fonts in valueReportBox (#568) 2016-08-15 10:32:58 -04:00
Rachel Fenichel
4b5d4d4c26 Merge branch 'feature/variable_management' of https://github.com/google/blockly into feature/variable_management 2016-08-12 15:52:48 -07:00
Rachel Fenichel
c6ff049c92 Merge branch 'develop' into feature/variable_management 2016-08-12 14:39:32 -07:00
Rachel Fenichel
350e1ff2cc Merge remote-tracking branch 'upstream/develop' into feature/variable_management_merge_develop 2016-08-08 16:58:51 -07:00
Jean-Michel DECORET
927cabe992 Develop - Modals support (#512)
* * apply bootstrap3 integration fixes

* Injection subcontainer

Include svg and div into a master container, which allow css better
positioning (overflow scrolling problem)

* * Fix toolbox positioning (rtl and ltr). Because toolbox if relative to injection div, only adjust it to left (ltr) or right (rtl) edge

* * fix style (thanks to @NeilFraser)

* * revert msg files
2016-07-30 20:36:35 -07:00
Tim Mickel
b4826b4065 Draw squares for non-droppable dropdown fields (#551) 2016-07-27 16:29:02 -04:00
Tim Mickel
3f3862a5a8 Various tweaks to shape and size (#544)
* Align text by consistent baseline

* Helvetica

* CORNER_RADIUS in grid units

* Separate MIN_BLOCK_X for reporters from single-field shadows

* Update Blockly.BlockSvg.FIELD_WIDTH

* Remove padding on htmlInput

* Also apply border-radius to htmlInput_ to avoid weird edge effect in Chrome

* Update MIN_BLOCK_X to spec

* Fix horizontal sizing of blocks to include right corner.

* Add EDITABLE_FIELD_PADDING

This gives extra width to editable text fields.

* Add correct height for reporters

* Fix INLINE_PADDING_Y and reporter sizing to spec

* Remove unused case for input.renderWidth

* Instrument vertical rendering with right/left row padding.

* Revert renderWidth change

* Fix calculation of input shape widths

* Output padding to spec, fixing #376

* Update horizontal FIELD_TOP_PADDING for new dominant baseline

* Update padding language to be LTR/RTL neutral

* Remove broken RTL SEP_SPACE_X from input shape drawing
2016-07-26 11:52:05 -04:00
Tim Mickel
76e42b1690 Also inherit border-color on .arrowTop and .arrowBottom (#538) 2016-07-15 11:51:42 -04:00
Rachel Fenichel
18be9d1de8 Merge branch 'feature/variable_management' of https://github.com/google/blockly into feature/variable_management 2016-07-13 14:36:35 -07:00
Airhogs777
b494a0365e make blocklyDropDownArrow inherit background-color and border-color (#502) 2016-07-10 10:56:47 -04:00
Tim Mickel
51f38c0c95 Add basic value reporting that uses drop-down (#492)
* Add basic value reporting that uses drop-down

* Encode HTML entities for value reporting
2016-07-07 18:35:41 -04:00
Rachel Fenichel
cb3bef8f32 Flyout button with click handler 2016-07-07 14:37:12 -07:00
Tim Mickel
e8de0c46bf Only use "grabby" cursors when dragging (#498) 2016-07-07 15:53:50 -04:00
Tim Mickel
dd7f338c40 Temporary fix for page-breaking drop-downs (#495) 2016-07-07 13:48:37 -04:00
Tim Mickel
179b75da59 Basic fixes for FieldColour (#482)
* Fix field_colour's borderRect_ problem

* Use actual width and height instead of NBSPs

* Get corner radius from BlockSvg

* Improve colour picker CSS to not have borders
2016-07-06 20:38:05 -04:00
Tim Mickel
6b972ae7c8 Fix disabled menu style #474 (#477)
There was a missing comma in CSS
2016-07-06 15:56:39 -04:00
Rachel Fenichel
6539a634b6 Fix lots of small things in flyout.js 2016-06-24 14:32:58 -07:00
Rachel Fenichel
9fa9fd93c6 Merge branch 'develop' into feature/checkboxes_in_flyout 2016-06-23 16:14:41 -07:00
Tim Mickel
051921e1a0 Fix up vertical text field editor (#415)
* Move animated FONTSIZE properties to horizontal/vertical-specific rendering

* Set FIELD_WIDTH_MAX_EDIT in vertical until we fix truncation problem

* Conditional animation/truncation of field_textinputs

* Tinker with constants to get things in the right position

* Adjust FIELD_WIDTH_MAX_EDIT

* Prefix FONTSIZE_INITIAL and FONTSIZE_FINAL

* Fix no-op
2016-06-15 18:08:32 -04:00
Tim Mickel
25e80c2d09 Straw-man implementation of text drop-downs (#407)
* Refactor drop-down positioning to encapsulate block positioning

Moves block-positioning logic to the DropDownDiv class. Since icon menus use a special offset for the secondary mode, add an option for that.

* Swap out field_dropdown's use of WidgetDiv with DropDownDiv

* Update CSS for goog-menus in DropDownDivs

* Fix hiding behavior when showEditor_ is called again
2016-06-14 17:08:14 -04:00
Tim Mickel
85578d8c7c Color fixes for text drop-down menus (#403)
* Add class for drop-down text colour; remove arrow special case

* Use secondary colours in drop-down blocks

* Add comment about updateTextNode_ resetting the class
2016-06-13 19:06:12 -04:00
Rachel Fenichel
4139656a7a first pass at checkboxes in the flyout 2016-06-09 14:00:40 -07:00
Rachel Fenichel
53d9c6b351 Merge branch 'develop' of https://github.com/google/blockly into feature/pull_upstream_6_01 2016-06-06 11:14:48 -07:00
Rachel Fenichel
06b9bb68e6 Rename knob to handle 2016-05-27 10:25:19 -07:00
Rachel Fenichel
59e065ae5b Merge branch 'develop' of https://github.com/google/blockly into feature/merge_upstream_horizontal_toolbox 2016-05-23 13:07:11 -07:00
Rachel Fenichel
77a8b92ac2 Merge branch 'develop' into feature/horizontal_toolbox_port 2016-05-11 11:44:38 -07:00
Katelyn Mann
ca16d1fefe An alternate (and less expensive) way to keep stuff outside of the blockly div
from getting selected. Use e.preventDefault instead of adding and removing
classes on mousedown and mouseup.  This keeps the browser from having to
potentially recacluate style on mousedown and mouseup events.
2016-05-04 19:12:38 -07:00
Tim Mickel
5dceb56127 Update padding on blocklyDropDownButton img (#303) 2016-04-27 13:22:07 -04:00
Tim Mickel
357ae3f7f2 Remove extra touch-callout and user-select from blocklyText (#296)
These were intended for the htmlInput, not the SVG blocklyText. Adding these in was causing the blocklyText element to get selected sometimes in webkit browsers.
2016-04-27 11:56:18 -04:00
Tim Mickel
50ff6e4654 Implement field_number stub and num-pad on mobile (#293)
* Implement basic field_number type

* Add whole number and positive number

* Remove bad arguments for showEditor_

* Basic implementation and styling of num-pad

* Remove virtual keyboards; add selection and read-only

* Add editing for the number pad

* Add backspace button to number pad

* Fix text padding for font-weight and extra magic

* Don't show decimal point for integers

* Re-update default WeDo numbers

* Refactor and improve documentation of field_number
2016-04-26 21:32:29 -04:00
Tim Mickel
99a2d9a549 Implement all WeDo blocks, new icons and assets
* Update all assets from Carl

* Update when-broadcast-received and dropdown sizes

* Update icon menu sizing

* Update padding on drop-down div

* Update WeDo and event blocks; defaults

* Update multi_playground and vertical_playground

* Recompile with CSS updates

* Updating default icon reference for wedo_motorspeed
2016-04-26 10:49:52 -04:00
Tim Mickel
cf6725ba4c Implement drop-down menus and icon picker field (#233)
* Icon menu and drop-down stubs

* Recompile 4/15

* Fix stubs to draw shadow block for drop-down

* Fix rendering of shadow for icon menu

* Add arrow to dropdown button

* Add drop-down buttons to rest of examples

* Implementation of drop-down div including positioning

* Drop-downs take colours from the blocks

* Fix scaled secondary position of drop-downs

* Fix arrow positioning for RTL

* Use SVG parentNode for sizing dropdown

* Use transform for drop-down positioning

* Add basic DropDownDiv hide

* Add animation-in to dropdown

* More subtle drop-down animation and shadow

* Add icon menu example

* Use options style of Blockly FieldImage for drop-down

* Add default value for iconmenu

* Add example hover, active states for iconmenu buttons

* Update dropdown_icon example

* Implement icon-menu value handling and default value

* Add updating the parent block image field to dropdown

* Drop-down animates out; add hooks to hide for various Blockly happenings

* Add pointer cursor for drop-down icons

* Improve documentation for drop-downs and minor refactor

* Factor out getSrcForValue in iconmenu

* Blocks take on the icon of their icon-menu

* Add basic accessibility properties, similar to closure

* Remove extra drop-down example; update playgrounds

* Remove unnecessary colour overrides

* Add onHide, colour changing, fix references in dropdowndiv

* Flip arrow when the drop-down is rendered above

* Hide the icon menu drop-down on second tap of button

* Add preventDefault to button ontouchstart

* Updates to drop-down from Carl

* Add icon-menu placeholders and a crazy demo

* Fix naming to normalize (drop-down, DropDown)

* Add license header
2016-04-21 15:33:28 -04:00
Tim Mickel
33a71b112f Implement number and string field specs (#230)
* Animate the font-size of text fields

* Allow WidgetDiv to hide immediately, no animation

And add calls to this where the div animation may become out of sync with the field itself.

* Fix CSS colour substitution to replace all

* Add box-shadow to text field

* Fix padding on blocklyHtmlInput

* Add utility for measuring text using canvas

* Grow the input textbox based on the text size

* Fix the text field width to a maximum depending on render mode

* Fix text input field height for scaling

* Position text input field based width

* Animate out width, height, margin of text input

* Fix scale of marginLeft and extra 1px

* Fix height, padding, font-weight on text input field

* Make input field text smaller on truncation per spec

* Re-apply change to Blockly.WidgetDiv.disposeAnimationTimer_

* Add comment to Blockly.Field.maxDisplayLength
2016-04-15 16:44:30 -04:00
Tim Mickel
62509d41ad Slight refactor of colour handling; add additional properties (#218)
* Add and render opacity of blocks

* Add insertion marker colour and opacity

* Add goog.require for Colours in block.js

* Add color of text field during editing

* Add colour overriding upon injection

* Add colours to CSS at run-time injection

* Expand colour variables to include toolbox, flyout, scrollbars

* Example of dark mode in horizontal_playground

* Fix loop style for colours
2016-04-14 18:04:17 -04:00
Tim Mickel
0336aa0347 Remove width/height from blocklyDragSurface (#214)
This was causing issue on iOS Safari when the SVG was exceeding the size of the window
2016-04-13 17:22:41 -04:00
Tim Mickel
0408c9f695 Bugfix/no cursors on touch (#212)
* Don't switch mouse cursor on mobile

* Add goog.userAgent to require
2016-04-13 16:38:44 -04:00
Tim Mickel
003083ac80 Add width and height to drag layer (#195)
Requiring overflow was causing unnecessary repaints.
2016-04-11 16:16:27 -04:00
Tim Mickel
fa9b710c5a Add !important to blocklyDragSurface overflow
normalize.css in our demo was resetting this property.
2016-04-08 16:10:12 -04:00
Tim Mickel
15ed57e7aa Merge branch 'develop' into feature/drag-surface
# Conflicts:
#	core/block_svg.js
2016-04-08 14:41:45 -04:00
rachel-fenichel
a4bdede170 Fix scrollbar positioning and category ordering 2016-04-07 14:02:22 -07:00
rachel-fenichel
9d82bf3a18 lint 2016-04-07 14:02:22 -07:00
rachel-fenichel
18a1550285 Horizontal toolbox layout with positioning at start or end. 2016-04-07 14:02:22 -07:00
Tim Mickel
382a1f4f82 Keep text-input widget div options to CSS class 2016-04-06 21:01:55 -04:00
Tim Mickel
2fc35e5797 Add comments and CSS style for field refactor 2016-04-05 20:43:54 -04:00
Tim Mickel
154d4e1851 Draw text fields entirely using CSS during edit 2016-04-05 18:36:02 -04:00
Tim Mickel
bc75b84aa8 Resize drag surface using only CSS 2016-04-02 16:24:47 -04:00