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

Ongoing timing issues with unhiding display between article loads in Zimit ZIMs #656

Open
Jaifroid opened this issue Sep 29, 2024 · 0 comments
Assignees
Milestone

Comments

@Jaifroid
Copy link
Member

A user on reddit has mentioned that the display is sometimes blank when loading an article with a custom Zimit-based ZIM (Zimit2). I've also seen this, for example with the latest MDN Developers ZIM, where the secondary loading of the JavaScript panel in the iframe is wrongly detected by the app as the loading of a new article. The app blanks the page between article loads in order to avoid Flash of Unstyled Content (FOUC) or Flash of Incorrect Style (FOIS), and other strange display artefacts, when using Dark Reader. These complications are not currently the case for Kiwix JS, which doesn't use DarkReader yet.

I've worked on this issue a lot, and still haven't found signals that guarantee that a page should be unhidden. Sometimes we unhide too soon (this is generally not too much of a problem, some FOUC or FOIS), sometimes we unhide only to hide again a few seconds later and then unhide, and at other times we never unhide (this is rare but does happen).

We need a way to control hiding based on user gestures only, to ensure that we never hide once a page is unhidden just because an iframe called new content programmatically, or JS did a redirect, etc. The page should first be hidden only with a user gesture, should be unhidden on DOMContentLoaded, and never hidden again until there is another user gesture.

@Jaifroid Jaifroid added this to the Release 3.5.0 milestone Sep 29, 2024
@Jaifroid Jaifroid self-assigned this Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant