Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add shadow blocks for connection checks and real colour block #2307

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

maribethb
Copy link
Contributor

@maribethb maribethb commented Apr 3, 2024

The basics

The details

Resolves

Fixes #2301

Proposed Changes

  • Adds shadow blocks for "value" and "statement" blocks (automatically adds shadow state if you change the dropdown value to one of these)
  • Spawns a real colour block when creating a new block. See issue for rationale of real vs shadow here

Reason for Changes

Test Coverage

Documentation

Additional Information

Screenshot 2024-04-03 at 3 34 35 PM

The new shadow blocks are in the blue "input" blocks. If the dropdown is set to "value" or "statement" this PR adds the shadow blocks. If the dropdown is set to "dummy" or "end-row" those types of inputs do not have connections, therefore they do not have the connection check input on the block and don't get the new shadow state.

The new colour block is connected to the "colour" input on the factory base block, at the very bottom of this screenshot

@maribethb maribethb requested a review from a team as a code owner April 3, 2024 22:20
@maribethb maribethb requested review from rachel-fenichel and removed request for a team April 3, 2024 22:20
@rachel-fenichel
Copy link
Collaborator

Can I get a screenshot so I can see which shadow blocks you're talking about?

@maribethb
Copy link
Contributor Author

Updated PR desc with screenshot

@maribethb maribethb merged commit 750aa45 into google:developer-tools Apr 3, 2024
9 checks passed
maribethb added a commit to maribethb/blockly-samples that referenced this pull request Jun 12, 2024
maribethb added a commit that referenced this pull request Jun 28, 2024
* feat: add basic infrastructure of developer-tools

* chore: add eof newline where missing

* fix: formatting, license, css attributes

* feat: add block factory blocks and toolbox (#2155)

* feat: add block factory blocks and toolbox

* fix: pr comments

* fix: change type to connection check

* fix: formatting and comments

* chore: lint and format developer-tools (#2185)

* chore: autofix lint

* chore: manually fix most of the lint

* chore: format

* feat: add basic saving and loading and start block state (#2187)

* feat: add json definition generator (#2188)

* feat: add javascript definition generators for blocks (#2196)

* feat: add javascript definition generators for blocks

* chore: format

* fix: switch statement style

Co-authored-by: Christopher Allen <cpcallen+github@gmail.com>

* fix: update to latest blockly to use JavascriptGenerator class

* fix: fix img dropdown option

---------

Co-authored-by: Christopher Allen <cpcallen+github@gmail.com>

* feat: add controllers and models to switch between definitions (#2219)

* feat: add code header generation for imports and script tags (#2286)

* feat: add save, load, and delete functionality to dev-tools (#2285)

* feat: add save, load, and delete functionality to dev-tools

* chore: format

* chore: update load name

* feat: add generator stubs to block factory (#2295)

* feat: add generator stub generator and output

* feat: add generator headers

* chore: add more tsdoc

* chore: minor refactoring of template strings

* feat: save block factory settings (#2297)

* feat: save block factory settings

* chore: const to named functions

* feat: add ability to convert old block factory json to new (#2304)

* feat: add ability to convert old block factory json to new

* chore: format and use constant

* fix: use better typings, minor refactoring

* feat: add shadow blocks for connection checks and real colour block (#2307)

* feat: add file upload for block factory (#2320)

* feat: add file upload for block factory

* chore: fix questionable html formatting

* chore: rename and comments

* feat: add angle and colour fields to block factory (#2325)

* feat: add angle and colour fields to block factory

* fix: call register fields in script header

* feat: support uploading file from old block factory (#2336)

* feat: support uploading file from old block factory

* feat: support multiple file input, minor pr fixes

* feat: update to blockly v11 & improve style (#2388)

* fix: styling

* fix: changes for v11

* fix: set max height in narrow mode

* fix: min height of code divs

* chore: format

* chore: remove log

* feat: use a js legal name for the block in code output (#2392)

* feat: use a js legal name for the block in code output

* fix: legal js name probably

* feat: add help button and favicon (#2396)

* feat: include developer-tools when publishing to gh-pages (#2395)

---------

Co-authored-by: Christopher Allen <cpcallen+github@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants