* Execute pys-on* events when triggered, not at load
Mimicing the behavior of Javascripts 'onLoad' event, we should
not be executing the use code at page-load time, only when
the event is triggered.
* Update examples to new syntax
* Fix merge issue
* Await running event handler code
* Restore pys-on* events with original behavior, deprecation warning
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* xfail toga example
* Add missing { (typo)
* Adjust callback chandling to make linter happy
* Change alpha to latest (#760)
* Don't create custom elements in main and fix various small issues on tests (#747)
* Create custom elements when the runtime finishes loading
* Remove xfails and fix repl integration test
* Fix commented ignore
* Address Antonio's comments
* Fix bad rebase
* Make ure to wait for repl to be in attached state before asserting content
* Move createCustomeElement up so it runs before we close the loader, xfail flaky d3 test
* Fix xfail
* [pre-commit.ci] pre-commit autoupdate (#762)
updates:
- [github.com/pre-commit/mirrors-eslint: v8.23.0 → v8.23.1](https://github.com/pre-commit/mirrors-eslint/compare/v8.23.0...v8.23.1)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* change documentation to point to latest instead of frozen alpha (#764)
* Toga example is xpass
* Correct 'xpass' to 'xfail' mark
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Peter W <34256109+pww217@users.noreply.github.com>
Co-authored-by: Fábio Rosado <fabiorosado@outlook.com>
* Create custom elements when the runtime finishes loading
* Remove xfails and fix repl integration test
* Fix commented ignore
* Address Antonio's comments
* Fix bad rebase
* Make ure to wait for repl to be in attached state before asserting content
* Move createCustomeElement up so it runs before we close the loader, xfail flaky d3 test
* Fix xfail
This PR tries to improve and rationalize what we log. Key points:
- introduce `logger.ts`: each file/component is encouraged to use the logger instead of writing directly to `console.*`
* the logger automatically prepend a prefix like `[py-config]`, `[py-env]` which make it easier to understand where a certain message is printed from
* it provide a central place where to add more features in the future. E.g., I can imagine having a config setting to completely silence the logs (not implemented yet)
- use the new loggers everywhere
- write to `.info()` instead of `.log()`. The idea is to keep `console.log` free, so that for the users it's easier to tell apart their own messages and the pyscript ones
- generally improve what we log. This is an endless exercise, but I tried to print more things which are useful to understand what's going on and in which order the various things are executed, and remove prints which were clearly debugging leftovers
* Add more integration tests for py-components and examples
for more information, see https://pre-commit.ci
* remove xfail mark since we merged fix for issue 707
Co-authored-by: Fabio Pliger <fabio.pliger@gmail.com>
* move current integration tests to the integration folder
* move pyscript.py into its own python folder
* change the path for python unit testing files
* change pyscript.py path
* Update Makefile
* remove echo
* replace conda run with pytest directly
* oops, add python test files I embarrassingly forgot to add
Co-authored-by: Peter W <34256109+pww217@users.noreply.github.com>