Page MenuHomePhabricator

Option for vertical swiping for readers while changing pages
Open, Needs TriagePublic

Description

Requested by @Pigsonthewing on Github to add an option to be able to switch to swipe up/down instead of left/right for page changes.

Note: While vertical scrolling is already there in the app, it does not vertically swipe when moving to the next chapter, which requires left/right swipe in the current situation.

Task: If scroll is enabled, add a sub option called "Paginated" as a default disabled option. If the user enables it, the page up down navigation should be done in a paginated manner.

Related task: T407462

Event Timeline

Hello! My name is Olamiposi, I'm an outreachy contributor and I would love to contribute to this great project. Is this issue still available, I would like to work on it

Hello! My name is Olamiposi, I'm an outreachy contributor and I would love to contribute to this great project. Is this issue still available, I would like to work on it

Sure, please go ahead.

Hello @Bodhisattwa . I have linked a PR: https://github.com/cis-india/Wikisource-Reader/pull/37
Please kindly review

Thanks for submitting the PR. @Saiphani02 , the primary mentor of this project will review it in his due time. Also, please record your in-progress contributions at this URL: https://www.outreachy.org/outreachy-december-2025-internship-cohort/communities/wikimedia/improve-the-wikisource-reader-app/contributions/

Janice.jf subscribed.

Hello @Saiphani02 , I will be starting afresh and I will close the previous PR. If I understand correctly, I should add vertical swipe(not scroll) for pages, similar to existing horizontal swipe right?

Hi @Bodhisattwa @Saiphani02 , I've investigated implementing vertical paginated scrolling (discrete up/down page turns) for the app and wanted to share my findings:
Current Situation
Readium Kotlin Toolkit v3.1.2 does NOT support vertical pagination for reflowable EPUB publications. This is a technical limitation of the library.

What IS Available in Readium:
For Reflowable EPUB:
✅ Horizontal pagination (swipe left/right) - current default
✅ Vertical continuous scrolling (scroll up/down continuously) - current "Scroll" toggle
❌ Vertical pagination (discrete swipe up/down between pages) - NOT SUPPORTED
For PDF and Fixed-Layout EPUB:
✅ Vertical pagination IS supported via scrollAxis = Axis.VERTICAL preference
✅ Horizontal pagination via scrollAxis = Axis.HORIZONTAL
Why This Limitation Exists:
According to Readium's GitHub issues (#313, #458):
The scrollAxis preference exists only for fixed-layout publications (PDF, Fixed EPUB)
Reflowable EPUB uses a different rendering system (Readium CSS with column-based pagination)
Vertical pagination for reflowable content is planned for "Navigator 2.0" (no release timeline)

Possible Implementation Options:
Option 1: Implement for PDF and Fixed-Layout EPUB Only

  • Add vertical pagination toggle that works for PDF/Fixed EPUB
  • Show toggle only when reading these formats
  • This is fully supported by Readium out-of-the-box

Option 2: Custom Implementation for Reflowable EPUB (Not Recommended)

  • Would require forking Readium and building a custom RecyclerView-based navigator
  • Very complex, requires maintaining a Readium fork
  • May break with future Readium updates

Option 3: Enhanced Vertical Scrolling for Reflowable EPUB

  • Enable continuous vertical scrolling with disablePageTurnsWhileScrolling = true
  • This removes the need for horizontal swipes between chapters
  • Chapters flow continuously from one to another vertically
  • This is NOT discrete pagination, but removes horizontal swipe requirement

Option 4: Wait for Readium Navigator 2.0

  • Future version will have native vertical pagination support
  • No confirmed release date

My Recommendation:
Implement Option 1 (PDF/Fixed-Layout EPUB only) because:
It's the only way to get true vertical pagination with current Readium
Clean implementation without hacks
Works as expected with discrete up/down page turns
Could benefit users reading PDF documents
For reflowable EPUB, the requested feature is technically impossible without major custom development that would be difficult to maintain.

Please let me know your preference. Best regards

Thank you for putting your efforts in this. Since we anyway do not use PDF or fixed layout EPUB files, it is best to wait for Readium to implement this.

Oh alright then! I see that T407462 is already for vertical scrolling, What is the next step?

Yes, T407462 is the task for continuous chapters scrolling. I will flag this for future development.