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

Idyll Editor Variable Hoisting Issue #671

Open
megan-vo opened this issue Nov 17, 2020 · 0 comments
Open

Idyll Editor Variable Hoisting Issue #671

megan-vo opened this issue Nov 17, 2020 · 0 comments

Comments

@megan-vo
Copy link
Member

Describe the bug
In the Idyll Editor, inserting a variable between a pre-existing variable tag and a pre-existing non-variable tag seems to not hoist the new variable correctly and doesn't bind to other tags that refer to it.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://idyll-lang.org/editor
  2. Delete all the example text
  3. Type in:
[var name:"a" value:1 /]
[display value:a /]

This should render "1.00" correctly on the right hand side.

  1. Type [var name:"b" value:2 /] in between the two tags and change the display value to "b"
[var name:"a" value:1 /]
[var name:"b" value:2 /] // added 
[display value:b /] // change to "b"

The display will disappear and the change to the value "2" won't be registered

Expected behavior
Variables should be registered and usable regardless of where they are inserted in the editor (since they are hoisted by the compiler). In the example, the Display component should change to "2.00" and not go blank.

Screenshots
var_editor_bug

Additional context
From Gitter convo regarding adding a frequency variable to the sin chart example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants