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

Impossible to open a file when linear="no" #124

Closed
civodulab opened this issue May 20, 2022 · 4 comments
Closed

Impossible to open a file when linear="no" #124

civodulab opened this issue May 20, 2022 · 4 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@civodulab
Copy link

Impossible to open a file whose itemref attribute is linear="no".
However it works in Thorium.

@mickael-menu mickael-menu added the enhancement New feature or request label May 20, 2022
@mickael-menu
Copy link
Member

Yes non linear resources are not yet supported, mostly because the correct behavior is unclear. See this discussion readium/architecture#143

What do you personally expect should happen?

  • Opening a pop-up with the non linear resource inside.
  • Replacing the currently visible resource by the non linear one, then how do you go back?

Do you have a sample book with linear="no"?

@civodulab
Copy link
Author

I am working on a book for visually impaired youngsters. There is a rather long notice explaining how the options work. I wanted to hide it to avoid too many pages to turn. This notice will only be read once or twice. On my configuration page I have a link to this manual and on the page of this manual I have a link to the configuration page.

Since I saw that the option existed I wanted to use it.

What do you personally think should happen?
Open a pop-up with the non-linear resource inside.
Replace the currently visible resource with the non-linear resource, then how do you go back?

Replace the currently visible resource with the non-linear resource.

I made a very quick epub with a non-linear resource.
test_linear_no.zip
.

@mickael-menu
Copy link
Member

Thank you, such samples are very useful.

This feature is a real can of worms so I doubt we will get a good implementation soon. But maybe we can work out a limited solution in the meantimes, as it's completely broken right now.

@mickael-menu mickael-menu added the bug Something isn't working label May 25, 2022
chrfalch added a commit to chrfalch/kotlin-toolkit that referenced this issue Aug 18, 2023
When the user clicks an internal link in the Navigator the link might be to a resource not present in the reading order - example would be a note that was added with linear=no in the epub (Impossible to open a file when linear="no" readium#124).

This PR implements a way to intercept such a link click - and also for the listener to tell the Navigator not to navigate to the link - meaning that the app can implement handling the link itself (for example showing a popup with the contents of the link like iBooks do).

The implementation is done by extending the Navigator interface with a method called `shouldJumpToLink` that returns true by default and is only called when a link is clicked (when someone calls the `go` method with a link object - which is done when a link internal to the epub is clicked).
chrfalch added a commit to chrfalch/kotlin-toolkit that referenced this issue Aug 18, 2023
To be able to show resources not part of the reading order (like notes, see Impossible to open a file when linear="no" readium#124) it is helpful to be able to provide a special readingOrder list when opening a publication in the navigator.

This commit adds readingOrder as an optional parameter with the default value of `Publication.readingOrder` to the epub factory and the fragment.

In addition the EPubFragment is now using the provided readingOrder instead of publication.readingOrder in its implementation.
chrfalch added a commit to chrfalch/kotlin-toolkit that referenced this issue Aug 18, 2023
When the user clicks an internal link in the Navigator the link might be to a resource not present in the reading order - example would be a note that was added with linear=no in the epub (Impossible to open a file when linear="no" readium#124).

This PR implements a way to intercept such a link click - and also for the listener to tell the Navigator not to navigate to the link - meaning that the app can implement handling the link itself (for example showing a popup with the contents of the link like iBooks do).

The implementation is done by extending the Navigator interface with a method called `shouldJumpToLink` that returns true by default and is only called when a link is clicked (when someone calls the `go` method with a link object - which is done when a link internal to the epub is clicked).
chrfalch added a commit to chrfalch/kotlin-toolkit that referenced this issue Aug 18, 2023
To be able to show resources not part of the reading order (like notes, see Impossible to open a file when linear="no" readium#124) it is helpful to be able to provide a special readingOrder list when opening a publication in the navigator.

This commit adds readingOrder as an optional parameter with the default value of `Publication.readingOrder` to the epub factory and the fragment.

In addition the EPubFragment is now using the provided readingOrder instead of publication.readingOrder in its implementation.
@qnga
Copy link
Contributor

qnga commented Jan 9, 2024

Closing as we've implemented a way for apps to handle non-linear resources and it's not clear if we'll do more.

@qnga qnga closed this as completed Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants