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

feat(ui): swipe up and down to switch between articles #589

Merged
merged 18 commits into from
Feb 6, 2024

Conversation

JunkFood02
Copy link
Collaborator

@JunkFood02 JunkFood02 commented Feb 6, 2024

This is a large PR so I'll try be concise

Done

  • Refactor the reading page (again ^^;)
  • Use a NestedScrollConnection to receive scroll events from the LazyColumn, and build up a PullToLoadState for handling offset and callbacks (Thanks [RFC] Swipe ReadingPage #468 by @boun for inspiration!)
  • Use offset to animate the article view. Add a new, cute component PullToLoadIndicator
  • Use NestedScrollConnection to calculate isReaderScrollingDown instead of LazyListState because it's more accurate

To do

  • The behavior when there's no next/previous article are not defined or implemented yet
  • Write documents for dirty works if we want to make this feature maintainable

Screen record:

2024-02-06.20.00.50.mp4

JunkFood02 and others added 16 commits January 31, 2024 00:13
…shinch#502)

* build(deps): bump up dependencies, compile sdk, and gradle version

* build(deps): remove redundant safe-args plugin

* build(deps): update Compose BOM to `2024.01.00` & compiler to `1.5.8`
* fix(i18n): configuration loss when switching locale

* feat(locale): enable auto-localeconfig
* feat(i18n): add languages to in-app language picker

* fix(i18n): locale system settings not working for Android 13

* feat(i18n): show selected language at settings page

* fix(ci): ignore ExtraTranslation for linter

* feat(i18n): add fallback in in-app language picker for A13+

* chore: clean up
@Ashinch Ashinch changed the base branch from dev to main February 6, 2024 17:36
@Ashinch Ashinch marked this pull request as ready for review February 6, 2024 18:07
@Ashinch Ashinch added this to the 0.9.13 milestone Feb 6, 2024
@Ashinch Ashinch merged commit 1b758df into Ashinch:main Feb 6, 2024
1 check passed
@nvllz
Copy link
Contributor

nvllz commented Feb 7, 2024

This one is massive... man!
I like it. Works great with "All/Starred" flows, but it's a little buggy with "Unread". I have to mark articles as unread to trigger the next article in the list. Sometimes it seems to work seamlessly when parsing full article content, but it's still missing some of my gestures.

e1864dab-8191-41c7-a889-3baed4069e07.mp4

I hope it's some kind of hint. Cheers!

@JunkFood02
Copy link
Collaborator Author

@nvllz Thanks! This feature is not ready for use so far, as the one in the To do:

  • The behavior when there's no next/previous article are not defined or implemented yet

The problem you encounter is actually because, when you open an article within the Unread filter, it'll be immediately removed from the article list. Then there's no way to find the previous/next article for an item which doesn't even exist in the list.

This PR was merged into main because we find it difficult to maintain two branches. I'll let you know if we have progress on this feature 🤞

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.

4 participants