Comments (6)
The integration went quite well and easy. But now I've run into a blocker: Elements like ui.scene, ui.keyboard and ui.joystick are not working correctly on the GitHub Action. Locally they pass as expected. On GitHub instead of the expected template from their Vue components they just appear as elements like <keyboard></keyboard>
or <joystick></joystick>
without any functionality.
from nicegui.
Might be a routing issue for their dependencies. If, e.g., keyboard.js is not found, a keyboard element will only insert <keyboard></keyboard>
in the DOM.
from nicegui.
Very good, @falkoschindler. It seems that somehow the component response is wrapped in a html container. If I query /keyboard.js
it returns
<html>
<head>
<meta content="light dark" name="color-scheme"/>
</head>
<body>
<pre style="word-wrap: break-word; white-space: pre-wrap;">Vue.component("keyboard", {
template: `<span data-nicegui='keyboard' v-bind:id="jp_props.id" :class="jp_props.classes" :style="jp_props.style"></span>`,
mounted() {....
instead of the expected
Vue.component("keyboard", {
template: `<span data-nicegui='keyboard' v-bind:id="jp_props.id" :class="jp_props.classes" :style="jp_props.style"></span>`,
mounted() {....
from nicegui.
No! The above observation is incorrect. The "wrapping" happend because I used BeautifulSoup to display the content. ::facepalm::
I verified with the "requests" lib that /keyboard.js
indeed delivers the Vue component as expected. After I got the javascript console from Selenium to show up in the logs, the error is obvious:
http://localhost:3392/static/keyboard.js - Failed to load resource: the server responded with a status of 404 (Not Found)
But why is the component accessed via /static
instead of /
?
from nicegui.
I finally found the problem: run.py imported globals.py before setting the template directory. But globals.py imported justpy for type annotations. Therefore justpy setted its directories before we could modify them as necessary. Fixed in 4fd338b.
from nicegui.
All green :-)
from nicegui.
Related Issues (20)
- `Uncaught TypeError: Cannot set properties of undefined (setting 'Matter')` while initializing a custom Vue component
- how to get ui.label value HOT 1
- Infinite_scroll example broken on Safari HOT 5
- Nesting cards merges the elements HOT 6
- How to read Clipboard'image in my page ,uploader? or others module?
- Updating NiceGUI broke existing project with "missing client_id" error HOT 2
- Significant issue version 1.4.8 in windows HOT 1
- ui.code copy button inside ui.card dialog overlaps content HOT 5
- Documentation page automatically refreshes HOT 12
- Large number of bindings will block the main loop HOT 3
- How to integrate pyecharts with JScode in tooltip?
- The imported file was executed twiceγ
- Make Slot class better
- Plotly double click to zoom out doesn't work HOT 2
- Internal Server Error : Upgrade from 1.4.7 to 1.4.9 HOT 3
- EChart collapses when nested in a row element HOT 6
- AttributeError: 'WindowsPath' object has no attribute 'with_stem' HOT 3
- how to create a neural network graph like netron? HOT 1
- nicegui ui.dialog slow/not smooth on Firefox on Android HOT 4
- Performance issues in `binding.py`'s `remove` function causing high CPU usage HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nicegui.