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

First visible locator (EPUBS) improvements #99

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

oscar-rivera-demarque
Copy link

We have detected some different publications where the first visible locator is not working as expected. Doing an investigation, most of the cases are related to a crash in the usage of "cssSelectorGenerator" method. Additionally, there is another case covered here, when a publication has a list which is long enough to be shown entirely in the current pages.

Cases explanation:

In the first case, I've detected that, when using TTS for some publications in which the elements have custom properties (eg. xml:lang), the css selector process will crash, so the first visible locator will not be in the actual current page, but in the page in which the latest known element is.
Screenshot 2025-01-10 at 3 04 01 PM


1a- Current behavior in Sept comme setteur publication:
Notice that even if I try to start in the page 46, it will go back to the page 40 (the beginning of the current chapter).

Screen.Recording.2025-01-10.at.3.04.44.PM.mov

1b- New behavior in Sept comme setteur publication:
As now the cssSelectorGenerator is not crashing, it's able to get the right element to start.

Screen.Recording.2025-01-10.at.3.05.14.PM.mov

In the second case, the publication I found is a little bit special, most of the content is wrapped into an UL element.
This situation make the whole list of elements to act as list items, and that's why the current "display: block" validation is not enough to detect the right element to be selected as the first visible element.
Screenshot 2025-01-10 at 3 09 26 PM


2a- Current behavior in CRAAV Therapy publication:
Notice that I'm starting in the page 72, but as most of the content is ignored, the "first visible locator" will be the beginning of the UL (in page 5)

Screen.Recording.2025-01-10.at.3.09.53.PM.mov

2b- New behavior in CRAAV Therapy publication:
As now the elements are not ignored, the first visible locator is actually getting the right one.

Screen.Recording.2025-01-10.at.3.10.28.PM.mov

…to remove/add custom properties in HtmlElements, version 3.6.9 should be able to manage the namespaces
@oscar-rivera-demarque oscar-rivera-demarque marked this pull request as ready for review January 14, 2025 14:54
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.

1 participant