Skip to content

add arduino_functions block restriction and improvement of board-spec… #453

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

Open
wants to merge 5 commits into
base: development
Choose a base branch
from

Conversation

georgi-s
Copy link
Contributor

@georgi-s georgi-s commented Apr 15, 2025

…ific instance limits

Adds security measures for the arduino_functions block:

  • Prevents adding to the backpack (isBackpackable)
  • Prevents dragging the block (onDragStart)
  • Prevents deleting the block (isDeletable)
  • Prevents duplicating the block (isDuplicatable)
  • Prevents copying the block (isCopyable)
  • Prevents pasting the block (isPasteable)
  • Prevents moving the block (isMovable)
  • Prevents editing the block (isEditable)

These changes ensure that the arduino_functions block, which contains the setup() and loop() functions, can only exist once in the workspace and cannot be accidentally tampered with.

Copy link

Tests

Test Name Status Flaky Duration
Blockly Editor Page Tests [Blockly] visits the editor page 1.0s
Blockly Editor Page Tests [Blockly] visits the tutorial page 179ms
Blockly Editor Page Tests [Blockly] visits the gallery page 137ms
Blockly Editor Page Tests [Blockly] visits the faq page 131ms
Blockly Editor Page Tests [Blockly] visits the settings page 126ms
Blockly Editor Page Tests [Blockly] visits the login page 126ms
Blockly Editor Page Tests [Blockly] navigates to tutorial and back 13.9s
Blockly Editor Page Tests [Blockly] selects senseBox ESP 716ms
Blockly Editor Page Tests [Blockly] selects senseBox MCU 806ms
Blockly Editor Page Tests [Blockly] selects senseBox Mini 655ms
Blockly Editor Page Tests [Blockly] compiles code 9.2s
Code Editor Page Tests [CodeEditor] visits the code editor page 1.3s
Code Editor Page Tests [CodeEditor] selects senseBox ESP 469ms
Code Editor Page Tests [CodeEditor] compiles code 632ms
Code Editor Page Tests [CodeEditor] opens reset dialog 630ms
Code Editor Page Tests [CodeEditor] fetches libraries 1.4s

Github Test Reporter by CTRF 💚

Copy link

Tests

Test Name Status Flaky Duration
Blockly Editor Page Tests [Blockly] visits the editor page 1.0s
Blockly Editor Page Tests [Blockly] visits the tutorial page 171ms
Blockly Editor Page Tests [Blockly] visits the gallery page 141ms
Blockly Editor Page Tests [Blockly] visits the faq page 130ms
Blockly Editor Page Tests [Blockly] visits the settings page 125ms
Blockly Editor Page Tests [Blockly] visits the login page 122ms
Blockly Editor Page Tests [Blockly] navigates to tutorial and back 3.8s
Blockly Editor Page Tests [Blockly] selects senseBox ESP 791ms
Blockly Editor Page Tests [Blockly] selects senseBox MCU 625ms
Blockly Editor Page Tests [Blockly] selects senseBox Mini 556ms
Blockly Editor Page Tests [Blockly] compiles code 10.1s
Code Editor Page Tests [CodeEditor] visits the code editor page 1.4s
Code Editor Page Tests [CodeEditor] selects senseBox ESP 456ms
Code Editor Page Tests [CodeEditor] compiles code 615ms
Code Editor Page Tests [CodeEditor] opens reset dialog 597ms
Code Editor Page Tests [CodeEditor] fetches libraries 1.4s

Github Test Reporter by CTRF 💚

Copy link

Tests

Test Name Status Flaky Duration
Blockly Editor Page Tests [Blockly] visits the editor page 970ms
Blockly Editor Page Tests [Blockly] visits the tutorial page 175ms
Blockly Editor Page Tests [Blockly] visits the gallery page 140ms
Blockly Editor Page Tests [Blockly] visits the faq page 123ms
Blockly Editor Page Tests [Blockly] visits the settings page 125ms
Blockly Editor Page Tests [Blockly] visits the login page 120ms
Blockly Editor Page Tests [Blockly] navigates to tutorial and back 13.9s
Blockly Editor Page Tests [Blockly] selects senseBox ESP 657ms
Blockly Editor Page Tests [Blockly] selects senseBox MCU 633ms
Blockly Editor Page Tests [Blockly] selects senseBox Mini 609ms
Blockly Editor Page Tests [Blockly] compiles code 11.0s
Code Editor Page Tests [CodeEditor] visits the code editor page 1.4s
Code Editor Page Tests [CodeEditor] selects senseBox ESP 473ms
Code Editor Page Tests [CodeEditor] compiles code 608ms
Code Editor Page Tests [CodeEditor] opens reset dialog 613ms
Code Editor Page Tests [CodeEditor] fetches libraries 1.4s

Github Test Reporter by CTRF 💚

@georgi-s
Copy link
Contributor Author

– Implementation of detailed backpack configuration with custom options and event handlers.
– Addition of logic for validating and managing blocks, especially for "arduino_functions" type blocks.
– Improvement of translation management and UI updates based on the selected language.
– Introduction of logging statements that are only output in development mode to reduce debugging information.
– Improvement of code structure and readability by adding comments and separating logic into different methods.

- Test now searches for both possible reset button texts
- Supports both English ("Reset code") and German ("Code zurücksetzen") translations
- Uses regular expressions for flexible text searches
- Improves the robustness of the test across different language settings
- Test now searches for both possible reset button texts
- Supports both English ("Reset code") and German ("Code zurücksetzen") translations
- Uses regular expressions for flexible text searches
- Improves the robustness of the test across different language settings
Copy link

Tests

Test Name Status Flaky Duration
Blockly Editor Page Tests [Blockly] visits the editor page 942ms
Blockly Editor Page Tests [Blockly] visits the tutorial page 160ms
Blockly Editor Page Tests [Blockly] visits the gallery page 130ms
Blockly Editor Page Tests [Blockly] visits the faq page 119ms
Blockly Editor Page Tests [Blockly] visits the settings page 120ms
Blockly Editor Page Tests [Blockly] visits the login page 122ms
Blockly Editor Page Tests [Blockly] navigates to tutorial and back 14.0s
Blockly Editor Page Tests [Blockly] selects senseBox ESP 822ms
Blockly Editor Page Tests [Blockly] selects senseBox MCU 808ms
Blockly Editor Page Tests [Blockly] selects senseBox Mini 711ms
Blockly Editor Page Tests [Blockly] compiles code 10.1s
Code Editor Page Tests [CodeEditor] visits the code editor page 1.3s
Code Editor Page Tests [CodeEditor] selects senseBox ESP 470ms
Code Editor Page Tests [CodeEditor] compiles code 625ms
Code Editor Page Tests [CodeEditor] opens reset dialog 625ms
Code Editor Page Tests [CodeEditor] fetches libraries 1.8s

Github Test Reporter by CTRF 💚

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.

None yet

1 participant