dvargas92495 / SmartBlocks

Useful examples from developer community for Roam42 SmartBlocks
147 stars 7 forks source link

<%NOTIFICATION:%> creates empty blocks on the page where called #105

Closed eatondpe closed 3 years ago

eatondpe commented 3 years ago

🐞 Describe the behavior of the bug/issue you are encountering

<%NOTIFICATION:5,Press the counter button to complete the reset.%> adds 1 new block on the page where called. <%NOTIFICATION:5,Press the counter button<br/>to complete the reset.%> adds 2 new blocks on the page where called.

💻 Environment

Platform: Windows

Browser: Brave

✔️ Describe what you think the Expected Behavior should be

The Notification command should produce the notification toast and nothing else. No blocks on the page should be created or modified by this command.

📜 Steps to reproduce the issue you are having

  1. Create a SmartBlock called "NotifyTest" with the following:
  2. From any page activate this SmartBlock by entering ";;NotifyTest".
  3. Observe new blocks being added to that page.

🔨 Describe any workarounds you've created/discovered

No known workarounds.

Adding NOBLOCKOUTPUT fails to produce the toast.

📷 Additional Info (Errors, Screenshots, GIFs, etc.)

https://www.loom.com/share/9e1fdf5bc45d40a48b9e7cc0d0394465


[label_bug]

TfTHacker commented 3 years ago

David so true. Output gets some extra blocks. However, I did some testing and it seems if you add <%NOBLOCKOUTPUT%> to the notification block it won't output, even with multiple notification instances.

eatondpe commented 3 years ago

In my tests, adding <%NOBLOCKOUTPUT%> to the the notification ...

<%NOTIFICATION:5,Press the counter button<br/>to complete the reset.%><%NOBLOCKOUTPUT%>

... also causes it to not present the notification.

https://www.loom.com/share/b093e3dc83cb4cd9ae7f7b2cabab74cd