emberclear icon indicating copy to clipboard operation
emberclear copied to clipboard

actually do some maintenance

Open NullVoxPopuli opened this issue 3 years ago • 4 comments

As far as gjs/gts and v2 addons are concerned, a lot can be done to improve this repo' including adding turborepo to speed up ci.

I should do some of this and modernize this codebase.

Thankfully, it's not tooooo big.

NullVoxPopuli avatar Oct 25 '22 20:10 NullVoxPopuli

Also, update networking code? https://docs.holepunch.to/

NullVoxPopuli avatar Dec 30 '22 13:12 NullVoxPopuli

Standard auth: https://webauthn.guide

NullVoxPopuli avatar Dec 30 '22 13:12 NullVoxPopuli

Something that might help with long-term maintenance,

  • Swap out the design system away from custom + shoelace to Toucan
  • Swap out custom form stuff for headless-form (also improves a11y)

NullVoxPopuli avatar Feb 23 '23 21:02 NullVoxPopuli

Use MessageChannels instead of worker-bi

¹ https://developer.mozilla.org/en-US/docs/Web/API/AbortController ² https://developer.mozilla.org/en-US/docs/Web/API/Channel_Messaging_API

from @sukima: For workers I used MessageChannel to convert the postMessage into a promise async/await version

function asyncPostMessage<t = unknown>(worker: Worker, message: unknown, transfers: Transferable[] = []): Promise<T> {
  let { port1, port2 } = new MessageChannel();

  return new Promise<T>((resolve) => {
    port1.onmessage = ({ data }: MessageEvent<T>) => resolve(data);
    worker.postMessage(message, [port2, ...transfers]);
  });
}

and in the worker:

self.addEventListener('message', ({ data, ports: [port] }: MessageEvent<…>) => {
  // Do stuff with data
  port.postMessage(result);
});

NullVoxPopuli avatar Dec 22 '23 17:12 NullVoxPopuli