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 block factory blocks and toolbox #2155

Merged
merged 4 commits into from
Jan 19, 2024

Conversation

maribethb
Copy link
Contributor

The basics

The details

Resolves

Works on new block factory.

Proposed Changes

Adds the block factory blocks.

These are largely copied directly from the old block factory. They have been converted to JS where applicable. They have also been converted to TypeScript and they use JSON serialization hooks.
The input and type blocks have been converted into just one block type that uses a mutator to switch between different types or input styles. This makes it easier to modify a block instead of having to recreate whole inputs or drag new blocks out.

I also created a theme instead of manually setting block styles like the old blocks did. I used the same colors as legacy block factory for continuity.

Blocks for the angle, multiline, and colour fields do not yet exist. Because they will need to use and output code related to the plugin fields (which may change in the near future also) these have been saved for a later PR.

Reason for Changes

Test Coverage

Documentation

Additional Information

@maribethb maribethb requested a review from a team as a code owner January 18, 2024 01:56
@maribethb maribethb requested review from BeksOmega and removed request for a team January 18, 2024 01:56
@BeksOmega
Copy link
Contributor

@maribethb did you mean to assign this to me on purpose?

@BeksOmega
Copy link
Contributor

oh sorry I thought it said you requested it, but nah it was assigned from the github bot.

examples/developer-tools/src/blocks/colour.ts Outdated Show resolved Hide resolved
examples/developer-tools/src/blocks/colour.ts Outdated Show resolved Hide resolved
examples/developer-tools/src/blocks/factory_base.ts Outdated Show resolved Hide resolved
examples/developer-tools/src/blocks/factory_base.ts Outdated Show resolved Hide resolved
examples/developer-tools/src/blocks/fields.ts Outdated Show resolved Hide resolved
examples/developer-tools/src/blocks/type.ts Outdated Show resolved Hide resolved
examples/developer-tools/src/blocks/type.ts Outdated Show resolved Hide resolved
examples/developer-tools/src/blocks/type.ts Outdated Show resolved Hide resolved
examples/developer-tools/src/blocks/type.ts Outdated Show resolved Hide resolved
examples/developer-tools/src/blocks/type.ts Outdated Show resolved Hide resolved
@maribethb
Copy link
Contributor Author

btw this probs needs to be reformatted but i have prettier stuff in a different PR so I'll just reformat it then.

@maribethb
Copy link
Contributor Author

ready for re-review

@maribethb maribethb merged commit 3d510a1 into google:developer-tools Jan 19, 2024
8 checks passed
maribethb added a commit to maribethb/blockly-samples that referenced this pull request Jun 12, 2024
* feat: add block factory blocks and toolbox

* fix: pr comments

* fix: change type to connection check

* fix: formatting and comments
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 <[email protected]>

* fix: update to latest blockly to use JavascriptGenerator class

* fix: fix img dropdown option

---------

Co-authored-by: Christopher Allen <[email protected]>

* 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 <[email protected]>
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