Mlem
Mlem copied to clipboard
Guest mode and some API fixes
- fixed a bug with the JSONDecoder in ApiClient that couldn't parse the response when the server sends inconsistent date formats (especially on devices with a different locale than the default en_US_POSIX)
- made the app a bit friendlier by adding a "Guest mode" now if you don't have any accounts you'll see a generic "All" feed, and even when you do have an account you can still enter "Guest mode" from the account list (we might want this in the future if we'd want to protect those accounts with FaceID and so a person handing his phone to his friend to check out the platform could remain private and enter "Guest mode")
- Made the account variable optional everywhere
- made sure to treat all the places that need the account (like upvoting) with a nice toast message
Checklist
- [x] I have described what this PR contains
Choose one of the following two options:
-
- [x] This PR does not introduce major changes*
-
- [ ] This PR introduces major changes, and I have consulted @buresdv, @jboi or @mormaer in the Mlem Development Matrix room
Choose one of the following two options:
-
- [ ] This PR does not change the UI in any way
-
- [x] This PR adds new UI elements / changes the UI, and I have attached pictures or videos of the new / changed UI elements (This PR hides certain buttons when you're in "Guest mode")
Pull Request Information
About this Pull Request
I've added a "Guest mode" to make the app friendlier, as well as fixed some bugs related to inconsistent data formatting from the server side
Additional Context
While I've been a developer for many many years but I'm relatively new to Swift, I would love some feedback, I would love to help and contribute to this app even if it means I'll have to learn a bit before ;)
Hey @tht7 👋
Would you be able to raise a separate PR with just the date decoding changes included?
I'd like to get that in as soon as possible if you have the time 🤞
Guest mode was raised recently and I got the impression that it wasn't to be included. Personally, I think it would be a positive addition, but there are likely some UX discussions to be had around it before decisions are made... I'll leave that open to others to weigh in on, what are your thoughts on guest mode @buresdv?
I've opened another separate PR just with the API changes https://github.com/buresdv/Mlem/pull/208
But I really urge you to consider "guest mode" (and "private browsing") as its own feature (even a core feature)
When I left Reddit in a storm after Apollo was taken from me, I came running to Lemmy from a recommendation in a Reddit thread and I didn't even look at the online platform, instances, etc I just wanted a friendly app so I can see what the platform is all about
And that's how I found you guys, and the app looked amazing (even in it's beta stages) (and I was not afraid to get my hands dirty and contribute to something I love)
But the app in its empty state felt extremely unwelcoming. I didn't know what a Lemmy instance was or how to register to one.
I truly believe this app can make a huge difference in bringing the Lemmy platform to the mainstream but in order to do that it needs to look good and represent Lemmy from the get-go. It can't have a scary empty state that shows you nothing.
And that's where (just like in any other social media) browsing as a guest comes in to save the day
I can see a world where there is a "Discover a server" experience in the app. Lemmy is definitely less than user friendly.
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.
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.
I've created an issue for discussion to continue on this here -> mlemgroup/mlem#21
I think for now we may not be able to proceed with this PR until we spend some time ironing out what discovery/guest mode would look like
@tht7 - will we close this PR for now until we decide on the direction we want to go in for guest mode / discovery mode?