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

Cannot edit PyBricks block textboxes with WebBLE on IPad #62

Open
ralrivera opened this issue Dec 4, 2024 · 4 comments
Open

Cannot edit PyBricks block textboxes with WebBLE on IPad #62

ralrivera opened this issue Dec 4, 2024 · 4 comments

Comments

@ralrivera
Copy link

Describe the bug
WebBLE is the only browser so-far that I have been able to connect with a Pybricks hub with on an IPad. Creating and deploying code works great! The only problem encountered so far is that you cannot edit text values of textboxes in blocks. We haven't tested every block, but it happens with set-up blocks names, motor power values, comparison values, & variable names/values. This is not the case with other IPad browsers. Chrome & Bluefy both can edit block textboxes when tested on the same IPad. The issue persists after restarting the program and restarting the IPad.

This happens both when using just the touch screen and when an external keyboard/trackpad is used.

To reproduce
Steps to reproduce the behavior:

Go to code.pybricks.com or beta.pybricks.com with the WebBLE app on an IPad
Create a new blocks project
click on the default "Hello, Pybricks!" textbox within the print block to edit it.
No keyboard or input method is displayed to edit.
click setup to add a hub block
drag and connect to setup stack
try to edit the Hub's name and get similar results to steps 3-4 above
Expected behavior
An input window should appear where you can type the desired value using a physical keyboard or a virtual keyboard should appear to input a value if no keyboard is present

Screenshots
None of the white 'greyed out' name boxes in setup or any of the white textboxes were able to be edited. All of the drop-down controls worked as expected.

image

Extra Info
WebBLE Version - 1.7.0
IPadOS Version - 17.5.1
Also created a Pybricks report: pybricks/support#1963

@laurensvalk
Copy link

Does it show any errors in the console?

Do you see similar issues in the upstream Blockly version, separate from Pybricks? You can try it here: https://blockly-demo.appspot.com/static/tests/playgrounds/advanced_playground.html

@ralrivera
Copy link
Author

ralrivera commented Dec 10, 2024

Is the console the output on the bottom you see after hitting the button with the left justified lines? It says "creating code completion worker" & "code completion engine is ready". No other message pops up as I try to edit the text boxes.

The same issue occurs at the blocky link provided. All of the 'editable' boxes in the attached screenshot were not accessible in WebBLE but worked when tried on other browsers on the same IPad. The 'undefined is not an object' error seemed to be present in other browsers as well.

One additional issue with the blockly site was that more than one variable could not be created. When you hit the new variable button in other browsers, a dialog box would open for you to name the variable. With WebBLE, no dialog box shows up to name it. Eventually a variable named 'x' appeared, I assume that is the default name after timing out waiting for a name. No other variable was able to be made through WebBLE since that dialog box does not appear. You also are unable to rename the variable since a dialog box does not show up when you click the variable name on the grid and hit 'rename'.

@ralrivera
Copy link
Author

image

@laurensvalk
Copy link

Is the console the output on the bottom you see after hitting the button with the left justified lines? It says "creating code completion worker" & "code completion engine is ready". No other message pops up as I try to edit the text boxes.

Indeed, these are the expected messages.

The same issue occurs at the blocky link provided. All of the 'editable' boxes in the attached screenshot were not accessible in WebBLE but worked when tried on other browsers on the same IPad.

Thanks, this is good to know. This will make it a bit easier to dig in since this is open source. Maybe WebBLE does not support text entry in some input elements yet?

The 'undefined is not an object' error seemed to be present in other browsers as well.

Right. Don't worry about these particular messages. This is only about code generation, not block editing.

One additional issue with the blockly site was that more than one variable could not be created. When you hit the new variable button in other browsers, a dialog box would open for you to name the variable. With WebBLE, no dialog box shows up to name it. Eventually a variable named 'x' appeared, I assume that is the default name after timing out waiting for a name. No other variable was able to be made through WebBLE since that dialog box does not appear. You also are unable to rename the variable since a dialog box does not show up when you click the variable name on the grid and hit 'rename'.

Ah. In Pybricks we avoid "alerts" and "input" modal popups, but Blockly uses these as the default.

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

No branches or pull requests

2 participants