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

Developer bundle #4

Open
nettyso opened this issue Apr 26, 2021 · 0 comments
Open

Developer bundle #4

nettyso opened this issue Apr 26, 2021 · 0 comments

Comments

@nettyso
Copy link
Owner

nettyso commented Apr 26, 2021

There should be a dev bundle of Haptic. This can carry features that would normally be too costly in size or performance to include in the normal bundle. Here's a work-in-progress list of features:

  • Registries for both reactors and signals, listing everything that has been created and is active. This was once part of Haptic Wire directly as a WeakSet(), but a Set() would be iterable.
  • Viewing reactive elements on the page using a custom api.patch() method. I've done this before by wrapping all reactive elements in a <span> with a dashed border, but there must be a less-obtrusive way. Reactive attributes can be shown in a popover (i.e <input value={wR(data.text)} />).
  • Debugger sidebar that lists statistics about reactors and signals. I started this is /examples/reactorRegistry.ts but needs work.

Challenges:

  • Importing this will be difficult since it brings new/different copies of haptic/dom and haptic/wire that use a separate global state than the non-dev import. How will a developer consistently switch a dev build and back, maybe in package.json or import maps?
  • The debugger sidebar can't really use Haptic Wire. If it did, it would be debugging itself as well as the main page, which is confusing and very likely leads to infinite loops.
nettyso added a commit that referenced this issue Apr 26, 2021
This will allow for a debug bundle (#4)
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

No branches or pull requests

1 participant