-
Notifications
You must be signed in to change notification settings - Fork 804
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
Preact rewrite #1229
Preact rewrite #1229
Conversation
This comment has been minimized.
This comment has been minimized.
76152fc
to
c6acdd6
Compare
This comment has been minimized.
This comment has been minimized.
c6acdd6
to
96f2763
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
If YOU TOO want to send messages to rooms, all you need is to add a
Replace |
This comment has been minimized.
This comment has been minimized.
9d99079
to
f503dd2
Compare
This comment has been minimized.
This comment has been minimized.
d45761c
to
afd367d
Compare
This comment has been minimized.
This comment has been minimized.
HIGHLY UNFINISHED CODE
This is kind of a break of purity, because it reads `window.offsetWidth`, but this is the lowest-overhead way to automatically recalculate the leftRoom width whenever PS updates (i.e. whenever leftRoom or rightRoom change).
Considering all the individual panels start with `panel-`, this should make it easier to find and in general be a more intuitive name. All other tsx files will start with `panel-`, putting them together in one place when sorting alphabetically.
Room layout code is now better commented and more readable.
There's still a lot more to do, but this is a start
Unlike the old router, this one has no dependencies, and also tracks left/right panel state, for more accurate back/forward button support. It also sets the URL to the last selected panel, instead of always using the left panel.
The actual connect function is commented out, because there's no reason for it to do anything. But it can actually connect to a server now.
This at least lets me test some router features without pushing it to the live server.
You can't actually log in through the Preact client anyway, but now if you set the right config file, you can _be_ logged in.
Using arrow keys to switch rooms is now in! Unlike in the old client, the new system supports switching to all rooms, and supports arrow keys in all situations, rather than only being able to switch between chat rooms, and only with textareas focused. Also, focusing chat rooms now focuses the input box. This was surprisingly hard to implement with React, which has an annoying all-or-nothing approach to state it doesn't control.
This involves a relatively substantial refactor to how panels work, but it should be somewhat finalized now. Popups are now fully supported.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This is getting merged into master now! |
The Preact branch is nowhere near done, of course. But it's intentionally designed to be able to run parallel to the regular client, so that's what'll happen from now on. |
Apparently I can't convert a pull request into a draft pull request, but I can re-create the pull request. Since the Preact rewrite is probably our longest-term project, this is probably the correct thing to do here.