openroberta-lab icon indicating copy to clipboard operation
openroberta-lab copied to clipboard

Variable names should be defined properly

Open rishabhdeepsingh opened this issue 4 years ago • 9 comments

This bug needs frontend and backend changes. To Reproduce Steps to reproduce the behavior:

  1. Click on the + begore the start block on the main page.
  2. type with two spaces "spacespacefor(int i = 0; i < 10; ++i)" without quotes.
  3. Press Click anywhere on the screen.

Expected behavior

  • Error or warning showing that invalid variable name.

Screenshots Screenshot 2020-03-30 at 6 26 15 PM Screenshot 2020-03-30 at 6 26 38 PM

Device information

  • Type Desktop
  • OS: Catalina 10.15.3
  • Browser chrome Version 80.0.3987.149 (Official Build) (64-bit)

Additional context

  • The possible workout would be to add a RegEx checker for the variable name, and if the variable name is not following RegEx a warning should be shown.

rishabhdeepsingh avatar Mar 30 '20 13:03 rishabhdeepsingh

There are checkers, both on frontend and backend site. I cannot reproduce this behaviour. Will check it on browser stack

bjost2s avatar Mar 31 '20 18:03 bjost2s

Could you please make a screenshot after clicking somewhere else than in the variables name field and put it in here?

bjost2s avatar Mar 31 '20 18:03 bjost2s

The error comes when you click anywhere on the screen. PS: I have updated that above. Screenshot 2020-04-01 at 4 07 31 AM

rishabhdeepsingh avatar Mar 31 '20 22:03 rishabhdeepsingh

which robot have you chosen?

bjost2s avatar Apr 01 '20 04:04 bjost2s

I have selected the EV3 but it works for other robots as well. It shows up when you directly click on the reload code option in the source code view sidebar.

Screenshot 2020-04-03 at 3 33 46 AM

rishabhdeepsingh avatar Apr 02 '20 22:04 rishabhdeepsingh

Thank you very much, now I can reproduce it! Seems that validators in blockly are not triggered, but validators on backend side should catch this

bjost2s avatar Apr 03 '20 05:04 bjost2s

@bjost2s Can you refer to some files where I can find the variable name tester part for this issue? I tried finding some files but could not find the direct link to the variable name checker.

rishabhdeepsingh avatar Apr 12 '20 23:04 rishabhdeepsingh

@rishabhdeepsingh, it seems that we do not have a variable name tester at the backend yet. It should be implemented as part of the empty checker, see #306.

bjost2s avatar Apr 14 '20 10:04 bjost2s

Let me know If I can contribute on this one and where.

rishabhdeepsingh avatar Apr 14 '20 18:04 rishabhdeepsingh

works

bjost2s avatar Apr 11 '23 10:04 bjost2s