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

[Feature Request] Add pages that got detected to be dark to an internal set to improve initial rendering #8513

Open
LasseRosenow opened this issue Mar 25, 2022 · 3 comments

Comments

@LasseRosenow
Copy link

Feature Request

The dark reader recently got the ability to automatically detect I'd a page is dark or not. While this is a really helpful feature in general, it is not perfect either. The biggest problem that I myself face is that on initial load of a page, the extension first just starts converting the page to dark mode. Then it notices that the page already is dark mode, so it reverts applying its own styles, so that we get the official dark mode of the page.

This looks somewhat weird, whenever you open a page.

My proposal to fix this would be to have some internal set that gets updated whenever the dark reader detects that a page is dark. So that on the next time, that I enter the page, the dark reader "remembers" this page to have a native dark mode and just does not apply any styling whatsoever.

To not let the set grow too large it could be done that pages that have not been visited in a long time just get removed from it.

Also to prevent the issue that a website might remove native dark mode support in the future, I would still let the dark reader check if the page really still has a dark mode.

@LasseRosenow LasseRosenow changed the title [Feature Request] Add pages that got detected to be dark to an internal set [Feature Request] Add pages that got detected to be dark to an internal set to improve initial rendering Mar 25, 2022
@Gusted
Copy link
Contributor

Gusted commented Mar 25, 2022

Interesting idea, but this adds again another list and I've been trying to reduce the current lists we already have, because they become big and can consume measurable memory and will need to be handled and taken care of with the sitelist and decide when the internal list should be "override".

Also I've posted a comment on the other issue about a scenario which can become a issue, because remembering such information can lead to scenario's which are non-optimal. #1285 (comment)

@LasseRosenow
Copy link
Author

I would say that the internal list should always override all other lists.

I think this should not be a memory issue, as long as websites that have not been visited in some time get removed.

Also I think that in the future this would be the only list necessary, as we don't need long global lists anymore since dark reader can detect dark sides automatically

@LasseRosenow
Copy link
Author

Also I've posted a comment on the other issue about a scenario which can become a issue, because remembering such information can lead to scenario's which are non-optimal.

Yes this is why I wrote that the dark reader should still check the site even if it's in the list, but just not apply styles early on if it is in the list.

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

2 participants