Skip to content

Developer bundle #4

Description

@tsugabloom

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions