Discovery / Guest Mode
Introduction
This issue is a place to continue discussions that started on mlemgroup/mormaer-mlem#198.
The idea is that when first opening the app as a new user, who potentially is brand new to Lemmy in general, they would be presented with content/options to explore the fediverse before proceeding to sign-up to an instance. Alternatively, a guest mode could be implemented where users could explore without registration but with limited options as they would not be able to interact with any posts etc.
Requirements
At present it's unclear, more discussion is required.
Discussion
Here are some of the comments from the attached PR (#198) where this discussion started:
@JakeShirley:
I can see a world where there is a "Discover a server" experience in the app. Lemmy is definitely less than user friendly.
@buresdv:
I can see a "guest mode" working is if we choose a specific set of instances (further discussion is warranted to choose which instances they will be), give them some context (for example "this is a homepage for tech nerds", "this is a homepage for general discussion", etc.), and then let the user pick from them. We should make it discoverable to the average user without them having to scour for instances.
Before a guest mode is implemented, we also have to implement a registration workflow so the users can sign up to their chosen instance right from the app.
@ShadowJonathan:
Random; We could probably also hook this into the signup flow, i.e. now have a user scour for instances but allow them to pick from a list, which new instance to sign up at.
This should probably be discussion for a tracker issue though.
This needs to be in 1.0 for review.
I have some bandwidth -- I would be happy to take this on as a first time contributor as I outlined in #20. Or give the task to someone else: I also see someone else already gave it a first attempt in https://github.com/mlemgroup/mormaer-mlem/pull/198
In my experience, while we can design a perfect guest mode experience, it's usually easier from a contribution standpoint to keep-it-simple and then evolve from there.
It seems to me the central issue is that the Lemmy APIs themselves don't always require authentication thereby allowing a kind of "guest mode". But the app makes the assumption that all API calls require auth.
The app already does error handling (with throws/catches) which is great! So at a bare minimum we need to figure out how we want to architect APIs without accounts.
There are many ways to do this. https://github.com/mlemgroup/mormaer-mlem/pull/198 makes SavedAccount optional and provides a global default instance. But this introduces global state.
My proposal was making username and accessToken optional on SavedAccount and then throwing (or returning optional) from the Request inits. But then SavedAccount becomes a bit of a misnomer.
What do you all think?
Related to #206
How will users access Guest Mode in 2.0? I think users should be able to save "guest accounts" for their favorite instances in the quick switcher in some way, so that they can switch to frequently visited instances quickly.
One option would be show guest accounts mixed in with regular accounts in the quick switcher. Users could add a guest account to this list by clicking on an "Add Guest" button below "Add Account" in the Accounts page. We could have a "Sort by type" sort mode that separates guest accounts from the logged-in accounts, if the user prefers that.
We could also have a "visit as guest" button on instance pages. When a user enters guest mode using this, the guest account would be considered "temporary", and wouldn't be added to the accounts list. Instead, we could show the guest account in a separate section above all other accounts in the switcher, marked as "temporary" and with a different-colored background, maybe. When the user leaves the guest mode, this account would disappear from the quick switcher. We could add a context menu action and/or swipe action to the temporary guest mode entry that adds it to the list permanently, perhaps.
Per Slack, the basic structure is:
AppStatemaintains a non-optional.guestAccountproperty. This is used to provide a meaningful default state to the app if it opens with no accounts, and will serve guest mode feeds.- Users can store multiple guest accounts, which will be displayed in the quick-switcher in a separate list below the real accounts
- "Switching guest accounts" under the hood just re-initializes
.guestAccount
Closed long ago with new middleware