Skip to content
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

Add a setting for "Load missing posts behavior" #680

Closed
wants to merge 1 commit into from

Conversation

tinsukE
Copy link
Contributor

@tinsukE tinsukE commented Sep 1, 2023

It allows the user to, if they prefer, loading missing posts from the oldest post onwards (upwards).

I understand that new features should be suggested on the iOS app repo, vetted, planned, coordinated with a UX designer, and then implemented. But I was poking around the code, wanted to test how hard would it be to give it a try myself, and I think I came up with a good solution.

No new design/layout was added as I able to reuse the existing Settings framework. That being said, I made some UX decisions/assumptions:

  • No visual indication of current setting in the "Load missing posts" button. Putting arrows up/down would be an alternative
  • Placement of the setting: Settings -> Behavior
  • Setting icon: Vertical Align Center from Material Icons
  • Setting name: "Load missing posts behavior"
  • Value name: "Newest first (downwards)", the default and current behavior
  • Value name: "Oldest first (upwards)", the new behavior

One can easily (and repeatedly) test the feature by using the mock data from this branch: https://github.com/tinsukE/mastodon-android/pull/1

Boost this change so it gets more attention!

https://mas.to/@tinsuke/110991335369359509

Settings

Test builds

  • Debug build with the feature (you'll have to uninstall your currently installed version to install this one): mastodon-debug.apk.zip
  • Debug build with mock data (so you can reproduce the TL on the GIF below over and over): mastodon-debug-mock.apk.zip

Downwards (current, default) x Upwards (brand new)

load more

Fixes #154

It allows the user to select if they prefer to, when loading missing posts, view first the newest (downwards, default, current behavior) or oldest (upwards) post.
@tinsukE tinsukE marked this pull request as ready for review September 1, 2023 18:36
@cassidyjames
Copy link

I wonder if this could be smarter to not require a setting… because I don't always scroll in one direction or the other. Like, could it track which direction you “came from” when you hit the “load missing” button, and then have it load them in in the opposite direction?

E.g. if I am starting from the top like I usually do, the app would load in missing posts below my current position, but if I was working my way back up from older to newer, it would load them above.

@sk22
Copy link
Contributor

sk22 commented Sep 1, 2023

I wonder if this could be smarter to not require a setting… because I don't always scroll in one direction or the other. Like, could it track which direction you “came from” when you hit the “load missing” button, and then have it load them in in the opposite direction?

E.g. if I am starting from the top like I usually do, the app would load in missing posts below my current position, but if I was working my way back up from older to newer, it would load them above.

i thought about that.. but.. like at the very least, there needs to be a visual indicator about the direction it'd load. maybe i'll do that!

@tinsukE
Copy link
Contributor Author

tinsukE commented Sep 2, 2023

I wonder if this could be smarter to not require a setting… because I don't always scroll in one direction or the other. Like, could it track which direction you “came from” when you hit the “load missing” button, and then have it load them in in the opposite direction?
E.g. if I am starting from the top like I usually do, the app would load in missing posts below my current position, but if I was working my way back up from older to newer, it would load them above.

i thought about that.. but.. like at the very least, there needs to be a visual indicator about the direction it'd load. maybe i'll do that!

I think a good approach would be to build an "Auto" setting (maybe default?).

On this one, the app would keep track of your scrolling before tapping "load missing items" and then load up/down accordingly.

Indeed, having a visual indicator (arrow up/down?) inside the "load missing items" view, that would rotate up or down depending on your scrolling, would be a strong clue to the user about the behavior they'll trigger.

But the detection part isn't easy to tune. Should the change threshold be 1 pixel, 1dp, Xdp, % of the scrolling view, 1-x toots, view on the top/bottom part of the scroll area? Sounds like whatever is picked would not please all users, hence why I'd still keep "always up" / "always down" as options.

@tinsukE tinsukE changed the title #154 Add a setting for "Load missing posts behavior". Add a setting for "Load missing posts behavior" Sep 2, 2023
@tinsukE
Copy link
Contributor Author

tinsukE commented Sep 7, 2023

@Gargron @grishka do you have an opinion on the PR? Does it have merit? Would you prefer some changes to it?

It has attracted quite some attention both here an on the following toots:
https://mas.to/@tinsuke/110991335369359509
https://floss.social/@megalodon/110991689181470000

@sk22
Copy link
Contributor

sk22 commented Sep 8, 2023

in megalodon, i just implemented it like this and removed the setting. feel free to copy if desired

Screenshot_20230908-222648_Megalodon

@tinsukE tinsukE closed this by deleting the head repository Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature request] "Load missing posts" should attempt to keep scroll position
3 participants