korbit-ai[bot] commented on code in PR #35094:
URL: https://github.com/apache/superset/pull/35094#discussion_r2337659154


##########
superset/templates/superset/spa.html:
##########
@@ -64,6 +64,9 @@
       id="csrf_token"
       value="{{ csrf_token() if csrf_token else '' }}"
     />
+    {% block head_js %}
+      {% include "head_custom_extra.html" %}
+    {% endblock %}

Review Comment:
   ### Fragmented JavaScript Inclusion Strategy <sub>![category 
Design](https://img.shields.io/badge/Design-0d9488)</sub>
   
   <details>
     <summary>Tell me more</summary>
   
   ###### What is the issue?
   JavaScript inclusion strategy is fragmented with multiple include points and 
no clear organization principle for what goes where (head_custom_extra.html vs 
tail_js_custom_extra.html).
   
   
   ###### Why this matters
   This fragmented approach makes it difficult to maintain a consistent 
JavaScript loading strategy and could lead to dependency issues or race 
conditions between scripts.
   
   ###### Suggested change ∙ *Feature Preview*
   Consolidate JavaScript includes into a single, well-defined location with 
clear documentation about what belongs where. For example:
   ```html
   {% block javascript %}
     {# Critical, page-blocking scripts #}
     {% block critical_js %}
     {% endblock %}
   
     {# Deferred, non-blocking scripts #}
     {% block deferred_js %}
       {% if entry %}
         {{ js_bundle(assets_prefix, entry) }}
       {% endif %}
       {% include "custom_js.html" %}
     {% endblock %}
   {% endblock %}
   ```
   
   
   ###### Provide feedback to improve future suggestions
   [![Nice 
Catch](https://img.shields.io/badge/👍%20Nice%20Catch-71BC78)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/fcd15f78-4403-4faa-86e5-cd07fd9ac3d0/upvote)
 
[![Incorrect](https://img.shields.io/badge/👎%20Incorrect-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/fcd15f78-4403-4faa-86e5-cd07fd9ac3d0?what_not_true=true)
  [![Not in 
Scope](https://img.shields.io/badge/👎%20Out%20of%20PR%20scope-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/fcd15f78-4403-4faa-86e5-cd07fd9ac3d0?what_out_of_scope=true)
 [![Not in coding 
standard](https://img.shields.io/badge/👎%20Not%20in%20our%20standards-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/fcd15f78-4403-4faa-86e5-cd07fd9ac3d0?what_not_in_standard=true)
 
[![Other](https://img.shields.io/badge/👎%20Other-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/fcd15f78-4403-4faa-86e5-cd07fd9ac3d0)
   </details>
   
   <sub>
   
   💬 Looking for more details? Reply to this comment to chat with Korbit.
   </sub>
   
   <!--- korbi internal id:744b4eb6-86a6-4006-9442-96624c46cc21 -->
   
   
   [](744b4eb6-86a6-4006-9442-96624c46cc21)



-- 
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: notifications-unsubscr...@superset.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to