[ 
https://issues.apache.org/jira/browse/SPARK-55777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18062740#comment-18062740
 ] 

Kent Yao commented on SPARK-55777:
----------------------------------

This was addressed by:
- [SPARK-55779|https://issues.apache.org/jira/browse/SPARK-55779] (PR 
[#54588|https://github.com/apache/spark/pull/54588]): Added the 
{{setTooltip()}} helper function in stagepage.js, reducing 12 repetitive 
{{.attr()}} chains to concise single-line calls.
- [SPARK-55778|https://issues.apache.org/jira/browse/SPARK-55778] (PR 
[#54622|https://github.com/apache/spark/pull/54622]): Removes the redundant 
{{data-bs-placement="top"}} from {{setTooltip()}}, further simplifying the 
helper.

Closing as resolved since the original goal (introduce a helper to reduce ~36 
lines of repetitive tooltip code to ~12 concise calls) is fully implemented.

> Add JS helper function for dynamic tooltip initialization in stagepage.js
> -------------------------------------------------------------------------
>
>                 Key: SPARK-55777
>                 URL: https://issues.apache.org/jira/browse/SPARK-55777
>             Project: Spark
>          Issue Type: Sub-task
>          Components: Web UI
>    Affects Versions: 4.2.0
>            Reporter: Kent Yao
>            Priority: Major
>
> stagepage.js has 12 repetitive `.attr()` chains to add tooltip attributes 
> dynamically:\n\n```javascript\n$('#scheduler_delay').attr('data-bs-toggle', 
> 'tooltip')\n  .attr('data-bs-placement', 'top')\n  .attr('title', 
> '...');\n```\n\nThis repeats for 12 elements (scheduler_delay, 
> task_deserialization_time, shuffle_read_fetch_wait_time, etc.). Introduce a 
> helper function:\n\n```javascript\nfunction addTooltip(selector, title) {\n  
> $(selector).attr('data-bs-toggle', 'tooltip').attr('title', 
> title);\n}\n```\n\nThis would reduce ~36 lines of repetitive code to ~12 
> concise calls.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to