Skip to content

all: Implement output UI initialisation#106

Merged
juliaogris merged 3 commits intomasterfrom
evy-command-wasm
Mar 21, 2023
Merged

all: Implement output UI initialisation#106
juliaogris merged 3 commits intomasterfrom
evy-command-wasm

Conversation

@juliaogris
Copy link
Member

@juliaogris juliaogris commented Mar 16, 2023

Implement output UI initialisation from evy source code analysis:

  • show/hide canvas if there are some/no drawing functions in evy code.
  • show/hide read input text field
  • show/hide sliders

Update the parser.Program ast node to expose CalledBuiltinFuncs which
determine UI changes. Include eventhandler implementation in code analysis.

Note: there is a race condition when navigating back/forwards between
stopping the program and reinstantiating wasmInst for formatting / ui initialisation of new code.
wasmInst is asynchronously set to undefined after the wasm
execution has finished and called afterStop function.

@github-actions
Copy link

github-actions bot commented Mar 16, 2023

firebase-deployment: https://evy-lang--106-cvl3oeu5.web.app (4954f9a)

@juliaogris juliaogris force-pushed the evy-command-wasm branch 7 times, most recently from 464deff to 1634e81 Compare March 18, 2023 21:39
Copy link
Member

@camh- camh- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments...

Expose jsActions as "evy command" to wasm main as we have no other way
of argument passing to main in wasm. jsActions tells whether to format,
evaluate or both. In a follow-up commit we will add the optional action
"ui", to initialise UI according to code needs.
Implement output UI initialisation from evy source code analysis:
* show/hide canvas if there are some/no drawing functions in evy code.
* show/hide read input text field
* show/hide sliders

Update the parser.Program ast node to expose `CalledBuiltinFuncs` which
determine UI changes. Include eventhandler implementation in code
analysis.
@juliaogris juliaogris force-pushed the evy-command-wasm branch 2 times, most recently from ee4e0f4 to 84b5155 Compare March 21, 2023 04:50
@juliaogris juliaogris requested a review from camh- March 21, 2023 04:54
@juliaogris juliaogris force-pushed the evy-command-wasm branch 3 times, most recently from ccfbabb to 1643e4f Compare March 21, 2023 05:15
Add forceYield utility to sleepingYielder in wasm package, rather than
calling yielder.Sleep(minSleepDur). This makes main.go independent of
the minSleepDur constant and is probably a better name for the intent.
Copy link
Member

@camh- camh- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥗

@juliaogris juliaogris merged commit 5fd5cfc into master Mar 21, 2023
@juliaogris juliaogris deleted the evy-command-wasm branch March 21, 2023 05:23
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

Successfully merging this pull request may close these issues.

2 participants