Darkmode is broken #10

Closed
opened 2020-04-22 11:33:22 +00:00 by vojta001 · 11 comments
vojta001 commented 2020-04-22 11:33:22 +00:00 (Migrated from gitlab.com)

When the darkmode is on, the page should immediately be displayed dark, but it currently starts as normal and transitions to the dark state. Probably related to bcc8f50658.

When the darkmode is on, the page should immediately be displayed dark, but it currently starts as normal and transitions to the dark state. Probably related to bcc8f50658cee1338732efe71401e28d577cffc2.
vojta001 commented 2020-04-22 11:34:28 +00:00 (Migrated from gitlab.com)

I extracted it from #3 as this should be relatively easy to fix while we are waiting for anyone (@Dejwut) to actually create the darkmode button.

I extracted it from #3 as this should be relatively easy to fix while we are waiting for anyone (@Dejwut) to actually create the darkmode button.
Greenscreener commented 2020-04-23 14:27:16 +00:00 (Migrated from gitlab.com)

created branch gs/darkmode-fix to address this issue

created branch [`gs/darkmode-fix`](/patek-devs/patek.cz/-/compare/master...gs%2Fdarkmode-fix) to address this issue
Greenscreener commented 2020-04-23 15:48:25 +00:00 (Migrated from gitlab.com)

The blinking still persists even when the transition is removed (even though less noticeable) (see gs/darkmode-fix) because JS doesn't execute fast enough. The only real solution would be server-side solution and the only thing I can think of is a special language, which would somehow inherit translations from the already existing languages and there would be a {{ T }} call inside a <style> element which would add the respective colour. IMHO hacky af.

The blinking still persists even when the transition is removed (even though less noticeable) (see [gs/darkmode-fix](https://gitlab.com/patek-devs/patek.cz/-/compare/master...gs%2Fdarkmode-fix)) because JS doesn't execute fast enough. The only real solution would be server-side solution and the only thing I can think of is a special language, which would somehow inherit translations from the already existing languages and there would be a `{{ T }}` call inside a `<style>` element which would add the respective colour. IMHO hacky af.
vojta001 commented 2020-04-23 21:30:20 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
vojta001 commented 2020-04-23 21:32:30 +00:00 (Migrated from gitlab.com)

Cannot we make use of synchronous JavaScript? So that it is executed before anything else moves on? Or is it even possible?

Cannot we make use of synchronous JavaScript? So that it is executed before anything else moves on? Or is it even possible?
Greenscreener commented 2020-04-23 22:03:34 +00:00 (Migrated from gitlab.com)

Well. The problem is, that the JavaScript has to be called inside the DOMContentLoaded callback, because otherwise, the element we want to add the class to doesn't yet exist. Is there another way to do this?

Well. The problem is, that the JavaScript has to be called inside the DOMContentLoaded callback, because otherwise, the element we want to add the class to doesn't yet exist. Is there another way to do this?
Greenscreener commented 2020-04-23 22:17:36 +00:00 (Migrated from gitlab.com)
https://gitlab.com/patek-devs/patek.cz/-/issues/11#note_330499518 <- this applies here too.
Greenscreener commented 2020-04-26 19:06:11 +00:00 (Migrated from gitlab.com)

mentioned in commit 7bc21cb434

mentioned in commit 7bc21cb4341562dd293a0cce5344bb1ab844659e
Greenscreener commented 2020-04-26 19:13:18 +00:00 (Migrated from gitlab.com)

mentioned in merge request !14

mentioned in merge request !14
Greenscreener commented 2020-04-28 09:47:52 +00:00 (Migrated from gitlab.com)

closed via merge request !14

closed via merge request !14
Greenscreener commented 2020-04-28 09:47:53 +00:00 (Migrated from gitlab.com)

mentioned in commit 897eb88bec

mentioned in commit 897eb88becbcbf8b483bf48c6d6853be15ac8392
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: patek/patek.cz#10
No description provided.