yaooqinn opened a new pull request, #54588: URL: https://github.com/apache/spark/pull/54588
### What changes were proposed in this pull request? This PR introduces helper utilities for tooltip markup generation in the Spark Web UI: **Scala helpers in `UIUtils.scala`:** - `tooltipSpan(content, text, placement)` — wraps content in a `<span>` with BS5 tooltip attributes - `tooltipLink(content, text, placement)` — wraps content in an `<a>` with BS5 tooltip attributes **JS helper in `stagepage.js`:** - `setTooltip(selector, text)` — sets BS5 tooltip attributes on a jQuery element These helpers replace 21 inline tooltip patterns across 10 Scala files and 12 `.attr()` call chains in stagepage.js, reducing boilerplate and ensuring consistent tooltip markup. ### Why are the changes needed? Part of the Bootstrap 5 migration ([SPARK-55760](https://issues.apache.org/jira/browse/SPARK-55760)). Tooltip markup was duplicated across many files with slight variations. Centralizing it: 1. Reduces code duplication 2. Ensures consistent BS5 tooltip attributes (`data-bs-toggle`, `data-bs-placement`, `title`) 3. Makes future tooltip-related changes easier (single point of change) ### Does this PR introduce _any_ user-facing change? No. The rendered HTML is functionally identical — tooltips now consistently include `data-bs-placement="top"`. ### How was this patch tested? - Updated `UIUtilsSuite` to match new tooltip markup - All existing tests pass - Scalastyle and JS lint checks pass ### Was this patch authored or co-authored using generative AI tooling? Yes, GitHub Copilot CLI was used. -- 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]
