News for hackers. Stuff that matters.
Re:Offline UX Patterns by whoitwas on Wednesday October 02, 2024 @05:24AM (#41718709)
This is my introduction to the word "Expensify". I assumed it meant something like "enshitify" eg: "enshitification".

It's an odd name. Nice of you to share on Github.

Re:Offline UX Patterns by martijnarts on Wednesday October 02, 2024 @07:47AM (#41719521)
It's a brand name, for everyone's context.
Re:Offline UX Patterns by Rygian on Wednesday October 02, 2024 @05:40AM (#41718792)
I find it interesting to read these UX patterns and ask myself "would the same UX pattern work for a local-first application?".

I find that in most cases, a local-first application would have a more predictable UX, because most actions need to be successful without a remote server to begin with.

Still, building the UX with an "offline-first" mindset is a giant leap forward when compared to all the networked applications I interact with.

Re:Offline UX Patterns by iudqnolq on Wednesday October 02, 2024 @07:21AM (#41719349)
And yet as a user I sometimes find local-first applications harder to reason about. For some apps I know to force-quit and relaunch the mobile app after reconnecting to the network before opening the website, for example.

Distributed systems are just hard I guess, especially involving user systems.

Re:Offline UX Patterns by yen223 on Wednesday October 02, 2024 @05:15PM (#41725047)
Local-first applications are much harder to reason about than server-driven apps or local-only apps, because there's now two sources of truth - the app and the server. Reconciling the two is much trickier than it looks.
Re:Offline UX Patterns by rgbrgb on Wednesday October 02, 2024 @12:12PM (#41722122)
This is my first time seeing Expensify's extensive open source work. Pretty cool and rare. Were they always open source? Anyone understand the strategy here or used the new App?
Re:Offline UX Patterns by hiAndrewQuinn on Wednesday October 02, 2024 @01:24PM (#41722939)
I know that Expensify is one of the highest-ticket supporters of SQLite, because they (at least at one point, and probably still) have what is probably the world's largest SQLite database powering everything they do.

As a big fan of SQLite myself, I have to admit, this significantly raised their street cred in my eyes.

Re:Offline UX Patterns by miki123211 on Wednesday October 02, 2024 @02:30PM (#41723670)
From casually browsing their GitHub, it seems that only their frontend is open source. I couldn't find the backend anywhere.
Re:Offline UX Patterns by qazxcvbnm on Thursday October 03, 2024 @03:16AM (#41728057)
I’ve known them through their work on Wish List and Flash List. They’re one of the bigger supporters in work on list rendering in React Native (a vital, devilish, and often overlooked area).
Re:Offline UX Patterns by yuliyp on Wednesday October 02, 2024 @01:19PM (#41722889)
I loathe the over-abundance of "Optimistic Without Feedback Pattern". It is used as a crutch for "I don't want to bother implementing error cases". Even the pinned chat example they use is just a bug factory. Stating "this particular API request has almost no way of failing, and we know what the server will return in advance" is extremely naive. The user could have gotten logged out somehow, or maybe there's a rate limit or something, or the server's overloaded, or they're offline and going to use the app on another device that is online before you can sync, or whatever.

Assuming the happy path just leads to the app breaking in weird ways down the road.

Re:Offline UX Patterns by swah on Wednesday October 02, 2024 @02:30PM (#41723664)
What are the other options?
Re:Offline UX Patterns by marcelr on Wednesday October 02, 2024 @05:52PM (#41725307)
handle the errors, ideally manually
Re:Offline UX Patterns by wodenokoto on Thursday October 03, 2024 @02:36AM (#41727876)
What error?
Re:Offline UX Patterns by mystified5016 on Wednesday October 02, 2024 @06:25PM (#41725516)
The same options we've had literally since computers were invented. Unexpected and unrecoverable errors are as old as computing. This is not some new field of rocket surgery.

You use whatever mechanism is available in your language/framework to catch exceptions or errors, and you handle it. The program should do its best to recover, fail gracefully, and emit a useful message or log.

This is one of the core tenets of programming. Again, since the dawn of time.

Re:Offline UX Patterns by Spivak on Wednesday October 02, 2024 @02:24PM (#41723591)
> The user could have gotten logged out somehow, or maybe there's a rate limit or something

All your examples are retryable errors in which the prescription is the same: "keep the message queued until it's successful." And when all your failure modes are like this optimistic-no-feedback works. If you have non-retryable errors in your failure modes "Bad Request", "Gone" this pattern can't be used.

Re:Offline UX Patterns by ben-schaaf on Wednesday October 02, 2024 @08:37PM (#41726239)
Not being logged in is not a retryable error.
Re:Offline UX Patterns by Spivak on Wednesday October 02, 2024 @09:28PM (#41726480)
Sure it is, why wouldn't it be? Keep it stored and queued until they log in again. It's the same as being offline.
Re:Offline UX Patterns by xbjfk on Wednesday October 02, 2024 @11:58PM (#41727252)
What if someone else logs in?
Re:Offline UX Patterns by Spivak on Thursday October 03, 2024 @09:51AM (#41730801)
Your local storage, and hence the queue, isn't segmented by user?
Re:Offline UX Patterns by yuliyp on Thursday October 03, 2024 @12:05AM (#41727289)
Sure they're retryable. But those retries might never succeed (user wipes their phone or uninstalls the app or logs out or clears local app data or a buffer fills up to come up with a few scenarios. Either the request didn't matter to the user at all, in which case sure whatever, or at some point they're going to discover that the thing they thought happened didn't actually happen.
Re:Offline UX Patterns by whoitwas on Wednesday October 02, 2024 @11:42PM (#41727185)
My error buckets and //TODOS with dreams of more refined implementations weren't all that lazy after all.
Re:Offline UX Patterns by wodenokoto on Thursday October 03, 2024 @02:42AM (#41727900)
So what you are saying is that you don't think apps should work when offline?
Re:Offline UX Patterns by yuliyp on Thursday October 03, 2024 @03:46PM (#41734228)
Not at all. I'm saying that they should reflect the unereliability inherent in distributed computing rather than pretend it can't exist with such false notions as "retries will fix it" or "this call can't fail"
Re:Offline UX Patterns by qbane on Wednesday October 02, 2024 @02:12PM (#41723478)
The names of patterns are extremely useful when you want to express to your coworkers "just update the view first and revert if the API fails" concisely.