You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "shahar1 (via GitHub)" <gi...@apache.org> on 2025/12/28 19:59:56 UTC

[PR] Fix active mode in dark mode menu [airflow-site]

shahar1 opened a new pull request, #1359:
URL: https://github.com/apache/airflow-site/pull/1359

   ## Copilot Summary
   
   This pull request updates the theme-switching logic and UI in the `layout.html` file of the `sphinx_airflow_theme`. The main improvements are to the theme selection behavior and the visual feedback for the active theme.
   
   Theme selection logic:
   
   * The default theme selection now returns `'auto'` instead of checking the user's `prefers-color-scheme` setting, simplifying the logic for determining the initial theme.
   
   Visual feedback for theme selection:
   
   * When switching themes, the checkmark icon (`.bi.ms-auto`) is now hidden for all theme options and shown only for the active theme, improving clarity about which theme is currently selected.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix active mode in dark mode menu [airflow-site]

Posted by "shahar1 (via GitHub)" <gi...@apache.org>.
shahar1 merged PR #1359:
URL: https://github.com/apache/airflow-site/pull/1359


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix active mode in dark mode menu [airflow-site]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #1359:
URL: https://github.com/apache/airflow-site/pull/1359#discussion_r2649900059


##########
sphinx_airflow_theme/sphinx_airflow_theme/layout.html:
##########
@@ -387,10 +387,18 @@
       document.querySelectorAll('[data-bs-theme-value]').forEach(element => {
         element.classList.remove('active')
         element.setAttribute('aria-pressed', 'false')
+        const checkIcon = element.querySelector('.bi.ms-auto')
+        if (checkIcon) {
+            checkIcon.classList.add('d-none')
+        }
       })
 
       btnToActive.classList.add('active')
       btnToActive.setAttribute('aria-pressed', 'true')
+      const activeCheckIcon = btnToActive.querySelector('.bi.ms-auto')
+      if (activeCheckIcon) {
+          activeCheckIcon.classList.remove('d-none')
+      }

Review Comment:
   Inconsistent indentation detected. The code uses 12 spaces for the inner if statement, which is inconsistent with the rest of the file that uses 6 spaces per indentation level. This should be corrected to maintain consistent code formatting throughout the file.



##########
sphinx_airflow_theme/sphinx_airflow_theme/layout.html:
##########
@@ -387,10 +387,18 @@
       document.querySelectorAll('[data-bs-theme-value]').forEach(element => {
         element.classList.remove('active')
         element.setAttribute('aria-pressed', 'false')
+        const checkIcon = element.querySelector('.bi.ms-auto')
+        if (checkIcon) {
+            checkIcon.classList.add('d-none')
+        }

Review Comment:
   Inconsistent indentation detected. The code uses 4 spaces for the outer block but 12 spaces (3 levels) for the inner if statement, which is inconsistent with the rest of the file that uses 6 spaces per indentation level. This should be corrected to maintain consistent code formatting throughout the file.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org