[BUG REPORT] Basic Rule 1.0: Brackets in Rule Name

Basic Rule UI bug:

  • If a Basic Rule has [square brackets] in its name, then it will be impossible to edit that name.
  • It will also be impossible to change any of the dropdown menus.
  • The square brackets will also not appear in the Basic Rule's name in the Apps list.

Steps to reproduce:

  1. Create new Basic Rule.
  2. Add some automation steps (e.g., turn on a light at sunset).
  3. Select "Change the Basic Rule Name?"
  4. Put some [brackets] in the name of the rule.
  5. Save the rule (you make have to click "Done" several times).
  6. Go back to Apps and find the new Basic Rule (the brackets won't appear in the Apps list).
  7. Click on the new Basic Rule to edit it.
  8. In the Basic Rule, click inside the "Edit Name for Basic Rule" to text field to edit it.
  9. The text field will lose input focus before you can type.

This bug appears both in the desktop browser and in the mobile app. Looking more carefully in the desktop browser, it appears that when the Basic Rule name contains a square brackets, the App continually refreshes its main container (i.e., div#divMainUIContent > main) so quickly that any element that receives input focus loses that focus when it is removed from and readded to the DOM before it can receive any further events.

Note that the small bug of the brackets not appearing in the name shown in the Apps List also affects the Notifications and Smile Automation Rules apps, only in Basic Rules is there a problem with the editing UI.

Yeah, this is not really surprising. Nor will it be "fixed", other than possibly to remove any square brackets entered for a name right then. The documentation should be updated to note that they are not allowed in the rule name.

1 Like

It is a bit of a corner case, so that makes sense. Especially since Basic Rule users are less likely to have a complex system for naming their rules than, say, RM users...

Odd thing is, of all the built-in apps, only Basic Rule really breaks with square brackets. When I encountered this behavior, I tried all of them. As I noted, Notifications and Simple Automation Rules work fine but don't show the square brackets in the Apps list... and all the others, including RM, handle them perfectly fine. So whatever the corner case is, presumably an escaping issue, in is basically harmless except in Basic Rule.

It has to do with how Basic Rules invents a default name for the app, and some of the textual processing around that. That entails removing square brackets that would otherwise show up. So that processing was tangled up with the square brackets in the name. Basically, something stupid in the code. Easiest fix, already done, is just to remove any square brackets from the edited name.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.