-
Notifications
You must be signed in to change notification settings - Fork 37
/
todo.todo
114 lines (82 loc) · 4.36 KB
/
todo.todo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
Bugs:
Docs:
☐ add return types to the function signatures
☐ p5 web editor and livereload
working on p5 web editor (etc) and the problems with it not live reloading ALL clients automatically. Which causes clients with mismatched state and code. Working locally in VSCode with live server is much nicer.
□ duplicated setting is okay
setting `shared.x = 3` when shared is 3 is okay and doesn't generate net traffic
Tests:
?:
Console:
☐ ? Server Connect Message
Allow server to send a message to the console on connect.
☐ how can we make `console.log(shared)` better
1. it doesn't look like anything can be done on the proxy to make logging it nicer.
2. could probably extend console.log, but i don't think that is a good idea
3. could provide a partyLog() function that works like console log and handles shareds better
4. could provide a partyLogShared() function that logs just shared, and complains about other types received.
5. this [discussion](https://stackoverflow.com/questions/51096547/how-to-get-the-target-of-a-javascript-proxy) of installing a gettrap to access target could be helpful. Logging Info View
Info Panel:
□ ? recreate
□ ? new features
☐ pings
☐ send/receive lights
☐ remove hidden info panel from dom entirely
Shared objects:
Records:
☐ api to clear room/app records
Would be useful in normal, emergency, and dev situations.
Having stale data stick around can be confusing reloading a js program usually restarts it from 0, but not when you have data hanging out on the back end.
pattern: `setup->if host->reset room->init room`
or: `partyConnect(..., RESET_FLAG);`
maybe default should be reset empty rooms, with opt out for persistent world apps.
☐ ? should we use `ignoreDetached` option of on-change?
Client:
□ ? reconnecting
consider cacheing random id in _session_ storage so reloads can reconnect as same client
☐ ? reconnect after page reload
☐ ?? reconnect via login
☐ ? disconnect without unloading the sketch? `partyDisconnect` #62
☐ ? get info about a room (like number of clients) without connecting to it? #62
this might be "done" because empty guest objects don't appear on guest[]
Sync:
☐ ? configurable push: auto or manual
Would it be useful if data was not automatically sent and the user had to call something like .flush() or .send()
☐ ? configurable push: debounce
A possible semiautomatic mode, or optimization to the automatic mode
The thought here is it might be good to let code make lots of little changes, but not send them until the work is done.
Especially in a case where the same value might get updated many times in a row. e.g. incrementing the score could happen a lot in a single draw, but we only need to send the final version
Perhaps all updates between -predraw and -postdraw could be sent at once...
Guests:
□ guest count
currently guests[].length tells you how many people are in room
only works if every guest has non-empty guest object
also requires you to get guests which is slight overkill for if you only need count
a `partyGuestCount` could also be more accurate by basing on presence instead of records (which are subject to worse race conditions)
□ ? expose guest ids
this has been requested, but i'm still leaning against it, recommend createing `id: random()` on guest object
☐ ? guestchange api
something like onGuestJoin(shared) + onParticipantLeave(shared)
various uses, right now there is no way to preserve guest object data before a guest leaves
☐ ? boot/reload guests?
a call that removes connected clients from room/app. possibly reloads their browser to same/new url. Especially useful in development.
Tooling:
Contribution Project Ideas:
☐ Server Admin Panel. Show connected apps/rooms/guests + stats.
☐ Client Admin Panel. Remake / Improve
☐ Example Games + Apps
☐ Video Tutorials
☐ Dorkshop
☐ Example Cleanup
☐ Eleventy Docs. Migrate docs to .md/11ty.
☐ Identity + Visual design system.
☐ Improve welcome page.
[https://skerritt.blog/make-popular-open-source-projects/]
Emit Subscribe:
Release Package:
☐ provide min and unmin versions, include them in the release resources
Examples:
☐ Div Cursors Example
Show all participants cursors as divs positioned over the canvas. don
t impact the actual canvas content. create as example with copyable code unit
Code Review: