Git Product home page Git Product logo

webxdc-dev's People

Contributors

adbenitez avatar benji-york avatar faassen avatar hpk42 avatar r10s avatar ralphtheninja avatar septias avatar simon-laux avatar wofwca avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

webxdc-dev's Issues

Unable to start dev server

I would like to help developing webxdc-dev but I'm unable to even start the basic project:

image

Steps to reproduce:

  • pnpm install
  • pnpm run dev -- run /home/sebastian/coding/hello/hello.xdc

I'm running node v. 18.7 which might cause problems?

feat: auto-start app instances

It's a bit annoying that you have to manually press the "start" button, so maybe makes sense to add a front-end option to do this automatically. It should default to true.

image

New release?

There are some long-unreleased changes. Looks like we can release them by simply pushing a tag.

I have the permission to do this, but I want someone's approval.

Apps can't `fetch()` anything

Reproduction

  1. Create an app that executes fetch('/index.html').then(console.log)
  2. Serve the app on a local server. Say, python -m http.server 8000.
  3. webxdc-dev run http://localhost:8000.

Expected result

fetch succeeds.

Actual result

fetch fails because of connect-src CSP: default-src 'self' ;connect-src ws://localhost:7001 ws://localhost:8000.

Extra info

I think 'self' should be present it connect-src, I don't know why it's just ws://.

previous updates should appear on other device too

expected: app has all previous state updates, even if the update was sent before the instance was opened/started
actual: app only has updates from the time it was active, and on reload it looses all state.

Devices flickering

When I hover the second devices start-button, the device begins to flicker and can not be activated.
For me it looks like if the device got a litte wider which makes it wrap to the next row. When wrapped the device is no longer under the mouse and the button is therefore not hovered, which makes the thing go small again and return to it's old place. This periodic sequence produces a flickering perception of the second device.
This problem also only occures on the basic zoom-level where the two devices fill the available space close to perfectly. When zoomed which gives the devices more room, no flickering occures.

No screenshot on npmjs.com

image

Idk if it's something that needs fixing. Maybe it's not worth packaging effectively useless stuff inside the npm package to save space.

idea: set favicon to webxdc's icon

might need some conversion from png/jpg to ico, to use the fact that browsers look for favicon.ico
If that would work we don't need to inject any header html tags, which might be more complicated, but on the other hand then we could probably save the format conversion step?

Flash of contents

When a webxdc instance is opened on a port, there is sometimes a flash of contents. This happens to clear the local state (localstorage, etc) of the previous instance so we start with a fresh slate, and then the application is reloaded. After this, the setUpdateListener is registered for serial 0 and the state is loaded anew.

How to avoid this flash of content? The trouble is that we don't know whether clear is going to come in. A normal reload shouldn't wipe local state, only the initial opening does.

I considered turning off the UI (by setting document.style.display = 'none') in the window.load event but:

  • this may already be too late to prevent a flash of content

  • we want to reenable the display sometime, and when to do that? We can't wait for an update or clear, as it may not arrive.

I considered loading a custom index.html initially when you open a tab, and then clearing contents if a clear event comes from the server, and buffering any other updates somehow, and then reloading to the real index.html and piping in all the buffered updates. But this seems very tricky to get right.

Perhaps the simplest approach would be some kind of setTimeout, but again the reload makes things difficult...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.