-
Notifications
You must be signed in to change notification settings - Fork 60
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
UI object for epubReadingSystem #648
Comments
In case it helps the discussion: http://www.readbeyond.it/minstrel/developers.html#js |
Comments I made in the aforementioned doc:
https://rawgit.com/IDPF/epub-revision/master/build/31/spec/epub-contentdocs.html#app-ers-properties Some concerns: As a reading system implementor, what value should I give A typical user interface would consist in several parts, some of which may indeed partially overlay the surface area used to render the EPUB HTML/SVG documents, thereby resulting in visually-obscured EPUB content, and in trapped user events (e.g. touch gestures and mouse interaction). However, other UI controls would not necessarily overlap (i.e. application chrome laid out around the EPUB document frames), but may indeed be made temporarily "invisible" (for example, to eliminate distractions during the reading experience ; after a preset inactivity timeout ; only to be reactivated when user activity resumes, e.g. mouse move, finger tap). In fact ; as is typical in most reading systems ; the previous / next "page turn" UI affordances are usually hidden / discrete (visually speaking), whilst still being reactive to user interaction (which may cause problems if the user intent was originally targeted at the EPUB content itself, during a time when the UI controls were effectively "invisible"). Obviously, swipe gesture handlers are totally invisible, so I am wondering if the Bottom line: I think that the concept of "UI visibility" proposed by the Note that I am talking about "persistent" UI, not transient popup menus, dialogs, etc. which are usually modal (mutually exclusive with a normal reading experience), such as for selections / highlights / annotations, etc.. In order to add a meaningful / useful new property to navigator.epubReadingSystem (e.g. |
@mattgarrish can you please assign me to this? (as agreed on today's concall) |
@danielweck I agree with your assessment. This sounds very problematic to get right in any detailed way, and the naive single toggle is so broad and up to so much interpretation as to be effectively useless. The UI of an app and the device on which the app runs is not only varied, but under constant change. For instance, on Android, older versions always showed the status bar at the top. Newer versions added a fullscreen mode. Even newer versions added notifications that can appear on top of content when in fullscreen. Who knows what future versions will bring? If we define exactly what we mean for the UI being visible for all current versions of Android, iOS, MacOS, Windows, Linux, etc. we will have an enormously complex definition that is extremely fragile (OS vendors like updating things). If we don't, then it is up to the RS to decide what counts as UI, which makes it hard for a script to really react in a predictable way. |
Thanks @bduga I like your short summary better than my full comment :) |
I agree that a simple boolean would probably not be useful at all, and that the more complex approach of returning an object indicating the visibility of various pieces of the UI could quickly become overly complex. The initial motivation for the feature request was to a) minimize the amount of challenges developers face when developing more complex / full-screen interactivity in a document, and b) avoid splintered implementations as more reading systems begin to support interactivity, each with their own way of handling user input to call/dismiss UI elements, trigger page turns, etc. It sounds like a UI visibility property/object is not the best direction to go in, but I'm wondering if there are any other solutions we could consider at this point that would be beneficial to developing complex interactive content inside epubs, or is this just not something that should be tackled right now? For example, one potential use case for a UI visibility API would have been to know when to block or allow touch events that would cause some UI to be shown/hidden: Say a developer wants to create an HTML document in a fixed layout EPUB that has a button that brings up a full-screen widget of some sort, maybe an interactive map. He would like to ensure that when the map is displayed, none of the reading system UI is visible. He could try to achieve this using preventDefault on various pointer events, but since there is no definitive way of knowing whether any UI is currently visible-- since it may have been visible or hidden when the page was initially loaded -- then i'm not sure there's a way to ensure the UI does not cover/interfere with the map. It's an admittedly narrow use case, so maybe it's not something to solve for right now, but it does seem like it will come up more and more going forward. |
@chrmitchell thank you for your feedback!
I can totally empathize with content authors / creators, as I too faced the challenges of highly-interactive EPUB3 content due to reading system inconsistencies. I also contributed to the implementation of e-reading software (not just Readium), so I know what the problems are from this side of the fence as well. I agree with you that a I fear that this is another case for documenting "good practice", at least at this stage. I am thinking about the "minimal CSS" discussion ( #672 ), which really boils down (in my opinion) to encouraging RS developers to be transparent about the impact of their rendering processes on authored content (well, there's also the proposal to add a new metadata hint for reading systems https://docs.google.com/document/d/1R8bHqR0zV79B9io5JGSD21mYOa8sQIyzrZn6WkT_H_U but there's a strong case for user needs to always override authors wishes in reflowable content, with fixed-layout publications in a special category of publications that prioritize visual fidelity). |
A more extensive proposal for discovering the presence of UI chrome (and other features) was proposed on the working group mailing list than the simple boolean property that was proposed for the first draft.
For more information, see the thread at:
https://groups.google.com/d/msg/epub-working-group/L3M5K8vrU4U/cMxF7S5tCAAJ
The text was updated successfully, but these errors were encountered: