Evolution of the Navigator API #51
Replies: 7 comments 3 replies
-
Change "might" to "would love to" |
Beta Was this translation helpful? Give feedback.
-
There are several large initiatives that need to be done with the navigator:
Would it make more sense to start rewriting the navigator with these and everything above in mind rather than fix the current one? |
Beta Was this translation helpful? Give feedback.
-
Type of objects exposed by the navigatorTo keep things flexible but easy-to-use I suggest a "russian dolls" approach. Low-level:
|
Beta Was this translation helpful? Give feedback.
-
Some way of distinguishing requests to change page due to user input from changing page due to some other reason would be good. |
Beta Was this translation helpful? Give feedback.
-
Another use case:
|
Beta Was this translation helpful? Give feedback.
-
More requirements:
|
Beta Was this translation helpful? Give feedback.
-
Some initial work to migrate to ViewPager2 #148 which could be relevant. cc @stevenzeck |
Beta Was this translation helpful? Give feedback.
-
With the version 2.0.0 of Readium Toolkit just around the corner, it's time to figure out how we will approach the next big refactoring project: a revamped Navigator API.
We have reached a point where it's difficult to make further improvements without breaking the existing navigator APIs (activities and fragments). They are currently exposing too much internals (resource pagers, web view subclasses, etc.) and have an ill-defined API binding us to the current implementation details.
Rewriting the Navigator internals will take months, but we cannot bring the rest of the toolkit to a halt until we are ready to ship a new Navigator. That's why we decided in our weekly team call of the following approach:
R2EpubActivity
,EpubNavigatorFragment
) will be "frozen" in the current state, with only bug fixes (when contributed) shipped in future 2.x versions.Navigator2
components which will implement the new API. They will be in an alpha/beta state and marked as explicitOptIn
. The API may break between two versions while we figure things out.Navigator2
reach maturity and feature parity with the legacy Navigator, we will release version 3.0.0 of the Readium Toolkit and replace the legacy API.Focus for the new API
Here are the points we should keep in focus while developing
Navigator2
:Activity
,Fragment
,View
).r2-shared-kotlin
for this reason.Where to start?
ViewPager2
. We could start from there and remove/modify existing APIs without fear of breaking apps.Beta Was this translation helpful? Give feedback.
All reactions