codeant-ai-for-open-source[bot] commented on code in PR #37366:
URL: https://github.com/apache/superset/pull/37366#discussion_r2743751366


##########
superset/config.py:
##########
@@ -923,7 +923,7 @@ class D3TimeFormat(TypedDict, total=False):
         # Fonts
         "fontUrls": [],
         "fontFamily": "Inter, Helvetica, Arial, sans-serif",
-        "fontFamilyCode": "'Fira Code', 'Courier New', monospace",
+        "fontFamilyCode": "'IBM Plex Mono', 'Courier New', monospace",

Review Comment:
   **Suggestion:** The fallback list is minimal and may produce inconsistent 
monospace rendering across platforms; include a broader set of common system 
monospace fonts (e.g., SFMono-Regular, Menlo, Monaco) before falling back to 
generic `monospace` so rendering is consistent when `IBM Plex Mono` isn't 
available. [logic error]
   
   <details>
   <summary><b>Severity Level:</b> Major ⚠️</summary>
   
   ```mdx
   - ⚠️ SQL Lab Editor inconsistent monospace rendering across platforms.
   - ⚠️ Chart Builder popover SQL editor visual mismatch across OS.
   - ⚠️ Dataset Editor expressions render differently for macOS users.
   ```
   </details>
   
   ```suggestion
           "fontFamilyCode": "'IBM Plex Mono', 'SFMono-Regular', Menlo, Monaco, 
'Courier New', monospace",
   ```
   <details>
   <summary><b>Steps of Reproduction ✅ </b></summary>
   
   ```mdx
   1. Start Superset with the PR-applied config and inspect superset/config.py 
at line 926
   where "fontFamilyCode" is set to "'IBM Plex Mono', 'Courier New', monospace".
   
   2. On a macOS machine without IBM Plex Mono installed but with system 
monospace fonts
   (e.g., SFMono-Regular, Menlo, Monaco), open SQL → SQL Lab and render the SQL 
editor.
   
   3. Inspect the computed font in browser DevTools for the editor text: 
because the current
   fallback list goes straight to 'Courier New', the browser may pick Courier 
New instead of
   native macOS monospace fonts, producing a different look than native apps.
   
   4. Observe inconsistent monospace appearance across platforms (macOS vs 
Windows).
   Expanding the fallback list (as in improved_code) makes macOS render with
   SFMono-Regular/Menlo/Monaco when IBM Plex is absent, producing more 
consistent
   cross-platform rendering.
   ```
   </details>
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** superset/config.py
   **Line:** 926:926
   **Comment:**
        *Logic Error: The fallback list is minimal and may produce inconsistent 
monospace rendering across platforms; include a broader set of common system 
monospace fonts (e.g., SFMono-Regular, Menlo, Monaco) before falling back to 
generic `monospace` so rendering is consistent when `IBM Plex Mono` isn't 
available.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve 
this? If you propose a fix, implement it and please make it concise.
   ```
   </details>



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to