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 file upload for block factory #2320

Merged
merged 3 commits into from
Apr 11, 2024

Conversation

maribethb
Copy link
Contributor

The basics

The details

Resolves

Works on #2291

Proposed Changes

  • Adds the ability to upload a file (which is expected to be downloaded from the legacy block factory tool) to import it into this tool
  • Compatible with drag and drop or file upload, and compatible with screenreaders
  • Will automatically find an unused name so you don't overwrite any currently saved blocks

Reason for Changes

migration from old to new tool

Test Coverage

Manually tested:

  • good file
  • various bad files
  • keyboard nav of buttons

Documentation

This will need documentation. After both tools have been updated I'll update devsite and then put a "help" link somewhere in this modal explaining where to get the file from

Additional Information

Screen.Recording.2024-04-09.at.5.09.33.PM.mov

@maribethb maribethb requested a review from a team as a code owner April 10, 2024 00:22
@maribethb maribethb requested review from BeksOmega and removed request for a team April 10, 2024 00:22
Copy link
Contributor

@BeksOmega BeksOmega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks butiful :D

examples/developer-tools/src/serialization.ts Show resolved Hide resolved
examples/developer-tools/src/controller.ts Show resolved Hide resolved
examples/developer-tools/src/controller.ts Outdated Show resolved Hide resolved
@maribethb maribethb merged commit 8a8ccdf into google:developer-tools Apr 11, 2024
7 checks passed
maribethb added a commit to maribethb/blockly-samples that referenced this pull request Jun 12, 2024
* feat: add file upload for block factory

* chore: fix questionable html formatting

* chore: rename 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