-
Notifications
You must be signed in to change notification settings - Fork 68
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
Temporarily change account in settings page #1171
Temporarily change account in settings page #1171
Conversation
Just tested it out, and it seems to be working as expected! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! We do have a lot of places which rely on checking account bloc state, so once this is merged, just be on the look out for anything that might seem off (e.g., subscriptions, favourites, etc)!
Will do! I mainly wanted to prevent reloading the main feed and the user page. If other places reload for each switch and then reload back to the original, it's probably not the end of the world, but we can add additional |
I do wonder if perhaps, a more elegant way to handle this is to create a new This way, the "global" account state is not touched, and we push a new |
That could work, but it might not be enough. The first time I attempted this feature, I simply added a "temporary" account field, but there were so many different ways that the "current" account can be accessed, it was hard to handle all the cases. The easier approach was to switch everything and handle the cases that shouldn't respond to the switch. For example, we would probably need to push a new Anyway, something to think about. |
Ahh yeah, you have some good points! It would likely take more work than what I mentioned to get everything working properly 😅 We'll stick to this for now and possibly revisit it in the future! |
Heyyy! I just saw this in the pre release notes, this is cool! I wonder if the ability to change the account you're viewing by tapping the user area at the top of Account Settings should be made more obviously clickable? A three dot/hamburger menu might be one option here. I could file a feature request if that felt like a good tweak - let me know! |
Hey, I think that's a good idea. This UI originally started in the create post page, where the account and community selectors look/act the same. The difference is that the community may not be populated initially (if you create a new post from the main feed), so it's obvious that you have to tap it, where the account selector is always populated by default, so it would definitely be a discoverability issue (unless you happened to assume that it had the same behavior as the community selector). All that to say, yes, feel free to create an enhancement issue for this. |
@machinaeZER0 Here are some quick mockups.
Here's another idea.
|
Aw, thanks for mocking these up! Upon reflection, I guess maybe the three dot icon implies a pop-up style menu, as opposed to a slide out panel... On our profile page we're actually using that icon in the top right as an account switcher (the one that of the two user icons overlapped) - maybe that would be the icon to use, for consistency? The right-facing arrow also works though, I think. Sorry for not thinking of that initially! |
That makes a ton of sense to me! Defer to you all on final icon choice :) either way I think this is great! |
Just going to chime in on this discussion - I think I prefer the chevron icon more than the 3-dot icon. It feels more intuitive for me (but that might just be me 😅) |
Whew, that's what I ended up doing! 😊 |
TIL it's called a Chevron icon! |
Pull Request Description
Using the same technique as #1159, this PR allows for configuring the account settings as any of the available users. I also condensed some of the "account restoration" functionality so that it stays within whatever page may invoke a temporary account.
Note: I have introduced some usage of
PopScope
. I do remember thatWillPopScope
was a no-no because it broke full page swipe back on iOS; however I think we got around that by usingSwipableaPageRoute
. Also this is the newerPopScope
. All this to say, can you verify that full page swipe back still works on iOS from the account settings page?Issue Being Fixed
Issue Number: N/A
Screenshots / Recordings
qemu-system-x86_64_7mVGeFFOvv.mp4
Checklist
semanticLabel
s where applicable for accessibility?