summaryrefslogtreecommitdiff
path: root/ui/routes
Commit message (Collapse)AuthorAge
* Track state on a per-session basis, rather than via globals.Owen Jacobson2025-02-26
| | | | | | | | | | | Sorry about the thousand-line omnibus change; this is functionally a rewrite of the client's state tracking, flavoured to resemble the existing code as far as is possible, rather than something that can be parted out and committed in pieces. Highlights: * No more `store.writeable()`s. All state is now tracked using state runs or derivatives. State is still largely structured the way it was, but several bits of nested state have been rewritten to ensure that their properties are reactive just as much as their containers are. * State is no longer global. `(app)/+layout` manages a stateful session, created via its load hook and started/stopped via component mount and destroy events. The session also tracks an event source for the current state, and feeds events into the state, broadly along the same lines as the previous stores-based approach. Together these two changes fix up several rough spots integrating state with Svelte, and allow for the possibility of multiple states. This is a major step towards restartable states, and thus towards better connection management, which will require the ability to "start over" once a connection is restored.
* Remove forced `are you sure` prompt when navigating away.Owen Jacobson2025-02-25
|
* Merge branch 'prop/preserve-state'Owen Jacobson2025-02-24
|\
| * npm run fmtOwen Jacobson2025-02-24
| |
| * Move constant closer to usageOwen Jacobson2025-02-24
| |
| * Only redirect to last active channel off of /Kit La Touche2025-02-21
| |
| * Merge branch 'main' into prop/preserve-stateKit La Touche2025-02-21
| |\
| * | Only check for message visibility while a channel is actually attached to ↵Owen Jacobson2025-02-20
| | | | | | | | | | | | | | | | | | the DOM. Prevents this from breaking during DOM unmounting, when leaving a channel.
| * | Remember last active channel and navigate there on root loadKit La Touche2025-02-20
| | | | | | | | | | | | To facilitate PWA behaviour.
| * | Separate channel metadata out into its own storeKit La Touche2025-02-20
| | | | | | | | | | | | | | | | | | | | | | | | This is stored locally, and, while parallel to channel info, is not the same as. Eventually, this may hold info about moot/decayed channels, and grow unbounded. That'll need to be addressed.
| * | Merge local channel data and remote to maintain stateKit La Touche2025-02-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | When we hit the boot endpoint, we get the server's view of things. If we just setChannels with that, we overwrite all our locally-stored info in on things like lastReadAt. So we need to merge data. Eventually, this might militate for a `meta` key containing an object of locally stored data, rather than having to handle each key specially.
* | | Hoist global state access out of individual components.Owen Jacobson2025-02-21
| |/ |/| | | | | | | | | | | | | Access to "global" (maybe "external?") state is now handled at the top level of the component hierarchy, in `+page.svelte`, `+layout.svelte`, and their associated scripts. State is otherwise passed down through props, and changes are passed up through callbacks. This is - hopefully - groundwork for refactoring state management a bit. I wanted to move access to state out to a smaller number of places, so that I have fewer places to update to implement reconnect logic. My broader goal is to make it easier to refactor these kinds of external side effects, as well, though no such changes are in this branch. This change also makes testing a mile easier, since tests can interact with props and callbacks instead of emulating the whole HTTP request stack and the Pilcrow API. This change removes do-very-little tests.
* | Retire use of $page store in favour of Sv5 page stateOwen Jacobson2025-02-21
| |
* | Add missing awaits on goto() callsOwen Jacobson2025-02-21
| |
* | Split "set up the event source" and "apply events to state" from one another.Owen Jacobson2025-02-21
| |
* | Remove the last lingering Svelte4-style event bindings.Owen Jacobson2025-02-20
| |
* | Let Svelte's `$derived` handling figure out update ordering for the channels ↵Owen Jacobson2025-02-20
|/ | | | | | | | | | | | | list. This fixes a bug. To reproduce: 1. Open the client and log in. 2. Create a new channel using the `create channel` UI. The expected result - and the behaviour after this commit - is that the newly-created channel will be shown in the sidebar immediately. The buggy behaviour is that it was not, but would appear in the sidebar once the client is reloaded. The channel would also not appear for other clients until they reloaded. I'm not actually completely sure of _why_ this fixes the bug, but it does.
* npm run formatOwen Jacobson2025-01-11
|
* Handle no-channel-selected betterKit La Touche2025-01-05
|
* Stylize more betterKit La Touche2025-01-05
|
* Style /me routeKit La Touche2025-01-04
|
* Just oh so many stylesKit La Touche2025-01-01
|
* Strip out Tailwind etcKit La Touche2024-12-30
|
* Merge branch 'main' into wip/stylizeKit La Touche2024-12-03
|\
| * Set last-read on a channel on some eventsKit La Touche2024-11-29
| | | | | | | | | | | | | | Esc key, 2 second wait after scroll, and whenever the messages inChannel change. Kinda gross set of things, but, so it goes. This does offer us the option of extending this to include "when you click 'unread from here' on a message" in future.
| * Enrich channels with hasUnread attributeKit La Touche2024-11-29
| | | | | | | | | | | | | | | | | | | | | | | | This requires both the channels and messages stores to be available, so we do it in the page file where we've got those stores handy. It's a bit inefficient (it recreates the entire enrichedChannels array every time one of them changes), but it'll do for now. There's also a TODO hinting that we might want an idea of unread-count. I think that would require a distinct idea of mentions, because we just want "fact of unread" for general-availability channels, not "this many messages since you were last here".
* | Merge branch 'main' into wip/stylizeKit La Touche2024-11-28
|\|
| * Don't sink the top bar so far down into the page.Owen Jacobson2024-11-26
| |
| * HTML-level styling inside non-top-level elements is not actually appliedOwen Jacobson2024-11-26
| |
| * Use store.set where appropriateKit La Touche2024-11-22
| | | | | | | | If you're setting it to a static value, use set.
| * Patch out --host again; npm run formatOwen Jacobson2024-11-19
| |
| * Add Tinygesture for swipe eventsKit La Touche2024-11-18
| | | | | | | | | | Hide and show channel menu thus. It doesn't gradually pull it out, which is less than ideal, but it's good enough for now.
| * Merge branch 'main' into wip/touch-eventsKit La Touche2024-11-12
| |\
| * \ Merge branch 'main' into wip/touch-eventsKit La Touche2024-11-09
| |\ \
| * \ \ Merge branch 'main' into wip/touch-eventsKit La Touche2024-11-06
| |\ \ \
| * | | | Set up framework for testing touch eventsKit La Touche2024-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This includes a change to tools/run that exposes the dev server on my local network. This change should not make it into the final form of this branch. This is so I can use actual for real touch events on my actual for real phone, hooked up for remote debugging to my computer so I can see console events etc.
* | | | | Merge branch 'main' into wip/stylizeKit La Touche2024-11-11
|\ \ \ \ \ | | |_|_|/ | |/| | |
| * | | | Don't erroneously try to get an invite ID as a property of a promise ↵Owen Jacobson2024-11-11
| | |_|/ | |/| | | | | | | | | | yielding an invite.
* | | | Style sidebar and message inputKit La Touche2024-11-11
| | | |
* | | | Fix error in inviteKit La Touche2024-11-11
| | | | | | | | | | | | | | | | | | | | We weren't awaiting data.invite, so were trying to operate on the promise itself.
* | | | Clean up event stream on window closeKit La Touche2024-11-11
|/ / /
* | | Rename the project to `pilcrow`.Owen Jacobson2024-11-08
| | |
* | | Better choices of margins and capsOwen Jacobson2024-11-07
| | |
* | | Increase horizontal padding on the /me link so it looks a little less crampedOwen Jacobson2024-11-07
| | |
* | | Factor out the elements of the `/me` page, and style them a little.Owen Jacobson2024-11-07
| | |
* | | Be more consistent around margins and padding for the "main" paneOwen Jacobson2024-11-07
| | |
* | | Split message runs after ten minutes' silence.Owen Jacobson2024-11-06
| |/ |/| | | | | I've also refactored how runs are processed, to avoid re-splitting runs every time the channel view is rendered. They're generated when messages are ingested into the `$messages` store, instead.
* | Move the logout button into `/me`. Make the self link a little more prominent.Owen Jacobson2024-11-06
| |
| |
| \
*-. \ Merge remote-tracking branches 'origin/prop/dom-sandpaper' and ↵Owen Jacobson2024-11-06
|\ \ \ | |_|/ |/| | | | | 'origin/prop/showmenu-nonglobal'
| | * Move `showMenu` out of globals and into page state.Owen Jacobson2024-11-05
| |/ |/| | | | | | | | | I generally don't love globals, and the scope of this global is pretty narrow. Let's use the context hierarchy for this, instead. (Kit mentioned that it might be possible to use CSS variables for this.)