From f593421760d1d156e2826545596c7a3451719658 Mon Sep 17 00:00:00 2001 From: Arlen Johnson Date: Mon, 12 Jun 2023 16:24:28 -0400 Subject: [PATCH] Add comments for future development (concerning dark mode and select2) (CFM-239) --- app/templates/element/javascript.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/templates/element/javascript.php b/app/templates/element/javascript.php index 313ece78e..e65693ed6 100644 --- a/app/templates/element/javascript.php +++ b/app/templates/element/javascript.php @@ -154,6 +154,7 @@ $("select").addClass("form-select"); // Use select2 library everywhere except + // XXX TODO: Find a replacement for Select2 - it is not accessible. // - duet-date // $("select").not("#limit").not(".duet-date__select--month").not(".duet-date__select--year").select2({ // width: '100%', @@ -260,6 +261,7 @@ }); // Test for dark mode OS preference, and add the 'dark-mode' body class by default if it is present. + // XXX TODO: Replace this with setting an application variable (when available) so we do not flash the light color briefly on each page load const darkModeOsEnabled = window.matchMedia("(prefers-color-scheme: dark)"); if(darkModeOsEnabled.matches) { $('html').addClass('dark-mode');